shenzhi-wang commited on
Commit
727b1b9
Β·
verified Β·
1 Parent(s): 1cead8e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +117 -3
README.md CHANGED
@@ -1,3 +1,117 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ base_model: Qwen/Qwen2.5-7B
6
+ language:
7
+ - en
8
+ - zh
9
+ ---
10
+
11
+
12
+ # Xwen-72B-Chat
13
+
14
+ <img src="Xwen-Cartoon.jpg" alt="Xwen-Cartoon" style="zoom:35%;" />
15
+
16
+ ## 1. Introduction
17
+
18
+ > [!IMPORTANT]
19
+ > If you enjoy our model, please **give it a star on our Hugging Face repo**. Your support means a lot to us. Thank you!
20
+
21
+
22
+ 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].
23
+
24
+ **πŸ† 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].
25
+
26
+ **πŸš€ 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.
27
+
28
+
29
+
30
+ ## 2. Usage
31
+
32
+ > [!CAUTION]
33
+ > 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.
34
+
35
+ > [!CAUTION]
36
+ > 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.
37
+
38
+ 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.
39
+
40
+ Here we provide a python script to demonstrate how to deploy our Xwen models to generate reponses:
41
+
42
+
43
+ ```python
44
+ from transformers import AutoModelForCausalLM, AutoTokenizer
45
+
46
+ model_name = "xwen-team/Xwen-72B-Chat" # Or "xwen-team/Xwen-7B-Chat" if you want to use the 7B model
47
+
48
+ model = AutoModelForCausalLM.from_pretrained(
49
+ model_name,
50
+ torch_dtype="auto",
51
+ device_map="auto"
52
+ )
53
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
54
+
55
+ prompt = "Give me a short introduction to large language models."
56
+ messages = [
57
+ {"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.
58
+ {"role": "user", "content": prompt}
59
+ ]
60
+ text = tokenizer.apply_chat_template(
61
+ messages,
62
+ tokenize=False,
63
+ add_generation_prompt=True
64
+ )
65
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
66
+
67
+ generated_ids = model.generate(
68
+ **model_inputs,
69
+ max_new_tokens=512
70
+ )
71
+ generated_ids = [
72
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
73
+ ]
74
+
75
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
76
+
77
+ print(response)
78
+ ```
79
+
80
+ ## 3. Evaluation Results
81
+
82
+ > [!CAUTION]
83
+ > Results on other benchmarks will be updated soon! 😊
84
+
85
+ πŸ”‘: Open-sourced
86
+ πŸ”’: Proprietary
87
+
88
+ ### 3.1 Arena-Hard-Auto
89
+ | | Score | 95% CIs |
90
+ | --------------------------------- | -------- | ----------- |
91
+ | **Xwen-72B-Chat** πŸ”‘ | **86.1** | (-1.5, 1.7) |
92
+ | Qwen2.5-72B-Chat πŸ”‘ | 63.3 | (-2.5, 2.3) |
93
+ | Athene-v2-Chat πŸ”‘ | 72.1 | (-2.5, 2.5) |
94
+ | Llama-3.1-Nemotron-70B-Instruct πŸ”‘ | 71.0 | (-2.8, 3.1) |
95
+ | Llama-3.1-405B-Instruct-FP8 πŸ”‘ | 67.1 | (-2.2, 2.8) |
96
+ | Claude-3-5-Sonnet-20241022 πŸ”’ | **86.4** | (-1.3, 1.3) |
97
+ | O1-Preview-2024-09-12 πŸ”’ | 81.7 | (-2.2, 2.1) |
98
+ | O1-Mini-2024-09-12 πŸ”’ | 79.3 | (-2.8, 2.3) |
99
+ | GPT-4-Turbo-2024-04-09 πŸ”’ | 74.3 | (-2.4, 2.4) |
100
+ | GPT-4-0125-Preview πŸ”’ | 73.6 | (-2.0, 2.0) |
101
+ | GPT-4o-2024-08-06 πŸ”’ | 71.1 | (-2.5, 2.0) |
102
+ | Yi-Lightning πŸ”’ | 66.9 | (-3.3, 2.7) |
103
+ | Yi-Large-Preview πŸ”’ | 65.1 | (-2.5, 2.5) |
104
+ | GLM-4-0520 πŸ”’ | 61.4 | (-2.6, 2.4) |
105
+
106
+
107
+
108
+
109
+ ## References
110
+
111
+ [1] Yang, An, et al. "Qwen2. 5 technical report." arXiv preprint arXiv:2412.15115 (2024).
112
+
113
+ [2] Li, Tianle, et al. "From Crowdsourced Data to High-Quality Benchmarks: Arena-Hard and BenchBuilder Pipeline." arXiv preprint arXiv:2406.11939 (2024).
114
+
115
+ [3] Zheng, Lianmin, et al. "Judging llm-as-a-judge with mt-bench and chatbot arena." Advances in Neural Information Processing Systems 36 (2023).
116
+
117
+ [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).