File size: 2,507 Bytes
9e99f1e
 
 
 
 
5451f69
9e99f1e
079419e
5451f69
9e99f1e
 
 
5451f69
 
 
2361ee2
9e99f1e
 
 
 
 
 
 
5451f69
9e99f1e
 
 
5451f69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e99f1e
 
 
5451f69
 
 
9e99f1e
 
 
 
 
 
 
 
 
 
 
d1b4da1
9e99f1e
 
 
 
 
079419e
9e99f1e
 
 
 
 
 
 
079419e
d1b4da1
079419e
d1b4da1
954d737
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
library_name: peft
tags:
- trl
- sft
- text-generation-inference
base_model: NousResearch/Llama-2-7b-chat-hf
datasets:
- Thimira/sinhala-llm-dataset-llama-prompt-format
model-index:
- name: sinhala-llama-2-7b-chat-hf
  results: []
license: llama2
language:
- si
pipeline_tag: text-generation
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# sinhala-llama-2-7b-chat-hf

This model is a fine-tuned version of [NousResearch/Llama-2-7b-chat-hf](https://huggingface.co/NousResearch/Llama-2-7b-chat-hf) on the [Thimira/sinhala-llm-dataset-llama-prompt-format](https://huggingface.co/datasets/Thimira/sinhala-llm-dataset-llama-prompt-format) dataset.

## Model description

This is a model for Sinhala language text generation which is fine-tuned from the base llama-2-7b-chat-hf model.

Currently the capabilities of themodel are extremely limited, and requires further data and fine-tuning to be useful. Feel free to experiment with the model and provide feedback.

### Usage example

```python
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline

tokenizer = AutoTokenizer.from_pretrained("Thimira/sinhala-llama-2-7b-chat-hf")
model = AutoModelForCausalLM.from_pretrained("Thimira/sinhala-llama-2-7b-chat-hf")

pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)

prompt = "ඔබට සිංහල භාෂාව තේරුම් ගත හැකිද?"
result = pipe(f"<s>[INST] {prompt} [/INST]")
print(result[0]['generated_text'])
```

## Intended uses & limitations

The Sinhala-LLaMA models are intended for assistant-like chat in the Sinhala language.

To get the expected features and performance from these models the LLaMA 2 prompt format needs to be followed, including the INST and <<SYS>> tags, BOS and EOS tokens, and the whitespaces and breaklines in between.

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 2
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: constant
- lr_scheduler_warmup_ratio: 0.03
- num_epochs: 2

### Training results



### Framework versions

- PEFT 0.10.0
- Transformers 4.40.2
- Pytorch 2.1.0
- Datasets 2.19.1
- Tokenizers 0.19.1