RichardErkhov commited on
Commit
4a207ab
1 Parent(s): b756487

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +233 -0
README.md ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ MiniChat-1.5-3B - GGUF
11
+ - Model creator: https://huggingface.co/GeneZC/
12
+ - Original model: https://huggingface.co/GeneZC/MiniChat-1.5-3B/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [MiniChat-1.5-3B.Q2_K.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q2_K.gguf) | Q2_K | 1.09GB |
18
+ | [MiniChat-1.5-3B.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.IQ3_XS.gguf) | IQ3_XS | 1.21GB |
19
+ | [MiniChat-1.5-3B.IQ3_S.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.IQ3_S.gguf) | IQ3_S | 1.27GB |
20
+ | [MiniChat-1.5-3B.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q3_K_S.gguf) | Q3_K_S | 1.27GB |
21
+ | [MiniChat-1.5-3B.IQ3_M.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.IQ3_M.gguf) | IQ3_M | 1.33GB |
22
+ | [MiniChat-1.5-3B.Q3_K.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q3_K.gguf) | Q3_K | 1.4GB |
23
+ | [MiniChat-1.5-3B.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q3_K_M.gguf) | Q3_K_M | 1.4GB |
24
+ | [MiniChat-1.5-3B.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q3_K_L.gguf) | Q3_K_L | 1.52GB |
25
+ | [MiniChat-1.5-3B.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.IQ4_XS.gguf) | IQ4_XS | 1.55GB |
26
+ | [MiniChat-1.5-3B.Q4_0.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q4_0.gguf) | Q4_0 | 1.62GB |
27
+ | [MiniChat-1.5-3B.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.IQ4_NL.gguf) | IQ4_NL | 1.63GB |
28
+ | [MiniChat-1.5-3B.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q4_K_S.gguf) | Q4_K_S | 1.63GB |
29
+ | [MiniChat-1.5-3B.Q4_K.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q4_K.gguf) | Q4_K | 1.72GB |
30
+ | [MiniChat-1.5-3B.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q4_K_M.gguf) | Q4_K_M | 1.72GB |
31
+ | [MiniChat-1.5-3B.Q4_1.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q4_1.gguf) | Q4_1 | 1.79GB |
32
+ | [MiniChat-1.5-3B.Q5_0.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q5_0.gguf) | Q5_0 | 1.95GB |
33
+ | [MiniChat-1.5-3B.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q5_K_S.gguf) | Q5_K_S | 1.95GB |
34
+ | [MiniChat-1.5-3B.Q5_K.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q5_K.gguf) | Q5_K | 2.01GB |
35
+ | [MiniChat-1.5-3B.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q5_K_M.gguf) | Q5_K_M | 2.01GB |
36
+ | [MiniChat-1.5-3B.Q5_1.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q5_1.gguf) | Q5_1 | 2.12GB |
37
+ | [MiniChat-1.5-3B.Q6_K.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q6_K.gguf) | Q6_K | 2.31GB |
38
+ | [MiniChat-1.5-3B.Q8_0.gguf](https://huggingface.co/RichardErkhov/GeneZC_-_MiniChat-1.5-3B-gguf/blob/main/MiniChat-1.5-3B.Q8_0.gguf) | Q8_0 | 2.99GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ language:
46
+ - en
47
+ - zh
48
+ license: apache-2.0
49
+ library_name: transformers
50
+ widget:
51
+ - text: <s> [|User|] Hi 👋 </s>[|Assistant|]
52
+ model-index:
53
+ - name: MiniChat-1.5-3B
54
+ results:
55
+ - task:
56
+ type: text-generation
57
+ name: Text Generation
58
+ dataset:
59
+ name: AI2 Reasoning Challenge (25-Shot)
60
+ type: ai2_arc
61
+ config: ARC-Challenge
62
+ split: test
63
+ args:
64
+ num_few_shot: 25
65
+ metrics:
66
+ - type: acc_norm
67
+ value: 46.5
68
+ name: normalized accuracy
69
+ source:
70
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=GeneZC/MiniChat-1.5-3B
71
+ name: Open LLM Leaderboard
72
+ - task:
73
+ type: text-generation
74
+ name: Text Generation
75
+ dataset:
76
+ name: HellaSwag (10-Shot)
77
+ type: hellaswag
78
+ split: validation
79
+ args:
80
+ num_few_shot: 10
81
+ metrics:
82
+ - type: acc_norm
83
+ value: 68.28
84
+ name: normalized accuracy
85
+ source:
86
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=GeneZC/MiniChat-1.5-3B
87
+ name: Open LLM Leaderboard
88
+ - task:
89
+ type: text-generation
90
+ name: Text Generation
91
+ dataset:
92
+ name: MMLU (5-Shot)
93
+ type: cais/mmlu
94
+ config: all
95
+ split: test
96
+ args:
97
+ num_few_shot: 5
98
+ metrics:
99
+ - type: acc
100
+ value: 46.67
101
+ name: accuracy
102
+ source:
103
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=GeneZC/MiniChat-1.5-3B
104
+ name: Open LLM Leaderboard
105
+ - task:
106
+ type: text-generation
107
+ name: Text Generation
108
+ dataset:
109
+ name: TruthfulQA (0-shot)
110
+ type: truthful_qa
111
+ config: multiple_choice
112
+ split: validation
113
+ args:
114
+ num_few_shot: 0
115
+ metrics:
116
+ - type: mc2
117
+ value: 50.71
118
+ source:
119
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=GeneZC/MiniChat-1.5-3B
120
+ name: Open LLM Leaderboard
121
+ - task:
122
+ type: text-generation
123
+ name: Text Generation
124
+ dataset:
125
+ name: Winogrande (5-shot)
126
+ type: winogrande
127
+ config: winogrande_xl
128
+ split: validation
129
+ args:
130
+ num_few_shot: 5
131
+ metrics:
132
+ - type: acc
133
+ value: 65.04
134
+ name: accuracy
135
+ source:
136
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=GeneZC/MiniChat-1.5-3B
137
+ name: Open LLM Leaderboard
138
+ - task:
139
+ type: text-generation
140
+ name: Text Generation
141
+ dataset:
142
+ name: GSM8k (5-shot)
143
+ type: gsm8k
144
+ config: main
145
+ split: test
146
+ args:
147
+ num_few_shot: 5
148
+ metrics:
149
+ - type: acc
150
+ value: 24.18
151
+ name: accuracy
152
+ source:
153
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=GeneZC/MiniChat-1.5-3B
154
+ name: Open LLM Leaderboard
155
+ ---
156
+
157
+ ## MiniChat-1.5-3B
158
+
159
+ 📑 [arXiv](https://arxiv.org/abs/2311.07052) | 👻 [GitHub](https://github.com/GeneZC/MiniMA) | 🤗 [HuggingFace-MiniMA](https://huggingface.co/GeneZC/MiniMA-3B) | 🤗 [HuggingFace-MiniChat](https://huggingface.co/GeneZC/MiniChat-3B) | 🤗 [HuggingFace-MiniChat-1.5](https://huggingface.co/GeneZC/MiniChat-1.5-3B) | 🤖 [ModelScope-MiniMA](https://modelscope.cn/models/GeneZC/MiniMA-3B) | 🤖 [ModelScope-MiniChat](https://modelscope.cn/models/GeneZC/MiniChat-3B)
160
+
161
+ 🆕 **Updates from MiniChat-3B**:
162
+ - better data mixture;
163
+ - use of [NEFTune](https://arxiv.org/abs/2310.05914);
164
+ - use of [DPO](https://arxiv.org/abs/2305.18290).
165
+
166
+ ❗ Must comply with LICENSE of LLaMA2 since it is derived from LLaMA2.
167
+
168
+ A language model distilled and finetuned from an adapted version of LLaMA2-7B following "Towards the Law of Capacity Gap in Distilling Language Models".
169
+
170
+ Outperforming a wide range of 3B competitors in GPT4 evaluation and even competing with several 7B chat models.
171
+
172
+ <img src="./teaser_b.jpg" alt="teaser_b" width="687" />
173
+
174
+ The following is an example code snippet to use MiniChat-3B:
175
+
176
+ ```python
177
+ import torch
178
+
179
+ from transformers import AutoModelForCausalLM, AutoTokenizer
180
+
181
+ from conversation import get_default_conv_template
182
+
183
+ # MiniChat
184
+ tokenizer = AutoTokenizer.from_pretrained("GeneZC/MiniChat-3B", use_fast=False)
185
+ # GPU.
186
+ model = AutoModelForCausalLM.from_pretrained("GeneZC/MiniChat-3B", use_cache=True, device_map="auto", torch_dtype=torch.float16).eval()
187
+ # CPU.
188
+ # model = AutoModelForCausalLM.from_pretrained("GeneZC/MiniChat-3B", use_cache=True, device_map="cpu", torch_dtype=torch.float16).eval()
189
+
190
+ conv = get_default_conv_template("minichat")
191
+
192
+ question = "Implement a program to find the common elements in two arrays without using any extra data structures."
193
+ conv.append_message(conv.roles[0], question)
194
+ conv.append_message(conv.roles[1], None)
195
+ prompt = conv.get_prompt()
196
+ input_ids = tokenizer([prompt]).input_ids
197
+ output_ids = model.generate(
198
+ torch.as_tensor(input_ids).cuda(),
199
+ do_sample=True,
200
+ temperature=0.7,
201
+ max_new_tokens=1024,
202
+ )
203
+ output_ids = output_ids[0][len(input_ids[0]):]
204
+ output = tokenizer.decode(output_ids, skip_special_tokens=True).strip()
205
+ # output: "def common_elements(arr1, arr2):\n if len(arr1) == 0:\n return []\n if len(arr2) == 0:\n return arr1\n\n common_elements = []\n for element in arr1:\n if element in arr2:\n common_elements.append(element)\n\n return common_elements"
206
+ # Multiturn conversation could be realized by continuously appending questions to `conv`.
207
+ ```
208
+
209
+ ## Bibtex
210
+
211
+ ```bibtex
212
+ @article{zhang2023law,
213
+ title={Towards the Law of Capacity Gap in Distilling Language Models},
214
+ author={Zhang, Chen and Song, Dawei and Ye, Zheyu and Gao, Yan},
215
+ year={2023},
216
+ url={https://arxiv.org/abs/2311.07052}
217
+ }
218
+ ```
219
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
220
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_GeneZC__MiniChat-1.5-3B)
221
+
222
+ | Metric |Value|
223
+ |---------------------------------|----:|
224
+ |Avg. |50.23|
225
+ |AI2 Reasoning Challenge (25-Shot)|46.50|
226
+ |HellaSwag (10-Shot) |68.28|
227
+ |MMLU (5-Shot) |46.67|
228
+ |TruthfulQA (0-shot) |50.71|
229
+ |Winogrande (5-shot) |65.04|
230
+ |GSM8k (5-shot) |24.18|
231
+
232
+
233
+