jieliu commited on
Commit
43ecab1
1 Parent(s): 77182e0

update readme

Browse files
Files changed (1) hide show
  1. README.md +95 -2
README.md CHANGED
@@ -1,3 +1,96 @@
1
- ---
 
2
  license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \---
2
+
3
  license: apache-2.0
4
+
5
+ \---
6
+
7
+ ### Storm-7B
8
+
9
+ > **Developed by**: [Jie Liu](https://jieliu.site/)$^{*1,2}$, [Zhanhui Zhou](https://scholar.google.com/citations?user=SbACfYQAAAAJ&hl=zh-CN)$^{*2}$, [Chao Yang](https://scholar.google.com/citations?user=5KRbHPMAAAAJ&hl=zh-CN)$^{2}$, [Han-Sen Zhong](https://scholar.google.com.hk/citations?user=X_ZfX8sAAAAJ&hl=zh-CN)$^{2}$, and [Wanli Ouyang](https://wlouyang.github.io/)$^{1,2}$.
10
+ >
11
+ > $^{1}$MMLab, The Chinese University of Hong Kong $^{2}$Shanghai AI Laboratory
12
+
13
+ #### Introduction
14
+
15
+ We released Storm-7B, the first open-source language model comparable to the GPT-4 series on the [AlpacaEval 2.0](https://tatsu-lab.github.io/alpaca_eval/) leaderboard, ranking 3rd in length-controlled win rate.
16
+
17
+ The recipe for this model is simple: 1) fine-tuning from [Openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106), 2) applying iterative DPO training, a variant of DPO where a language model iteratively learns from the preferences of the trained reward model. We will release our technical report and code as soon as possible.
18
+
19
+ A snapshot of the AlpacaEval 2.0 leaderboard (2024/4/28) is listed below:
20
+
21
+ | | **LC Win Rate** | **Win Rate** |
22
+ | :----------------------: | :-------------: | :----------: |
23
+ | GPT-4 Turbo (04/09) | 55.0% | 46.1% |
24
+ | GPT-4 Preview (11/06) | 50.0% | 50.0% |
25
+ | **Storm-7B** | 48.9% | 52.5% |
26
+ | Nanbeige Plus Chat v0.1 | 44.5% | 56.7% |
27
+ | Qwen1.5 110B Chat | 43.9% | 33.8% |
28
+ | Aligner 2B+Claude 3 Opus | 41.8% | 34.5% |
29
+ | Claude 3 Opus (02/29) | 40.5% | 29.1% |
30
+ | GPT-4 | 38.1% | 23.6% |
31
+ | openchat-3.5-0106 | 15.4% | 10.1% |
32
+
33
+ Please refer to the [leaderboard webpage](https://tatsu-lab.github.io/alpaca_eval/) for up-to-date results.
34
+
35
+ We also conducted preliminary evaluations on other benchmarks and observed no significant degradation.
36
+
37
+ | | ARC | HellaSwag | MMLU | TruthfulQA | Winogrande | Avg. |
38
+ | ----------------- | ----- | --------- | ----- | ---------- | ---------- | ----- |
39
+ | **Storm-7B** | 67.58 | 80.97 | 62.21 | 57.24 | 80.51 | 69.70 |
40
+ | openchat-3.5-0106 | 66.38 | 83.00 | 63.47 | 52.55 | 81.06 | 69.29 |
41
+ | internlm2-7b | 58.02 | 81.24 | 65.24 | 48.73 | 83.82 | 67.41 |
42
+ | gemma-7B | 61.09 | 82.20 | 64.56 | 44.79 | 79.01 | 66.33 |
43
+ | Yi-9B | 61.18 | 78.82 | 70.06 | 42.45 | 77.51 | 66.00 |
44
+ | Meta-Llama-3-8B | 59.47 | 82.09 | 66.69 | 43.90 | 77.35 | 65.90 |
45
+ | Mistral-7B-v0.1 | 59.98 | 83.31 | 64.16 | 42.15 | 78.37 | 65.59 |
46
+ | Qwen-7b | 51.37 | 78.47 | 59.84 | 47.79 | 72.69 | 62.03 |
47
+
48
+ #### Uses
49
+
50
+ Our model uses the same chat template as [Openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106). A sample code snippet for inference using our model is provided below.
51
+
52
+ ```python
53
+ from transformers import AutoModelForCausalLM, AutoTokenizer
54
+
55
+ device = "cuda"
56
+
57
+ model = AutoModelForCausalLM.from_pretrained("jieliu/Storm-7B").to(device)
58
+ tokenizer = AutoTokenizer.from_pretrained("jieliu/Storm-7B")
59
+ model.eval().requires_grad_(False)
60
+
61
+ def generate_response(prompt):
62
+ input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
63
+ outputs = model.generate(
64
+ input_ids,
65
+ max_length=2048,
66
+ do_sample=True,
67
+ temperature=1.0,
68
+ pad_token_id=tokenizer.pad_token_id,
69
+ eos_token_id=tokenizer.eos_token_id,
70
+ )
71
+ response_ids = outputs[0]
72
+ response_text = tokenizer.decode(response_ids, skip_special_tokens=True)
73
+ return response_text
74
+
75
+ prompt = "I'm trying to teach myself to have nicer handwriting. Can you help?"
76
+ input_prompt = f"GPT4 Correct User: {prompt}<|end_of_turn|>GPT4 Correct Assistant:"
77
+ response_text = generate_response(input_prompt)
78
+ print("Response:", response_text)
79
+ ```
80
+
81
+ #### Limitations
82
+
83
+ Storm-7B is a quick demonstration that a language model, fine-tuned with AI feedback, can easily surpass or match state-of-the-art models, as assessed by the same AI feedback. However, this improvement on the automatic leaderboard may not necessarily indicate better alignment with human intentions. Our model therefore represents a critical, preliminary reevaluation of the RLAIF paradigm, questioning how much learning from and being evaluated by AI feedback aligns with actual human preferences.
84
+
85
+ #### Citation
86
+
87
+ ```
88
+ @misc{liu2024storm,
89
+ title = {Storm-7B},
90
+ url = {},
91
+ author = {Jie Liu and Zhanhui Zhou and Chao Yang and Han-Sen Zhong and Wanli Ouyang},
92
+ month = {April},
93
+ year = {2024}
94
+ }
95
+ ```
96
+