LLaMAX is a language model with powerful multilingual capabilities without loss instruction-following capabilities.
We collected extensive training sets in 102 languages for continued pre-training of Llama2 and leveraged the English instruction fine-tuning dataset, Alpaca, to fine-tune its instruction-following capabilities.
🔥 Effortless Multilingual Translation with a Simple Prompt
LLaMAX supports translation between more than 100 languages, surpassing the performance of similarly scaled LLMs.
angular2html
1def Prompt_template(query, src_language, trg_language):
2 instruction = f'Translate the following sentences from {src_language} to {trg_language}.'
3 prompt = (
4 'Below is an instruction that describes a task, paired with an input that provides further context. '
5 'Write a response that appropriately completes the request.\n'
6 f'### Instruction:\n{instruction}\n'
7 f'### Input:\n{query}\n### Response:'
8 )
9 return prompt
And then run the following codes to execute translation:
If our model helps your work, please cite this paper:
@misc{lu2024llamaxscalinglinguistichorizons,
title={LLaMAX: Scaling Linguistic Horizons of LLM by Enhancing Translation Capabilities Beyond 100 Languages},
author={Yinquan Lu and Wenhao Zhu and Lei Li and Yu Qiao and Fei Yuan},
year={2024},
eprint={2407.05975},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2407.05975},
}