RichardErkhov
commited on
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
Mistral-7B-ReMax-v0.1 - GGUF
|
11 |
+
- Model creator: https://huggingface.co/ziniuli/
|
12 |
+
- Original model: https://huggingface.co/ziniuli/Mistral-7B-ReMax-v0.1/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [Mistral-7B-ReMax-v0.1.Q2_K.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q2_K.gguf) | Q2_K | 2.53GB |
|
18 |
+
| [Mistral-7B-ReMax-v0.1.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.IQ3_XS.gguf) | IQ3_XS | 2.81GB |
|
19 |
+
| [Mistral-7B-ReMax-v0.1.IQ3_S.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.IQ3_S.gguf) | IQ3_S | 2.96GB |
|
20 |
+
| [Mistral-7B-ReMax-v0.1.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q3_K_S.gguf) | Q3_K_S | 2.95GB |
|
21 |
+
| [Mistral-7B-ReMax-v0.1.IQ3_M.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.IQ3_M.gguf) | IQ3_M | 3.06GB |
|
22 |
+
| [Mistral-7B-ReMax-v0.1.Q3_K.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q3_K.gguf) | Q3_K | 3.28GB |
|
23 |
+
| [Mistral-7B-ReMax-v0.1.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q3_K_M.gguf) | Q3_K_M | 3.28GB |
|
24 |
+
| [Mistral-7B-ReMax-v0.1.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q3_K_L.gguf) | Q3_K_L | 3.56GB |
|
25 |
+
| [Mistral-7B-ReMax-v0.1.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.IQ4_XS.gguf) | IQ4_XS | 3.67GB |
|
26 |
+
| [Mistral-7B-ReMax-v0.1.Q4_0.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q4_0.gguf) | Q4_0 | 3.83GB |
|
27 |
+
| [Mistral-7B-ReMax-v0.1.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.IQ4_NL.gguf) | IQ4_NL | 3.87GB |
|
28 |
+
| [Mistral-7B-ReMax-v0.1.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q4_K_S.gguf) | Q4_K_S | 3.86GB |
|
29 |
+
| [Mistral-7B-ReMax-v0.1.Q4_K.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q4_K.gguf) | Q4_K | 4.07GB |
|
30 |
+
| [Mistral-7B-ReMax-v0.1.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q4_K_M.gguf) | Q4_K_M | 4.07GB |
|
31 |
+
| [Mistral-7B-ReMax-v0.1.Q4_1.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q4_1.gguf) | Q4_1 | 4.24GB |
|
32 |
+
| [Mistral-7B-ReMax-v0.1.Q5_0.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q5_0.gguf) | Q5_0 | 4.65GB |
|
33 |
+
| [Mistral-7B-ReMax-v0.1.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q5_K_S.gguf) | Q5_K_S | 4.65GB |
|
34 |
+
| [Mistral-7B-ReMax-v0.1.Q5_K.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q5_K.gguf) | Q5_K | 4.78GB |
|
35 |
+
| [Mistral-7B-ReMax-v0.1.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q5_K_M.gguf) | Q5_K_M | 4.78GB |
|
36 |
+
| [Mistral-7B-ReMax-v0.1.Q5_1.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q5_1.gguf) | Q5_1 | 5.07GB |
|
37 |
+
| [Mistral-7B-ReMax-v0.1.Q6_K.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q6_K.gguf) | Q6_K | 5.53GB |
|
38 |
+
| [Mistral-7B-ReMax-v0.1.Q8_0.gguf](https://huggingface.co/RichardErkhov/ziniuli_-_Mistral-7B-ReMax-v0.1-gguf/blob/main/Mistral-7B-ReMax-v0.1.Q8_0.gguf) | Q8_0 | 7.17GB |
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
Original model description:
|
44 |
+
---
|
45 |
+
language:
|
46 |
+
- en
|
47 |
+
license: apache-2.0
|
48 |
+
library_name: transformers
|
49 |
+
|
50 |
+
---
|
51 |
+
|
52 |
+
# Model Card for Mistral-7B-ReMax-v0.1
|
53 |
+
|
54 |
+
|
55 |
+
The Mistral-7B-ReMax-v0.1 Large Language Model (LLM) is a Reinforcement Learning from Human Preference (RLHF) fine-tuned version of [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2).
|
56 |
+
|
57 |
+
The fine-tuning algorithm is ReMax and please find algorithm details in the [paper](https://arxiv.org/abs/2310.10505).
|
58 |
+
|
59 |
+
## Model Details
|
60 |
+
|
61 |
+
- Developed by: Ziniu Li
|
62 |
+
- License: apache-2.0
|
63 |
+
- Finetuned from [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2)
|
64 |
+
|
65 |
+
## Uses
|
66 |
+
|
67 |
+
### Direct Use
|
68 |
+
|
69 |
+
The instruction format is the same as Mistral-7B-Instruct-v0.2. Specifically, the prompt should be surrounded by \[INST\] and \[/INST\] tokens.
|
70 |
+
|
71 |
+
```
|
72 |
+
text = "<s>[INST] What is your favourite condiment? [/INST]"
|
73 |
+
"Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!</s> "
|
74 |
+
"[INST] Do you have mayonnaise recipes? [/INST]"
|
75 |
+
```
|
76 |
+
|
77 |
+
|
78 |
+
## Training Details
|
79 |
+
|
80 |
+
### Training Data
|
81 |
+
|
82 |
+
10k prompts from the [lmsys-chat-1m](https://huggingface.co/datasets/lmsys/lmsys-chat-1m) dataset. Note that no responses from this dataset are used in training.
|
83 |
+
|
84 |
+
### Reward Model
|
85 |
+
|
86 |
+
The reward model is based on [UltraRM-13b](https://huggingface.co/openbmb/UltraRM-13b).
|
87 |
+
|
88 |
+
**Important**: UltraRM-13b uses a different instruction template with Mistral-7B. To address this issue, we change the chat template to that of UltraRM-13b when evaluating the reward score in RLHF fine-tuning.
|
89 |
+
|
90 |
+
|
91 |
+
### Training Procedure
|
92 |
+
|
93 |
+
The training algorithm is ReMax, whose details are available in the [paper](https://arxiv.org/abs/2310.10505), and implementations are available in the [repository](https://github.com/liziniu/ReMax).
|
94 |
+
|
95 |
+
|
96 |
+
### Training Hyperparameters
|
97 |
+
|
98 |
+
```
|
99 |
+
max_prompt_seq: 384
|
100 |
+
max_answer_seq: 384
|
101 |
+
learning_rate: 5e-7
|
102 |
+
num_train_epochs: 1
|
103 |
+
kl_penalty: full_step
|
104 |
+
kl_ctl: 0.1
|
105 |
+
reward_clip_value: 1.0
|
106 |
+
temperature for sampling: 0.7
|
107 |
+
top_p for sampling: 0.9
|
108 |
+
```
|
109 |
+
|
110 |
+
|
111 |
+
## Evaluation
|
112 |
+
|
113 |
+
|
114 |
+
### Chat1M
|
115 |
+
|
116 |
+
|
117 |
+
Since we fine-tune Mistral-7B-Instruct-v0.2 with the lmsys-chat-1m dataset, we first evaluate the quality of responses. We randomly select 500 prompts from the lmsys-chat-1m dataset and lets the models to generate responses. Then, we let GPT-4 to evaluate the binary win rate. The average win-rate of Mistral-7B-ReMax-v0.1 is 57.8%.
|
118 |
+
|
119 |
+
| | Mistral-7B-ReMax-v0.1 Wins | Mistral-7B-ReMax-v0.1 Wins |
|
120 |
+
| ------------------------ | -------------------------- | -------------------------- |
|
121 |
+
| Mistral-7B-Instruct-v0.2 | 289 | 211 |
|
122 |
+
|
123 |
+
Samples of responses are provided below.
|
124 |
+
|
125 |
+
```
|
126 |
+
==================Instruction================
|
127 |
+
你好
|
128 |
+
==================Mistral-7B-Instruct-v0.2================
|
129 |
+
你好!我是一位帮助您解答问题的机器人。如果您有任何问题,请告诉我,我会尽力回答。
|
130 |
+
|
131 |
+
你好(Hello)是中文语言中的一个常用词语,常用于问候或表示亲和,意思是“你好,你很好”。
|
132 |
+
|
133 |
+
在我帮助您之前,我想先问一下,您是否知道什么是机器学习?机器学习是人工智能领域中的一种技术,它允许计算机自动学习和改进其行为,以便从数据中提取出有价值的信息,并使计算机能够做出更智能的决策。
|
134 |
+
|
135 |
+
如果您已经熟悉机器学习,那么我可以帮助您深入探讨相关主题,如神经网络、支持向量机、决策树等。但是,如果您对机器学习不太熟悉,我可以简单地解释它的基本原理,以及它在现实生活中的应用。
|
136 |
+
|
137 |
+
请告诉我您的需求,我会尽力满足您的期望。
|
138 |
+
|
139 |
+
再次问候您:你好!
|
140 |
+
==================Mistral-7B-ReMax-v0.1================
|
141 |
+
好的,欢迎使用我的帮助!(Hello, welcome to use my help!)
|
142 |
+
|
143 |
+
是的,我可以以中文回答你的问题,或者帮你完成一些简单的任务。(Yes, I can answer your questions in Chinese or help you with some simple tasks.)
|
144 |
+
|
145 |
+
请问有什么特定的问题需要我帮忙呢?(What specific question do you need my help with?)
|
146 |
+
|
147 |
+
或者,你可以告诉我什么方面我可以提供帮助。(Or you can tell me which area I can provide help in.)
|
148 |
+
|
149 |
+
希望我能帮到你!(I hope I can help you!)
|
150 |
+
```
|
151 |
+
|
152 |
+
|
153 |
+
### AlpacaEval
|
154 |
+
|
155 |
+
[AlpacaEval](https://github.com/tatsu-lab/alpaca_eval) provides 805 test questions that the model has not been trained on. We provide the evaluation results below:
|
156 |
+
|
157 |
+
| | AlpacaEval | AlpacaEval 2 | Response Length |
|
158 |
+
| ------------------------ | ---------- | ------------ | --------------- |
|
159 |
+
| Mistral-7B-Instruct-v0.2 | 92.78 | 14.72 | 1676 |
|
160 |
+
| Mistral-7B-ReMax-v0.1 | 94.40 | 16.00 | 1478 |
|
161 |
+
| LLaMa2 Chat 7B | 71.37 | 4.96 | 1479 |
|
162 |
+
| LLaMa2 Chat 70B | 92.66 | 13.87 | 1790 |
|
163 |
+
| GPT-4 | 95.28 | 23.58 | 2049 |
|
164 |
+
|
165 |
+
Samples of responses are provided below
|
166 |
+
|
167 |
+
```
|
168 |
+
==================Instruction================
|
169 |
+
Marie is at the music store for a store day. She bought two $50 combos. Then, for $25 she bought two t-shirts for $5 each and five hoodies for $2 each. Then, she bought sneakers for $8 each. How much did she spend total?
|
170 |
+
==================Mistral-7B-Instruct-v0.2================
|
171 |
+
Marie bought 2 combos at $50 each, so that's $100. She bought 2 t-shirts at $5 each, which is $10. She bought 5 hoodies at $2 each, which is $10. The sneakers cost $8. So Marie spent a total of $118. ($100 + $10 + $8 = $118)
|
172 |
+
==================Mistral-7B-ReMax-v0.1================
|
173 |
+
Marie bought two combos at $50 each, so that's $100. She bought two t-shirts for $5 each, which totals $10. She bought five hoodies for $2 each, so that's $10. The sneakers cost $8.
|
174 |
+
|
175 |
+
So Marie spent $100 + $10 + $10 + $8 = $128 in total.
|
176 |
+
```
|
177 |
+
|
178 |
+
## Limitations
|
179 |
+
|
180 |
+
The Mistral-7B-ReMax-v0.1 model demonstrates that the optimization algorithm ReMax is effective. This model shares the same limitations as the Mistral-7B-Instruct-v0.2 model. In particular, it does not have any moderation mechanisms.
|
181 |
+
|
182 |
+
## Citation
|
183 |
+
|
184 |
+
|
185 |
+
**BibTeX:**
|
186 |
+
|
187 |
+
|
188 |
+
```
|
189 |
+
@article{li2023remax,
|
190 |
+
title={Remax: A simple, effective, and efficient method for aligning large language models},
|
191 |
+
author={Li, Ziniu and Xu, Tian and Zhang, Yushun and Yu, Yang and Sun, Ruoyu and Luo, Zhi-Quan},
|
192 |
+
journal={arXiv preprint arXiv:2310.10505},
|
193 |
+
year={2023}
|
194 |
+
}
|
195 |
+
```
|
196 |
+
|
197 |
+
|
198 |
+
|