Update README.md
Browse files
README.md
CHANGED
@@ -9,14 +9,80 @@ tags:
|
|
9 |
license: apache-2.0
|
10 |
language:
|
11 |
- en
|
|
|
12 |
---
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
- **Developed by:** large-traversaal
|
17 |
- **License:** apache-2.0
|
18 |
- **Finetuned from model :** unsloth/Meta-Llama-3.1-8B
|
|
|
|
|
19 |
|
20 |
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
21 |
|
22 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
license: apache-2.0
|
10 |
language:
|
11 |
- en
|
12 |
+
- ur
|
13 |
---
|
14 |
|
15 |
+
|
16 |
+
# Model Card for Alif Llama 3.1 8B Instruct
|
17 |
+
|
18 |
+
<img src="aya-expanse-8B.png" width="650" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
19 |
+
|
20 |
+
**Alif Llama 3.1 8B Instruct** is an open-weight research release of a model with highly advanced multilingual capabilities. It focuses on pairing a highly performant pre-trained [Command family](https://huggingface.co/CohereForAI/c4ai-command-r-plus) of models with the result of a year’s dedicated research from [Cohere For AI](https://cohere.for.ai/), including [data arbitrage](https://arxiv.org/abs/2408.14960), [multilingual preference training](https://arxiv.org/abs/2407.02552), [safety tuning](https://arxiv.org/abs/2406.18682), and [model merging](https://arxiv.org/abs/2410.10801). The result is a powerful multilingual large language model.
|
21 |
+
|
22 |
|
23 |
- **Developed by:** large-traversaal
|
24 |
- **License:** apache-2.0
|
25 |
- **Finetuned from model :** unsloth/Meta-Llama-3.1-8B
|
26 |
+
- **Model:** Alif Llama 3.1 8B Instruct
|
27 |
+
- **Model Size:** 8 billion parameters
|
28 |
|
29 |
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
30 |
|
31 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
### How to Use Alif Llama
|
36 |
+
|
37 |
+
Install the transformers library and load Alif Llama 3.1 8B Instruct as follows:
|
38 |
+
|
39 |
+
```python
|
40 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
41 |
+
|
42 |
+
model_id = "CohereForAI/aya-expanse-8b"
|
43 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
44 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
45 |
+
|
46 |
+
# Format the message with the chat template
|
47 |
+
messages = [{"role": "user", "content": "Anneme onu ne kadar sevdiğimi anlatan bir mektup yaz"}]
|
48 |
+
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
|
49 |
+
## <BOS_TOKEN><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Anneme onu ne kadar sevdiğimi anlatan bir mektup yaz<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>
|
50 |
+
|
51 |
+
gen_tokens = model.generate(
|
52 |
+
input_ids,
|
53 |
+
max_new_tokens=100,
|
54 |
+
do_sample=True,
|
55 |
+
temperature=0.3,
|
56 |
+
)
|
57 |
+
|
58 |
+
gen_text = tokenizer.decode(gen_tokens[0])
|
59 |
+
print(gen_text)
|
60 |
+
```
|
61 |
+
|
62 |
+
|
63 |
+
## Model Details
|
64 |
+
|
65 |
+
**Input**: Models input text only.
|
66 |
+
|
67 |
+
**Output**: Models generate text only.
|
68 |
+
|
69 |
+
**Model Architecture**: Aya Expanse 8B is an auto-regressive language model that uses an optimized transformer architecture. Post-training includes supervised finetuning, preference training, and model merging.
|
70 |
+
|
71 |
+
For more details about how the model was trained, check out [our blogpost](https://huggingface.co/blog/aya-expanse).
|
72 |
+
|
73 |
+
### Evaluation
|
74 |
+
|
75 |
+
We evaluated Aya Expanse 8B against Gemma 2 9B, Llama 3.1 8B, Ministral 8B, and Qwen 2.5 7B using the `dolly_human_edited` subset from the [Aya Evaluation Suite dataset](https://huggingface.co/datasets/CohereForAI/aya_evaluation_suite) and m-ArenaHard, a dataset based on the [Arena-Hard-Auto dataset](https://huggingface.co/datasets/lmarena-ai/arena-hard-auto-v0.1) and translated to the 23 languages we support in Aya Expanse 8B. Win-rates were determined using gpt-4o-2024-08-06 as a judge. For a conservative benchmark, we report results from gpt-4o-2024-08-06, though gpt-4o-mini scores showed even stronger performance.
|
76 |
+
|
77 |
+
The m-ArenaHard dataset, used to evaluate Aya Expanse’s capabilities, is publicly available [here](https://huggingface.co/datasets/CohereForAI/m-ArenaHard).
|
78 |
+
|
79 |
+
<img src="winrates_marenahard_complete.png" width="650" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
80 |
+
<img src="winrates_dolly.png" width="650" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
81 |
+
<img src="winrates_by_lang.png" width="650" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
82 |
+
<img src="winrates_step_by_step.png" width="650" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
83 |
+
|
84 |
+
|
85 |
+
### Model Card Contact
|
86 |
+
|
87 |
+
For errors or additional questions about details in this model card, contact [email protected].
|
88 |
+
|