Update README.md
Browse files
README.md
CHANGED
@@ -9,4 +9,69 @@ pipeline_tag: text-generation
|
|
9 |
|
10 |
# Paya (aya 23 8B Instruction Tuned on Farsi)
|
11 |
|
12 |
-
<a href="https://ibb.co/fHmCngh"><img src="https://i.ibb.co/jD7LWNc/paya.png" alt="paya" border="0"></a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Paya (aya 23 8B Instruction Tuned on Farsi)
|
11 |
|
12 |
+
<a href="https://ibb.co/fHmCngh"><img src="https://i.ibb.co/jD7LWNc/paya.png" alt="paya" border="0"></a>
|
13 |
+
|
14 |
+
|
15 |
+
Welcome to PAYA, a powerful Persian text generation model built upon the foundations of Aya 23 8B, a multilingual language model. PAYA has been fine-tuned using the supervised finetuning technique, employing the DORA method for efficient refinement on Persian datasets, particularly leveraging the [persian-alpaca-deep-clean](https://huggingface.co/datasets/myrkur/persian-alpaca-deep-clean) dataset.
|
16 |
+
|
17 |
+
## Features
|
18 |
+
|
19 |
+
- **Advanced Text Generation**: Generate coherent and contextually relevant Persian text with ease.
|
20 |
+
- **Efficient Fine-Tuning**: Utilizes the DORA method for streamlined fine-tuning on Persian datasets.
|
21 |
+
- **Optimized Tokenization**: The model's tokenizer ensures accurate representation of Persian words, enhancing the quality of generated text.
|
22 |
+
|
23 |
+
## Usage
|
24 |
+
|
25 |
+
You can quickly get started with PAYA using the following sample code:
|
26 |
+
|
27 |
+
```python
|
28 |
+
import transformers
|
29 |
+
import torch
|
30 |
+
|
31 |
+
model_id = "myrkur/paya"
|
32 |
+
|
33 |
+
pipeline = transformers.pipeline(
|
34 |
+
"text-generation",
|
35 |
+
model=model_id,
|
36 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
37 |
+
device_map="auto",
|
38 |
+
)
|
39 |
+
|
40 |
+
messages = [
|
41 |
+
{"role": "user", "content": "علم بهتر است یا ثروت؟"},
|
42 |
+
]
|
43 |
+
|
44 |
+
prompt = pipeline.tokenizer.apply_chat_template(
|
45 |
+
messages,
|
46 |
+
tokenize=False,
|
47 |
+
add_generation_prompt=True
|
48 |
+
)
|
49 |
+
|
50 |
+
terminators = [
|
51 |
+
pipeline.tokenizer.eos_token_id,
|
52 |
+
]
|
53 |
+
|
54 |
+
outputs = pipeline(
|
55 |
+
prompt,
|
56 |
+
max_new_tokens=512,
|
57 |
+
eos_token_id=terminators,
|
58 |
+
do_sample=True,
|
59 |
+
temperature=0.4,
|
60 |
+
top_p=0.9,
|
61 |
+
repetition_penalty=1.1
|
62 |
+
)
|
63 |
+
print(outputs[0]["generated_text"][len(prompt):])
|
64 |
+
```
|
65 |
+
|
66 |
+
## Why PAYA?
|
67 |
+
|
68 |
+
PAYA stands out for its exceptional tokenization capabilities, accurately capturing the nuances of the Persian language. Additionally, its fine-tuned parameters and efficient training methodology ensure remarkable results in text generation tasks.
|
69 |
+
|
70 |
+
## Contributions
|
71 |
+
|
72 |
+
Contributions to PAYA are welcome! Whether it's enhancing the model's capabilities, improving its performance on specific tasks, or evaluating its performance, your contributions can help advance Persian natural language processing.
|
73 |
+
|
74 |
+
## Contact
|
75 |
+
For questions or further information, please contact:
|
76 |
+
|
77 |
+
- Amir Masoud Ahmadi: [[email protected]](mailto:[email protected])
|