QWEN2.5-7B-Bnk-7e is a multilingual translation model based on the QWEN 2.5 architecture with 7 billion parameters. It specializes in translating multiple languages to Korean and Uzbek.
The model is designed for translating text from various Asian and European languages to Korean and Uzbek. It can be used for tasks such as:
Please note that while the model strives for accuracy, it may not always produce perfect translations, especially for idiomatic expressions or highly context-dependent content.
The model was fine-tuned on a diverse dataset of parallel texts covering the supported languages. Evaluation was performed on held-out test sets for each language pair.
Fine-tuning was performed on the QWEN 2.5 7B base model using custom datasets for the specific language pairs.
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3model_name = "FINGU-AI/QWEN2.5-7B-Bnk-7e"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
6
7# Example usage
8source_text = "Hello, how are you?"
9source_lang = "en"
10target_lang = "ko" # or "uz" for Uzbek
11
12messages = [
13 {"role": "system", "content": f"""Translate {input_lang} to {output_lang} word by word correctly."""},
14 {"role": "user", "content": f"""{source_text}"""},
15 ]
16# Apply chat template
17input_ids = tokenizer.apply_chat_template(
18 messages,
19 add_generation_prompt=True,
20 return_tensors="pt"
21 ).to('cuda')
22
23outputs = model.generate(input_ids, max_length=100)
24response = outputs[0][input_ids.shape[-1]:]
25translated_text = tokenizer.decode(response, skip_special_tokens=True)
26print(translated_text)
1@misc{fingu2023qwen25,
2 author = {FINGU AI and AI Team},
3 title = {QWEN2.5-7B-Bnk-7e: A Multilingual Translation Model},
4 year = {2024},
5 publisher = {Hugging Face},
6 journal = {Hugging Face Model Hub},
7 howpublished = {\url{https://huggingface.co/FINGU-AI/QWEN2.5-7B-Bnk-7e}}
8}