Text Generation
Transformers
Safetensors
fuxitranyu
conversational
custom_code
hrsun15 commited on
Commit
e81641c
·
verified ·
1 Parent(s): 0627f3c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -3
README.md CHANGED
@@ -1,3 +1,56 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - openbmb/UltraFeedback
5
+ - HuggingFaceH4/ultrafeedback_binarized
6
+ ---
7
+
8
+ # Model Card for FuxiTranyu-8B-DPO
9
+
10
+ ## Model Summary
11
+
12
+ FuxiTranyu-8B is a completely open source large language model trained from scratch, with a specific focus on the multilinguality.
13
+ FuxiTranyu-8B was trained on 600B tokens with a much more smooth distribution across languages.
14
+
15
+ We cover 43 natural languages: Arabic, Bengali, Bulgarian, Burmese, Catalan, Chinese, Czech, Dutch, English, Filipino, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Italian, Japanese, Kazakh, Khmer, Korean, Kurdish, Kyrgyz, Lao, Malay, Persian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Tamil, Tajik, Thai, Turkish, Turkmen, Ukrainian, Urdu, Uzbek, and Vietnamese.
16
+ And also cover 16 programming languages: Java, JavaScript, Python, PHP, C, C++, C#, TypeScript, Go, SQL, Rust, Ruby, Scala, Lua, Assembly, and Visual Basic.
17
+
18
+ FuxiTranyu-8B-DPO is trained using DPO with the UltraFeedback dataset, based on the [FuxiTranyu-8B](https://huggingface.co/TJUNLP/FuxiTranyu-8B) model.
19
+
20
+ More details can be found at our technical report.
21
+
22
+ We also provide the instruction fine-tuned version at [here](https://huggingface.co/TJUNLP/FuxiTranyu-8B-SFT).
23
+ ## Usage
24
+ ```python
25
+ from transformers import AutoModelForCausalLM, AutoTokenizer
26
+
27
+ model_path = "TJUNLP/FuxiTranyu-8B-DPO"
28
+
29
+ tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
30
+
31
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", torch_dtype='auto', trust_remote_code=True)
32
+
33
+ messages = [{"role": "user", "content": "This is an input text:"}]
34
+ # format messages with the ChatML chat template
35
+ input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
36
+ # <|im_start|>user\nThis is an input text:<|im_end|>\n<|im_start|>assistant\n
37
+
38
+ output_ids = model.generate(input_ids, max_new_tokens=20)
39
+ response = tokenizer.decode(output_ids[0], skip_special_tokens=True)
40
+
41
+ print(response)
42
+
43
+ ```
44
+
45
+ ## Citation info
46
+
47
+ ```bibtex
48
+ @misc{FuxiTranyu8B,
49
+ title={FuxiTranyu: A Multilingual Large Language Model Trained with Balanced Data},
50
+ author={Haoran Sun, Renren Jin, Shaoyang Xu, Leiyu Pan, Supryadi, Menglong Cui, Jiangcun Du, Yikun Lei, Lei Yang, Ling Shi, Juesi Xiao, Shaolin Zhu, and Deyi Xiong},
51
+ year={2024},
52
+ eprint={2408},
53
+ archivePrefix={arXiv},
54
+ primaryClass={cs.CL}
55
+ }
56
+ ```