Qwen2.5-3B-Instruct-ko
Introduction
This model is an adaptation of the Qwen2.5-3B
model fine-tuned for the Korean language.
Compared to Qwen2.5-3B-Instruct
, it demonstrates improved performance on Korean benchmarks, leveraging techniques such as SFT
, Model Merging
, and iterative online DPO
.
You can easily test it using the code provided below. Special thanks to Alibaba for consistently providing excellent models!
Quickstart
Here provides a code snippet with apply_chat_template
to show you how to load the tokenizer and model and how to generate contents.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "tryumanshow/Qwen2.5-3B-Instruct-ko"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "LLM์ ๋ํด ๊ฐ๋จํ ์ค๋ช
ํด์ฃผ์ธ์."
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
Benchmark
model | ArenaHard | LogicKor | Kobest | Haerae | GSM8K-ko | Chinese text non-display rate |
---|---|---|---|---|---|---|
Qwen/Qwen2.5-3B-Instruct | 23.28 | 6.0476 | 59.03 | 53.25 | 46.85 | 92.4 |
tryumanshow/Qwen2.5-3B-Instruct-ko | 28.03 | 6.9643 | 63.72 | 51.79 | 50.57 | 94.9 |
GSM8K
from kuotient/gsm8k-koChinese text non-display rate
- A metric to measure the degree of code-mixing.
- Results measured from the top 1,000 entries of the CarrotAI/ko-instruction-dataset.
Key Highlights
This model was trained exclusively on private Korean datasets, resulting in a remarkable improvement in Korean instruction-following capabilities and human alignment performance.
Interestingly, despite focusing solely on Korean data, the model also demonstrated significant enhancements in English benchmarks, such as ArenaHard
.
Overall, performance across various tasks has improved, though there was a slight drop in haerae task.
Additionally, the training process partially resolved one of the longstanding issues in Qwen-2.5
series: the problem of code-mixing.
Limitation
One notable limitation is that the exclusive focus on natural language training has resulted in a decline in tool-calling performance. Addressing this issue will be a priority for future improvements to ensure a more well-rounded and versatile model.
Citation
@misc{qwen2.5,
title = {Qwen2.5: A Party of Foundation Models},
url = {https://qwenlm.github.io/blog/qwen2.5/},
author = {Qwen Team},
month = {September},
year = {2024}
}
@article{qwen2,
title={Qwen2 Technical Report},
author={An Yang and Baosong Yang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Zhou and Chengpeng Li and Chengyuan Li and Dayiheng Liu and Fei Huang and Guanting Dong and Haoran Wei and Huan Lin and Jialong Tang and Jialin Wang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Ma and Jin Xu and Jingren Zhou and Jinze Bai and Jinzheng He and Junyang Lin and Kai Dang and Keming Lu and Keqin Chen and Kexin Yang and Mei Li and Mingfeng Xue and Na Ni and Pei Zhang and Peng Wang and Ru Peng and Rui Men and Ruize Gao and Runji Lin and Shijie Wang and Shuai Bai and Sinan Tan and Tianhang Zhu and Tianhao Li and Tianyu Liu and Wenbin Ge and Xiaodong Deng and Xiaohuan Zhou and Xingzhang Ren and Xinyu Zhang and Xipin Wei and Xuancheng Ren and Yang Fan and Yang Yao and Yichang Zhang and Yu Wan and Yunfei Chu and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zhihao Fan},
journal={arXiv preprint arXiv:2407.10671},
year={2024}
}
- Downloads last month
- 26