๐ llama3-instrucTrans-enko-8b-GGUF
Quantized GGUF model files for seamless English-Korean translation
This repository provides quantized GGUF model files for llama3-instrucTrans-enko-8b created by nayohan. These files are optimized for efficient inference, enabling high-quality English to Korean translation.
โจ Features
- Multilingual Support: Supports both English (
en
) and Korean (ko
), facilitating seamless cross - language communication.
- Translation Capability: Specifically designed for English to Korean translation tasks, with high - quality generation results.
- Quantized for Efficiency: The GGUF format ensures efficient inference, making it suitable for various applications.
๐ฆ Installation
The model can be loaded using the transformers
library. Ensure you have the necessary dependencies installed:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "nayohan/llama3-instrucTrans-enko-8b"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
device_map="auto",
torch_dtype=torch.bfloat16
)
๐ป Usage Examples
Basic Usage
To translate text from English to Korean, use the following Python code:
system_prompt="๋น์ ์ ๋ฒ์ญ๊ธฐ ์
๋๋ค. ์์ด๋ฅผ ํ๊ตญ์ด๋ก ๋ฒ์ญํ์ธ์."
sentence = "The aerospace industry is a flower in the field of technology and science."
conversation = [{'role': 'system', 'content': system_prompt},
{'role': 'user', 'content': sentence}]
inputs = tokenizer.apply_chat_template(
conversation,
tokenize=True,
add_generation_prompt=True,
return_tensors='pt'
).to("cuda")
outputs = model.generate(inputs, max_new_tokens=4096)
print(tokenizer.decode(outputs[0][len(inputs[0]):]))
Example Results
# Result
INPUT: <|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n๋น์ ์ ๋ฒ์ญ๊ธฐ ์
๋๋ค. ์์ด๋ฅผ ํ๊ตญ์ด๋ก ๋ฒ์ญํ์ธ์.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nThe aerospace industry is a flower in the field of technology and science.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n
OUTPUT: ํญ๊ณต์ฐ์ฃผ ์ฐ์
์ ๊ธฐ์ ๊ณผ ๊ณผํ ๋ถ์ผ์ ๊ฝ์
๋๋ค.<|eot_id|>
INPUT: <|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n๋น์ ์ ๋ฒ์ญ๊ธฐ ์
๋๋ค. ์์ด๋ฅผ ํ๊ตญ์ด๋ก ๋ฒ์ญํ์ธ์.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n
Technical and basic sciences are very important in terms of research. It has a significant impact on the industrial development of a country. Government policies control the research budget.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n
OUTPUT: ๊ธฐ์ ๋ฐ ๊ธฐ์ด ๊ณผํ์ ์ฐ๊ตฌ ์ธก๋ฉด์์ ๋งค์ฐ ์ค์ํฉ๋๋ค. ์ด๋ ํ ๊ตญ๊ฐ์ ์ฐ์
๋ฐ์ ์ ํฐ ์ํฅ์ ๋ฏธ์นฉ๋๋ค. ์ ๋ถ ์ ์ฑ
์ ์ฐ๊ตฌ ์์ฐ์ ํต์ ํฉ๋๋ค.<|eot_id|>
๐ Documentation
Model Details
Evaluation
The model's performance was evaluated on multiple datasets:
Aihub English - Korean Translation Dataset Evaluation
model |
aihub-111 |
aihub-124 |
aihub-125 |
aihub-126 |
aihub-563 |
aihub-71265 |
aihub-71266 |
aihub-71382 |
average |
EEVE-10.8b-it |
6.15 |
11.81 |
5.78 |
4.99 |
6.31 |
10.99 |
9.41 |
6.44 |
7.73 |
KULLM3 |
9.00 |
13.49 |
10.43 |
5.90 |
1.92 |
16.37 |
10.02 |
8.39 |
9.44 |
Seagull-13B |
9.8 |
18.38 |
8.51 |
5.53 |
8.74 |
17.44 |
10.11 |
11.21 |
11.21 |
Synatra-7B |
6.99 |
25.14 |
7.79 |
5.31 |
9.95 |
19.27 |
13.20 |
8.93 |
12.07 |
nhndq-nllb |
24.09 |
48.71 |
22.89 |
13.98 |
18.71 |
30.18 |
32.49 |
18.62 |
26.20 |
our-tech |
20.19 |
37.48 |
18.50 |
12.45 |
16.96 |
13.92 |
43.54 |
9.62 |
21.58 |
our-general |
24.72 |
45.22 |
21.61 |
18.97 |
17.23 |
30.00 |
32.08 |
13.55 |
25.42 |
our-sharegpt |
12.42 |
19.23 |
10.91 |
9.18 |
14.30 |
26.43 |
12.62 |
15.57 |
15.08 |
our-instrucTrans |
24.89 |
47.00 |
22.78 |
21.78 |
24.27 |
27.98 |
31.31 |
15.42 |
26.92 |
FLoRes English - Korean Translation Dataset Evaluation
model |
flores-dev |
flores-devtest |
average |
EEVE-10.8b-it |
10.99 |
11.71 |
11.35 |
KULLM3 |
12.83 |
13.23 |
13.03 |
Seagull-13B |
11.48 |
11.99 |
11.73 |
Synatra-7B |
10.98 |
10.81 |
10.89 |
nhndq-nllb |
12.79 |
15.15 |
13.97 |
our-tech |
12.14 |
12.04 |
12.09 |
our-general |
14.93 |
14.58 |
14.75 |
our-sharegpt |
14.71 |
16.69 |
15.70 |
our-instrucTrans |
14.49 |
17.69 |
16.09 |
iwslt - 2023 Evaluation
model |
iwslt_zondae |
iwslt_banmal |
average |
EEVE-10.8b-it |
... |
... |
... |
... |
... |
... |
... |
๐ License
This model is released under the llama3
license. Please review the license terms before use.