shenzhi-wang commited on
Commit
ecf1e15
Β·
verified Β·
1 Parent(s): b6168a0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +111 -0
README.md CHANGED
@@ -7,3 +7,114 @@ language:
7
  - en
8
  - zh
9
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  - en
8
  - zh
9
  ---
10
+
11
+
12
+
13
+ # Xwen-7B-Chat
14
+
15
+ <img src="Xwen-Cartoon.jpg" alt="Xwen-Cartoon" style="zoom:35%;" />
16
+
17
+ ## 1. Introduction
18
+
19
+ > [!IMPORTANT]
20
+ > If you enjoy our model, please **give it a like on our Hugging Face repo**. Your support means a lot to us. Thank you!
21
+
22
+
23
+ Xwen is a series of open-sourced large language models (currently including **[Xwen-72B-Chat](https://huggingface.co/xwen-team/Xwen-72B-Chat)** and **[Xwen-7B-Chat](https://huggingface.co/xwen-team/Xwen-7B-Chat)**), post-trained from the pre-trained Qwen2.5 models (i.e., [Qwen2.5-72B](https://huggingface.co/Qwen/Qwen2.5-72B) and [Qwen2.5-7B](https://huggingface.co/Qwen/Qwen2.5-7B)) [1].
24
+
25
+ **πŸ† Top-1 chat performance!** To the best of our knowledge, at the time of Xwen models' release (February 1, 2025), **[Xwen-72B-Chat](https://huggingface.co/xwen-team/Xwen-72B-Chat) and [Xwen-7B-Chat](https://huggingface.co/xwen-team/Xwen-7B-Chat) exhibit the best chat performance among open-sourced models below 100B and 10B, respectively**, based on evaluation results from widely-used benchmarks such as Arena-Hard-Auto [2], MT-Bench [3], and AlignBench [4]. Please view details in the [Evaluation Results](https://huggingface.co/xwen-team/Xwen-72B-Chat#3-evaluation-results) part.
26
+
27
+ **πŸš€ Xwen technical report is on the way!** During the training of Xwen models, we have accumulated many technical insights and lessons. To promote the democratization of technology, we are in the process of documenting these insights and lessons in a technical report, which will be released as soon as possible.
28
+
29
+
30
+
31
+ ## 2. Usage
32
+
33
+ > [!CAUTION]
34
+ > For optimal performance, we refrain from fine-tuning the model's identity. Thus, inquiries such as "Who are you" or "Who developed you" may yield random responses that are not necessarily accurate.
35
+
36
+ > [!CAUTION]
37
+ > This open-source model is provided "as is," without warranties or liabilities, and users assume all risks associated with its use; users are advised to comply with local laws, and the model's outputs do not represent the views or positions of the developers.
38
+
39
+ The usage of our Xwen-Chat models is similar to that of the Qwen2.5-Instruct models, with the tokenizer and chat template being identical to those of the Qwen2.5-Instruct models.
40
+
41
+ Here we provide a python script to demonstrate how to deploy our Xwen models to generate reponses:
42
+
43
+
44
+ ```python
45
+ from transformers import AutoModelForCausalLM, AutoTokenizer
46
+
47
+ model_name = "xwen-team/Xwen-7B-Chat" # Or "xwen-team/Xwen-72B-Chat" if you want to use the 72B model
48
+
49
+ model = AutoModelForCausalLM.from_pretrained(
50
+ model_name,
51
+ torch_dtype="auto",
52
+ device_map="auto"
53
+ )
54
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
55
+
56
+ prompt = "Give me a short introduction to large language models."
57
+ messages = [
58
+ {"role": "system", "content": "You are Xwen, created by Xwen Team. You are a helpful assistant."}, # This system prompt is not necessary, and you can put it as an empty string.
59
+ {"role": "user", "content": prompt}
60
+ ]
61
+ text = tokenizer.apply_chat_template(
62
+ messages,
63
+ tokenize=False,
64
+ add_generation_prompt=True
65
+ )
66
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
67
+
68
+ generated_ids = model.generate(
69
+ **model_inputs,
70
+ max_new_tokens=512
71
+ )
72
+ generated_ids = [
73
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
74
+ ]
75
+
76
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
77
+
78
+ print(response)
79
+ ```
80
+
81
+ ## 3. Evaluation Results
82
+
83
+ > [!CAUTION]
84
+ > Results on other benchmarks will be updated soon! 😊
85
+
86
+ πŸ”‘: Open-sourced
87
+
88
+ πŸ”’: Proprietary
89
+
90
+ ### 3.1 Arena-Hard-Auto
91
+ | | Score | 95% CIs |
92
+ | --------------------------------- | -------- | ----------- |
93
+ | **Xwen-72B-Chat** πŸ”‘ | **86.1** | (-1.5, 1.7) |
94
+ | Qwen2.5-72B-Chat πŸ”‘ | 63.3 | (-2.5, 2.3) |
95
+ | Athene-v2-Chat πŸ”‘ | 72.1 | (-2.5, 2.5) |
96
+ | Llama-3.1-Nemotron-70B-Instruct πŸ”‘ | 71.0 | (-2.8, 3.1) |
97
+ | Llama-3.1-405B-Instruct-FP8 πŸ”‘ | 67.1 | (-2.2, 2.8) |
98
+ | Claude-3-5-Sonnet-20241022 πŸ”’ | **86.4** | (-1.3, 1.3) |
99
+ | O1-Preview-2024-09-12 πŸ”’ | 81.7 | (-2.2, 2.1) |
100
+ | O1-Mini-2024-09-12 πŸ”’ | 79.3 | (-2.8, 2.3) |
101
+ | GPT-4-Turbo-2024-04-09 πŸ”’ | 74.3 | (-2.4, 2.4) |
102
+ | GPT-4-0125-Preview πŸ”’ | 73.6 | (-2.0, 2.0) |
103
+ | GPT-4o-2024-08-06 πŸ”’ | 71.1 | (-2.5, 2.0) |
104
+ | Yi-Lightning πŸ”’ | 66.9 | (-3.3, 2.7) |
105
+ | Yi-Large-Preview πŸ”’ | 65.1 | (-2.5, 2.5) |
106
+ | GLM-4-0520 πŸ”’ | 61.4 | (-2.6, 2.4) |
107
+
108
+
109
+
110
+
111
+ ## References
112
+
113
+ [1] Yang, An, et al. "Qwen2. 5 technical report." arXiv preprint arXiv:2412.15115 (2024).
114
+
115
+ [2] Li, Tianle, et al. "From Crowdsourced Data to High-Quality Benchmarks: Arena-Hard and BenchBuilder Pipeline." arXiv preprint arXiv:2406.11939 (2024).
116
+
117
+ [3] Zheng, Lianmin, et al. "Judging llm-as-a-judge with mt-bench and chatbot arena." Advances in Neural Information Processing Systems 36 (2023).
118
+
119
+ [4] Liu, Xiao, et al. "Alignbench: Benchmarking chinese alignment of large language models." Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (2024).
120
+