1024m commited on
Commit
fc31e9b
·
verified ·
1 Parent(s): 51614b6

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +224 -0
README.md ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ library_name: transformers
4
+ language:
5
+ - en
6
+ - nl
7
+ - fr
8
+ - it
9
+ - pt
10
+ - ro
11
+ - es
12
+ - cs
13
+ - pl
14
+ - uk
15
+ - ru
16
+ - el
17
+ - de
18
+ - da
19
+ - sv
20
+ - "no"
21
+ - ca
22
+ - gl
23
+ - cy
24
+ - ga
25
+ - eu
26
+ - hr
27
+ - lv
28
+ - lt
29
+ - sk
30
+ - sl
31
+ - et
32
+ - fi
33
+ - hu
34
+ - sr
35
+ - bg
36
+ - ar
37
+ - fa
38
+ - ur
39
+ - tr
40
+ - mt
41
+ - he
42
+ - hi
43
+ - mr
44
+ - bn
45
+ - gu
46
+ - pa
47
+ - ta
48
+ - te
49
+ - ne
50
+ - tl
51
+ - ms
52
+ - id
53
+ - vi
54
+ - jv
55
+ - km
56
+ - th
57
+ - lo
58
+ - zh
59
+ - my
60
+ - ja
61
+ - ko
62
+ - am
63
+ - ha
64
+ - ig
65
+ - mg
66
+ - sn
67
+ - sw
68
+ - wo
69
+ - xh
70
+ - yo
71
+ - zu
72
+ license: cc-by-nc-4.0
73
+ extra_gated_prompt: >-
74
+ By submitting this form, you agree to the [License
75
+ Agreement](https://cohere.com/c4ai-cc-by-nc-license) and acknowledge that the
76
+ information you provide will be collected, used, and shared in accordance with
77
+ Cohere's [Privacy Policy]( https://cohere.com/privacy). You'll receive email
78
+ updates about Cohere Labs and Cohere research, events, products and services.
79
+ You can unsubscribe at any time.
80
+ extra_gated_fields:
81
+ Name: text
82
+ Affiliation: text
83
+ Country: country
84
+ I agree to use this model for non-commercial use ONLY: checkbox
85
+ base_model: CohereLabs/tiny-aya-base
86
+ ---
87
+
88
+ # **Model Card for tiny-aya-earth**
89
+
90
+ ![Tiny Aya Earth](./assets/TinyAya_Earth.png)
91
+
92
+ **Best for West Asian and African languages.** For other regions, check [tiny-aya-global](https://huggingface.co/CohereLabs/tiny-aya-global), [tiny-aya-fire](https://huggingface.co/CohereLabs/tiny-aya-fire), [tiny-aya-water](https://huggingface.co/CohereLabs/tiny-aya-water)
93
+
94
+ ## **Model Summary**
95
+
96
+ Cohere Labs Tiny Aya is an open weights research release of a pretrained 3.35 billion parameter model optimized for efficient, strong, and balanced multilingual representation across 70+ languages, including many lower-resourced ones. The model is designed to support downstream adaptation, instruction tuning, and local deployment under realistic compute constraints.
97
+
98
+ Developed by: [Cohere](https://cohere.com/) and [Cohere](https://cohere.com/research) Labs
99
+
100
+ * Point of Contact: [**Cohere Labs**](https://cohere.com/research)
101
+ * License: [CC-BY-NC](https://cohere.com/cohere-labs-cc-by-nc-license), requires also adhering to **[Cohere Lab's Acceptable Use Policy](https://docs.cohere.com/docs/c4ai-acceptable-use-policy)**
102
+ * Model: tiny-aya-it-earth
103
+ * Model Size: 3.35B
104
+ * Context length: 8K input
105
+
106
+ For more details about this model family, please check out our [blog post](https://cohere.com/blog/cohere-labs-tiny-aya) and [tech report](https://github.com/Cohere-Labs/tiny-aya-tech-report/blob/main/tiny_aya_tech_report.pdf).
107
+
108
+ **Try Cohere Labs Tiny Aya**
109
+
110
+ You can try out Cohere Labs Tiny Aya before downloading the weights in our hosted [Hugging Face Space](https://huggingface.co/spaces/CohereLabs/tiny-aya).
111
+
112
+ **Usage**
113
+
114
+ ```py
115
+ from transformers import AutoTokenizer, AutoModelForCausalLM
116
+
117
+ model_id = "CohereLabs/tiny-aya-earth"
118
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
119
+ model = AutoModelForCausalLM.from_pretrained(model_id)
120
+
121
+ # Format message with the chat template
122
+ messages = [{"role": "user", "content": "Explica en español qué significa la palabra japonesa 'ikigai' y da un ejemplo práctico."}]
123
+ input_ids = tokenizer.apply_chat_template(
124
+ messages,
125
+ tokenize=True,
126
+ add_generation_prompt=True,
127
+ return_tensors="pt",
128
+ )
129
+
130
+ gen_tokens = model.generate(
131
+ input_ids,
132
+ max_new_tokens=4096,
133
+ do_sample=True,
134
+ temperature=0.1,
135
+ top_p=0.95
136
+ )
137
+
138
+ gen_text = tokenizer.decode(gen_tokens[0])
139
+ print(gen_text)
140
+ ```
141
+
142
+ You can also use the model directly using transformers `pipeline` abstraction:
143
+
144
+ ```py
145
+ from transformers import pipeline
146
+ import torch
147
+
148
+ model_id = "CohereLabs/tiny-aya-earth"
149
+
150
+ pipe = pipeline(
151
+ "text-generation",
152
+ model=model_id,
153
+ torch_dtype="auto",
154
+ device_map="auto",
155
+ )
156
+
157
+ messages = [
158
+ {"role": "user", "content": "Explain the Transformer architecture"},
159
+ ]
160
+
161
+ text = tokenizer.apply_chat_template(
162
+ messages,
163
+ tokenize=False,
164
+ add_generation_prompt=True,
165
+ )
166
+
167
+
168
+ outputs = pipe(
169
+ messages,
170
+ max_new_tokens=300,
171
+ )
172
+ print(outputs[0]["generated_text"][-1])
173
+
174
+ ```
175
+
176
+ ## **Model Details**
177
+
178
+ **Input**: Text only.
179
+
180
+ **Output**: Model generates text.
181
+
182
+ **Model Architecture**: This is an auto-regressive language model that uses an optimized transformer architecture. After pretraining, this model uses supervised fine-tuning (SFT) and preference training to align model behavior to human preferences for helpfulness and safety. The model features three layers with sliding window attention (window size 4096\) and RoPE for efficient local context modeling and relative positional encoding. A fourth layer uses global attention without positional embeddings, enabling unrestricted token interactions across the entire sequence.
183
+
184
+ **Languages covered:** The model has been trained on 70+ languages, with a focus on: English, Dutch, French, Italian, Portuguese, Romanian, Spanish, Czech, Polish, Ukrainian, Russian, Greek, German, Danish, Swedish, Norwegian, Catalan, Galician, Welsh, Irish, Basque, Croatian, Latvian, Lithuanian, Slovak, Slovenian, Estonian, Finnish, Hungarian, Serbian, Bulgarian, Arabic, Persian, Urdu, Turkish, Maltese, Hebrew, Hindi, Marathi, Bengali, Gujarati, Punjabi, Tamil, Telugu, Nepali, Tagalog, Malay, Indonesian, Vietnamese, Javanese, Khmer, Thai, Lao, Chinese, Burmese, Japanese, Korean, Amharic, Hausa, Igbo, Malagasy, Shona, Swahili, Wolof, Xhosa, Yoruba, and Zulu
185
+
186
+ **Context Length:** Tiny Aya supports a context length of 8K & 8K output length.
187
+
188
+ ![Regional Performance Heatmap](./assets/tiny_aya_regional_heatmap_lightmode.png)
189
+
190
+ ![Performance Comparison](./assets/TinyAya_PlotB_v7_lightmode.png)
191
+
192
+ ## **Usage and Limitations**
193
+
194
+ ### **Intended Usage**
195
+
196
+ Tiny Aya is a family of massively multilingual small language models built to bring capable AI to languages that are often underserved by existing models. The models support languages across Indic, East and Southeast Asian, African, European, and Middle Eastern language families, with a deliberate emphasis on low-resource language performance.
197
+
198
+ Intended applications include multilingual text generation, conversational AI, summarization, translation and cross-lingual tasks, as well as research in multilingual NLP and low-resource language modeling. The models are also suited for efficient deployment in multilingual regions, helping bridge the digital language divide for underrepresented language communities.
199
+
200
+ ### **Strengths**
201
+
202
+ Tiny Aya demonstrates strong open-ended generation quality across its full language coverage, with particularly notable performance on low-resource languages. The model performs well on translation, summarization, and cross-lingual tasks, benefiting from training signal shared across language families and scripts.
203
+
204
+ ### **Limitations**
205
+
206
+ **Reasoning tasks.** The model's strongest performance is on open-ended generation and conversational tasks. Chain-of-thought reasoning tasks such as multilingual math (MGSM) are comparatively weaker.
207
+
208
+ **Factual knowledge.** As with any language model, outputs may contain incorrect or outdated statements, particularly in lower-resource languages with thinner training data coverage.
209
+
210
+ **Uneven resource distribution.** High-resource languages benefit from richer training signal and tend to exhibit more consistent quality across tasks. The lowest-resource languages in the model's coverage may show greater variability, and culturally specific nuance, sarcasm, or figurative language may be less reliably handled in these languages.
211
+
212
+ **Task complexity.** The model performs best with clear prompts and instructions. Highly complex or open-ended reasoning, particularly in lower-resource languages, remains challenging.
213
+
214
+ ## **Model Card Contact**
215
+
216
+ For errors or additional questions about details in this model card, contact \[labs@cohere.com\].
217
+
218
+ ## **Terms of Use:**
219
+
220
+ We hope that the release of this model will make community-based research efforts more accessible, by releasing the weights of a highly performant 111 billion parameter model to researchers all over the world. This model is governed by a [CC-BY-NC](https://cohere.com/c4ai-cc-by-nc-license) License (Non-Commercial) with an acceptable use addendum, *and also requires adhering to [Cohere Lab's Acceptable Use Policy](https://docs.cohere.com/docs/c4ai-acceptable-use-policy)*. If you are interested in commercial use, please contact [Cohere’s Sales team](https://cohere.com/contact-sales).
221
+
222
+ ## **Try it now:**
223
+
224
+ You can try Tiny Aya in our dedicated [Hugging Face Space](https://huggingface.co/spaces/CohereLabs/tiny-aya).