Update README.md
#1
by
gpengzhi
- opened
README.md
CHANGED
@@ -1,61 +1,57 @@
|
|
1 |
---
|
2 |
-
license:
|
3 |
license_name: license
|
4 |
license_link: LICENSE
|
5 |
base_model:
|
6 |
- google/gemma-2-2b
|
7 |
pipeline_tag: translation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
# Model Card for GemmaX2-28
|
11 |
|
12 |
-
## Model
|
13 |
|
14 |
-
|
15 |
|
16 |
-
GemmaX2-28-2B-Pretrain is a language model that results from continual pretraining of Gemma2-2B on a mix of 56 billion tokens of monolingual and parallel data in 28 different languages โ Arabic, Bengali, Czech, German, English, Spanish, Persian, French, Hebrew, Hindi, Indonesian, Italian, Japanese, Khmer, Korean, Lao, Malay, Burmese, Dutch, polish, Portuguese, Russian, Thai, Tagalog, Turkish, Urdu, Vietnamese, Chinese.
|
17 |
-
|
18 |
-
GemmaX2-28-2B-v0.1 is the model version of GemmaX2-28-2B-Pretrain after SFT.
|
19 |
|
20 |
- **Developed by:** Xiaomi
|
21 |
-
- **Model type:**
|
22 |
-
- **
|
23 |
-
- **License:** gemma
|
24 |
-
|
25 |
-
### Model Source
|
26 |
-
|
27 |
-
- paper: [Multilingual Machine Translation with Open Large Language Models at Practical Scale: An Empirical Study](https://arxiv.org/pdf/2502.02481)
|
28 |
-
|
29 |
-
### Model Performance
|
30 |
-
|
31 |
-

|
32 |
-
|
33 |
-
## Limitations
|
34 |
-
|
35 |
-
GemmaX2-28-2B-v0.1 supports only the 28 most commonly used languages and does not guarantee powerful translation performance for other languages. Additionally, we will continue to improve GemmaX2-28-2B's translation performance, and future models will be release in due course.
|
36 |
-
|
37 |
|
38 |
|
39 |
-
##
|
40 |
|
41 |
-
|
42 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
43 |
|
44 |
-
model_id = "ModelSpace/GemmaX2-28-2B-Pretrain"
|
45 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
46 |
-
|
47 |
-
model = AutoModelForCausalLM.from_pretrained(model_id)
|
48 |
-
|
49 |
-
text = "Translate this from Chinese to English:\nChinese: ๆ็ฑๆบๅจ็ฟป่ฏ\nEnglish:"
|
50 |
-
inputs = tokenizer(text, return_tensors="pt")
|
51 |
-
|
52 |
-
outputs = model.generate(**inputs, max_new_tokens=50)
|
53 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
54 |
-
```
|
55 |
-
|
56 |
-
### Training Data
|
57 |
-
|
58 |
-
We collected monolingual data from [CulturaX](https://huggingface.co/datasets/uonlp/CulturaX) and [MADLAD-400](https://huggingface.co/datasets/allenai/MADLAD-400). For parallel data, we collected all Chinese-centric and English-centric parallel dataset from the [OPUS](https://opus.nlpl.eu/) collection up to Auguest 2024 and underwent a series of filtering processes, such as language detection, semantic duplication filtering, quality filtering, and more.
|
59 |
|
60 |
## Citation
|
61 |
|
@@ -69,4 +65,4 @@ We collected monolingual data from [CulturaX](https://huggingface.co/datasets/uo
|
|
69 |
primaryClass={cs.CL},
|
70 |
url={https://arxiv.org/abs/2502.02481},
|
71 |
}
|
72 |
-
```
|
|
|
1 |
---
|
2 |
+
license: gemma
|
3 |
license_name: license
|
4 |
license_link: LICENSE
|
5 |
base_model:
|
6 |
- google/gemma-2-2b
|
7 |
pipeline_tag: translation
|
8 |
+
language:
|
9 |
+
- ar
|
10 |
+
- bn
|
11 |
+
- cs
|
12 |
+
- de
|
13 |
+
- en
|
14 |
+
- es
|
15 |
+
- fa
|
16 |
+
- fr
|
17 |
+
- he
|
18 |
+
- hi
|
19 |
+
- id
|
20 |
+
- it
|
21 |
+
- ja
|
22 |
+
- km
|
23 |
+
- ko
|
24 |
+
- lo
|
25 |
+
- ms
|
26 |
+
- my
|
27 |
+
- nl
|
28 |
+
- pl
|
29 |
+
- pt
|
30 |
+
- ru
|
31 |
+
- th
|
32 |
+
- tl
|
33 |
+
- tr
|
34 |
+
- ur
|
35 |
+
- vi
|
36 |
+
- zh
|
37 |
+
library_name: transformers
|
38 |
---
|
39 |
|
|
|
40 |
|
41 |
+
## Model Description
|
42 |
|
43 |
+
GemmaX2-28-2B-Pretrain is a language model developed through continual pretraining of Gemma2-2B using a mix of 56 billion tokens from both monolingual and parallel data across 28 different languages. Please find more details in our paper: [Multilingual Machine Translation with Open Large Language Models at Practical Scale: An Empirical Study](https://arxiv.org/pdf/2502.02481).
|
44 |
|
|
|
|
|
|
|
45 |
|
46 |
- **Developed by:** Xiaomi
|
47 |
+
- **Model type:** GemmaX2-28-2B-Pretrain is obtained by continually pretraining Gemma2-2B on a large amount of monolingual and parallel data. Subsequently, GemmaX2-28-2B-v0.1 is derived through supervised finetuning on a small set of high-quality translation instruction data.
|
48 |
+
- **Languages:** Arabic, Bengali, Czech, German, English, Spanish, Persian, French, Hebrew, Hindi, Indonesian, Italian, Japanese, Khmer, Korean, Lao, Malay, Burmese, Dutch, Polish, Portuguese, Russian, Thai, Tagalog, Turkish, Urdu, Vietnamese, Chinese.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
|
51 |
+
## Training Data
|
52 |
|
53 |
+
We collect monolingual data from [CulturaX](https://huggingface.co/datasets/uonlp/CulturaX) and [MADLAD-400](https://huggingface.co/datasets/allenai/MADLAD-400). For parallel data, we collect all Chinese-centric and English-centric parallel datasets from the [OPUS](https://opus.nlpl.eu/) collection up to August 2024 and conduct a series of filtering processes, such as language identification, semantic duplication filtering, quality filtering, and more.
|
|
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
## Citation
|
57 |
|
|
|
65 |
primaryClass={cs.CL},
|
66 |
url={https://arxiv.org/abs/2502.02481},
|
67 |
}
|
68 |
+
```
|