munish0838 commited on
Commit
ceb959a
Β·
verified Β·
1 Parent(s): 08b9e79

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +151 -0
README.md ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ library_name: transformers
5
+ license: llama3.1
6
+ language:
7
+ - ko
8
+ - vi
9
+ - id
10
+ - km
11
+ - th
12
+ metrics:
13
+ - bleu
14
+ - rouge
15
+ base_model:
16
+ - meta-llama/Llama-3.1-8B-Instruct
17
+
18
+ ---
19
+
20
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
21
+
22
+
23
+ # QuantFactory/llama-3.1-Asian-Bllossom-8B-Translator-GGUF
24
+ This is quantized version of [MLP-KTLim/llama-3.1-Asian-Bllossom-8B-Translator](https://huggingface.co/MLP-KTLim/llama-3.1-Asian-Bllossom-8B-Translator) created using llama.cpp
25
+
26
+ # Original Model Card
27
+
28
+
29
+ # Model Card for Model ID
30
+
31
+ This model is a multilingual translation model fine-tuned on LLaMA 3.1 Instruct base model. It enables mutual translation between the following Southeast Asian languages:
32
+
33
+ - Korean
34
+ - Vietnamese
35
+ - Indonesian
36
+ - Cambodian (Khmer)
37
+ - Thai
38
+
39
+ ## Acknowledgements
40
+ AICA <img src="https://aica-gj.kr/images/logo.png" width="20%" height="20%">
41
+
42
+ ## Model Details
43
+ The model is designed for translating short text segments between any pair of the supported languages.
44
+
45
+ Supported language pairs:
46
+
47
+ - Korean ↔ Vietnamese
48
+ - Korean ↔ Indonesian
49
+ - Korean ↔ Cambodian
50
+ - Korean ↔ Thai
51
+ - Vietnamese ↔ Indonesian
52
+ - Vietnamese ↔ Cambodian
53
+ - Vietnamese ↔ Thai
54
+ - Indonesian ↔ Cambodian
55
+ - Indonesian ↔ Thai
56
+ - Cambodian ↔ Thai
57
+
58
+ ### Model Description
59
+
60
+ This model is specifically optimized for Southeast Asian language translation needs, focusing on enabling communication between these specific language communities.
61
+
62
+ The extensive training data of 20M examples (1M for each translation direction) provides a robust foundation for handling common expressions and basic conversations across these languages.
63
+
64
+ ### Model Architecture
65
+
66
+ Base Model: meta-llama/Llama-3.1-8B-Instruct
67
+
68
+
69
+ ## Bias, Risks, and Limitations
70
+
71
+ - Performance is limited to short sentences and phrases
72
+ - May not handle complex or lengthy text effectively
73
+ - Translation quality may vary depending on language pair and content complexity
74
+
75
+ ## Evaluation results
76
+
77
+ | Source Language | Target Language | BLEU Score | ROUGE-1 | ROUGE-L |
78
+ |----------------|-----------------|------------|---------|---------|
79
+ | Korean | Vietnamese | 56.70 | 81.64 | 76.66 |
80
+ | Korean | Cambodian | 71.69 | 89.26 | 88.20 |
81
+ | Korean | Indonesian | 58.32 | 80.39 | 76.63 |
82
+ | Korean | Thai | 63.26 | 78.88 | 72.29 |
83
+ | Vietnamese | Korean | 49.01 | 75.57 | 72.74 |
84
+ | Vietnamese | Cambodian | 78.26 | 90.74 | 90.32 |
85
+ | Vietnamese | Indonesian | 65.96 | 83.08 | 81.46 |
86
+ | Vietnamese | Thai | 65.93 | 81.09 | 76.57 |
87
+ | Cambodian | Korean | 49.10 | 72.67 | 69.75 |
88
+ | Cambodian | Vietnamese | 63.42 | 81.56 | 79.09 |
89
+ | Cambodian | Indonesian | 61.41 | 79.67 | 77.75 |
90
+ | Cambodian | Thai | 70.91 | 81.85 | 77.66 |
91
+ | Indonesian | Korean | 53.61 | 77.14 | 74.29 |
92
+ | Indonesian | Vietnamese | 68.21 | 85.41 | 83.10 |
93
+ | Indonesian | Cambodian | 78.84 | 90.81 | 90.35 |
94
+ | Indonesian | Thai | 67.12 | 81.54 | 77.19 |
95
+ | Thai | Korean | 45.59 | 72.48 | 69.46 |
96
+ | Thai | Vietnamese | 61.55 | 81.01 | 78.24 |
97
+ | Thai | Cambodian | 78.52 | 91.47 | 91.16 |
98
+ | Thai | Indonesian | 58.99 | 78.56 | 76.40 |
99
+
100
+ ## Example
101
+
102
+ ```py
103
+ from transformers import AutoModelForCausalLM, AutoTokenizer
104
+
105
+ model = AutoModelForCausalLM.from_pretrained(
106
+ "MLP-KTLim/llama-3.1-Asian-Bllossom-8B-Translator",
107
+ torch_dtype="auto",
108
+ device_map="auto",
109
+ )
110
+
111
+ tokenizer = AutoTokenizer.from_pretrained(
112
+ "MLP-KTLim/llama-3.1-Asian-Bllossom-8B-Translator",
113
+ )
114
+
115
+ input_text = "μ•ˆλ…•ν•˜μ„Έμš”? μ•„μ‹œμ•„ μ–Έμ–΄ λ²ˆμ—­ λͺ¨λΈ μž…λ‹ˆλ‹€."
116
+
117
+ def get_input_ids(source_lang, target_lang, message):
118
+ assert source_lang in ["Korean", "Vietnamese", "Indonesian", "Thai", "Cambodian"]
119
+ assert target_lang in ["Korean", "Vietnamese", "Indonesian", "Thai", "Cambodian"]
120
+
121
+ input_ids = tokenizer.apply_chat_template(
122
+ conversation=[
123
+ {"role": "system", "content": f"You are a useful translation AI. Please translate the sentence given in {source_lang} into {target_lang}."},
124
+ {"role": "user", "content": message},
125
+ ],
126
+ tokenize=True,
127
+ return_tensors="pt",
128
+ add_generation_prompt=True,
129
+ )
130
+ return input_ids
131
+
132
+ input_ids = get_input_ids(
133
+ source_lang="Korean",
134
+ target_lang="Vietnamese",
135
+ message=input_text,
136
+ )
137
+
138
+ output = model.generate(
139
+ input_ids.to(model.device),
140
+ max_new_tokens=128,
141
+ )
142
+
143
+ print(tokenizer.decode(output[0][len(input_ids[0]):], skip_special_tokens=True))
144
+ ```
145
+
146
+
147
+ ## Contributor
148
+ - μ›μΈν˜Έ (wih1226@seoultech.ac.kr)
149
+ - κΉ€λ―Όμ€€ (mjkmain@seoultech.ac.kr)
150
+
151
+