sujitvasanth TheBloke commited on
Commit
82f727f
0 Parent(s):

Duplicate from TheBloke/openchat-3.5-0106-GPTQ

Browse files

Co-authored-by: Tom Jobbins <TheBloke@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,633 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: openchat/openchat-3.5-0106
3
+ inference: false
4
+ library_name: transformers
5
+ license: apache-2.0
6
+ model_creator: OpenChat
7
+ model_name: Openchat 3.5 0106
8
+ model_type: mistral
9
+ pipeline_tag: text-generation
10
+ prompt_template: 'GPT4 Correct User: {prompt}<|end_of_turn|>GPT4 Correct Assistant:
11
+
12
+ '
13
+ quantized_by: TheBloke
14
+ tags:
15
+ - openchat
16
+ - mistral
17
+ - C-RLFT
18
+ ---
19
+ <!-- markdownlint-disable MD041 -->
20
+
21
+ <!-- header start -->
22
+ <!-- 200823 -->
23
+ <div style="width: auto; margin-left: auto; margin-right: auto">
24
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
25
+ </div>
26
+ <div style="display: flex; justify-content: space-between; width: 100%;">
27
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
28
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
29
+ </div>
30
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
31
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
32
+ </div>
33
+ </div>
34
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
35
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
36
+ <!-- header end -->
37
+
38
+ # Openchat 3.5 0106 - GPTQ
39
+ - Model creator: [OpenChat](https://huggingface.co/openchat)
40
+ - Original model: [Openchat 3.5 0106](https://huggingface.co/openchat/openchat-3.5-0106)
41
+
42
+ <!-- description start -->
43
+ # Description
44
+
45
+ This repo contains GPTQ model files for [OpenChat's Openchat 3.5 0106](https://huggingface.co/openchat/openchat-3.5-0106).
46
+
47
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
48
+
49
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
50
+
51
+ <!-- description end -->
52
+ <!-- repositories-available start -->
53
+ ## Repositories available
54
+
55
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/openchat-3.5-0106-AWQ)
56
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ)
57
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/openchat-3.5-0106-GGUF)
58
+ * [OpenChat's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/openchat/openchat-3.5-0106)
59
+ <!-- repositories-available end -->
60
+
61
+ <!-- prompt-template start -->
62
+ ## Prompt template: OpenChat-Correct
63
+
64
+ ```
65
+ GPT4 Correct User: {prompt}<|end_of_turn|>GPT4 Correct Assistant:
66
+
67
+ ```
68
+
69
+ <!-- prompt-template end -->
70
+
71
+
72
+
73
+ <!-- README_GPTQ.md-compatible clients start -->
74
+ ## Known compatible clients / servers
75
+
76
+ GPTQ models are currently supported on Linux (NVidia/AMD) and Windows (NVidia only). macOS users: please use GGUF models.
77
+
78
+ These GPTQ models are known to work in the following inference servers/webuis.
79
+
80
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
81
+ - [KoboldAI United](https://github.com/henk717/koboldai)
82
+ - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
83
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
84
+
85
+ This may not be a complete list; if you know of others, please let me know!
86
+ <!-- README_GPTQ.md-compatible clients end -->
87
+
88
+ <!-- README_GPTQ.md-provided-files start -->
89
+ ## Provided files, and GPTQ parameters
90
+
91
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
92
+
93
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
94
+
95
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
96
+
97
+ <details>
98
+ <summary>Explanation of GPTQ parameters</summary>
99
+
100
+ - Bits: The bit size of the quantised model.
101
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
102
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
103
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
104
+ - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
105
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
106
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
107
+
108
+ </details>
109
+
110
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
111
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
112
+ | [main](https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 4.16 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
113
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 4.57 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
114
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 7.52 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
115
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 7.68 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
116
+ | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 8.17 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
117
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 4.30 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
118
+
119
+ <!-- README_GPTQ.md-provided-files end -->
120
+
121
+ <!-- README_GPTQ.md-download-from-branches start -->
122
+ ## How to download, including from branches
123
+
124
+ ### In text-generation-webui
125
+
126
+ To download from the `main` branch, enter `TheBloke/openchat-3.5-0106-GPTQ` in the "Download model" box.
127
+
128
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/openchat-3.5-0106-GPTQ:gptq-4bit-32g-actorder_True`
129
+
130
+ ### From the command line
131
+
132
+ I recommend using the `huggingface-hub` Python library:
133
+
134
+ ```shell
135
+ pip3 install huggingface-hub
136
+ ```
137
+
138
+ To download the `main` branch to a folder called `openchat-3.5-0106-GPTQ`:
139
+
140
+ ```shell
141
+ mkdir openchat-3.5-0106-GPTQ
142
+ huggingface-cli download TheBloke/openchat-3.5-0106-GPTQ --local-dir openchat-3.5-0106-GPTQ --local-dir-use-symlinks False
143
+ ```
144
+
145
+ To download from a different branch, add the `--revision` parameter:
146
+
147
+ ```shell
148
+ mkdir openchat-3.5-0106-GPTQ
149
+ huggingface-cli download TheBloke/openchat-3.5-0106-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir openchat-3.5-0106-GPTQ --local-dir-use-symlinks False
150
+ ```
151
+
152
+ <details>
153
+ <summary>More advanced huggingface-cli download usage</summary>
154
+
155
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
156
+
157
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
158
+
159
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
160
+
161
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
162
+
163
+ ```shell
164
+ pip3 install hf_transfer
165
+ ```
166
+
167
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
168
+
169
+ ```shell
170
+ mkdir openchat-3.5-0106-GPTQ
171
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/openchat-3.5-0106-GPTQ --local-dir openchat-3.5-0106-GPTQ --local-dir-use-symlinks False
172
+ ```
173
+
174
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
175
+ </details>
176
+
177
+ ### With `git` (**not** recommended)
178
+
179
+ To clone a specific branch with `git`, use a command like this:
180
+
181
+ ```shell
182
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/openchat-3.5-0106-GPTQ
183
+ ```
184
+
185
+ Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
186
+
187
+ <!-- README_GPTQ.md-download-from-branches end -->
188
+ <!-- README_GPTQ.md-text-generation-webui start -->
189
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
190
+
191
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
192
+
193
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
194
+
195
+ 1. Click the **Model tab**.
196
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/openchat-3.5-0106-GPTQ`.
197
+
198
+ - To download from a specific branch, enter for example `TheBloke/openchat-3.5-0106-GPTQ:gptq-4bit-32g-actorder_True`
199
+ - see Provided Files above for the list of branches for each option.
200
+
201
+ 3. Click **Download**.
202
+ 4. The model will start downloading. Once it's finished it will say "Done".
203
+ 5. In the top left, click the refresh icon next to **Model**.
204
+ 6. In the **Model** dropdown, choose the model you just downloaded: `openchat-3.5-0106-GPTQ`
205
+ 7. The model will automatically load, and is now ready for use!
206
+ 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
207
+
208
+ - Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
209
+
210
+ 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
211
+
212
+ <!-- README_GPTQ.md-text-generation-webui end -->
213
+
214
+ <!-- README_GPTQ.md-use-from-tgi start -->
215
+ ## Serving this model from Text Generation Inference (TGI)
216
+
217
+ It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
218
+
219
+ Example Docker parameters:
220
+
221
+ ```shell
222
+ --model-id TheBloke/openchat-3.5-0106-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
223
+ ```
224
+
225
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
226
+
227
+ ```shell
228
+ pip3 install huggingface-hub
229
+ ```
230
+
231
+ ```python
232
+ from huggingface_hub import InferenceClient
233
+
234
+ endpoint_url = "https://your-endpoint-url-here"
235
+
236
+ prompt = "Tell me about AI"
237
+ prompt_template=f'''GPT4 Correct User: {prompt}<|end_of_turn|>GPT4 Correct Assistant:
238
+ '''
239
+
240
+ client = InferenceClient(endpoint_url)
241
+ response = client.text_generation(
242
+ prompt_template,
243
+ max_new_tokens=128,
244
+ do_sample=True,
245
+ temperature=0.7,
246
+ top_p=0.95,
247
+ top_k=40,
248
+ repetition_penalty=1.1
249
+ )
250
+
251
+ print(f"Model output: {response}")
252
+ ```
253
+ <!-- README_GPTQ.md-use-from-tgi end -->
254
+ <!-- README_GPTQ.md-use-from-python start -->
255
+ ## Python code example: inference from this GPTQ model
256
+
257
+ ### Install the necessary packages
258
+
259
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
260
+
261
+ ```shell
262
+ pip3 install --upgrade transformers optimum
263
+ # If using PyTorch 2.1 + CUDA 12.x:
264
+ pip3 install --upgrade auto-gptq
265
+ # or, if using PyTorch 2.1 + CUDA 11.x:
266
+ pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
267
+ ```
268
+
269
+ If you are using PyTorch 2.0, you will need to install AutoGPTQ from source. Likewise if you have problems with the pre-built wheels, you should try building from source:
270
+
271
+ ```shell
272
+ pip3 uninstall -y auto-gptq
273
+ git clone https://github.com/PanQiWei/AutoGPTQ
274
+ cd AutoGPTQ
275
+ git checkout v0.5.1
276
+ pip3 install .
277
+ ```
278
+
279
+ ### Example Python code
280
+
281
+ ```python
282
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
283
+
284
+ model_name_or_path = "TheBloke/openchat-3.5-0106-GPTQ"
285
+ # To use a different branch, change revision
286
+ # For example: revision="gptq-4bit-32g-actorder_True"
287
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
288
+ device_map="auto",
289
+ trust_remote_code=False,
290
+ revision="main")
291
+
292
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
293
+
294
+ prompt = "Write a story about llamas"
295
+ system_message = "You are a story writing assistant"
296
+ prompt_template=f'''GPT4 Correct User: {prompt}<|end_of_turn|>GPT4 Correct Assistant:
297
+ '''
298
+
299
+ print("\n\n*** Generate:")
300
+
301
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
302
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
303
+ print(tokenizer.decode(output[0]))
304
+
305
+ # Inference can also be done using transformers' pipeline
306
+
307
+ print("*** Pipeline:")
308
+ pipe = pipeline(
309
+ "text-generation",
310
+ model=model,
311
+ tokenizer=tokenizer,
312
+ max_new_tokens=512,
313
+ do_sample=True,
314
+ temperature=0.7,
315
+ top_p=0.95,
316
+ top_k=40,
317
+ repetition_penalty=1.1
318
+ )
319
+
320
+ print(pipe(prompt_template)[0]['generated_text'])
321
+ ```
322
+ <!-- README_GPTQ.md-use-from-python end -->
323
+
324
+ <!-- README_GPTQ.md-compatibility start -->
325
+ ## Compatibility
326
+
327
+ The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
328
+
329
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama architecture models (including Mistral, Yi, DeepSeek, SOLAR, etc) in 4-bit. Please see the Provided Files table above for per-file compatibility.
330
+
331
+ For a list of clients/servers, please see "Known compatible clients / servers", above.
332
+ <!-- README_GPTQ.md-compatibility end -->
333
+
334
+ <!-- footer start -->
335
+ <!-- 200823 -->
336
+ ## Discord
337
+
338
+ For further support, and discussions on these models and AI in general, join us at:
339
+
340
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
341
+
342
+ ## Thanks, and how to contribute
343
+
344
+ Thanks to the [chirper.ai](https://chirper.ai) team!
345
+
346
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
347
+
348
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
349
+
350
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
351
+
352
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
353
+
354
+ * Patreon: https://patreon.com/TheBlokeAI
355
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
356
+
357
+ **Special thanks to**: Aemon Algiz.
358
+
359
+ **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
360
+
361
+
362
+ Thank you to all my generous patrons and donaters!
363
+
364
+ And thank you again to a16z for their generous grant.
365
+
366
+ <!-- footer end -->
367
+
368
+ # Original model card: OpenChat's Openchat 3.5 0106
369
+
370
+ <div align="center">
371
+ <img src="https://raw.githubusercontent.com/imoneoi/openchat/master/assets/logo_new.png" style="width: 65%">
372
+ <h1>Advancing Open-source Language Models with Mixed-Quality Data</h1>
373
+ </div>
374
+
375
+ <p align="center" style="margin-top: 0px;">
376
+ <a href="https://openchat.team">
377
+ <img src="https://github.com/alpayariyak/openchat/blob/master/assets/logo_nobg.png?raw=true" alt="OpenChat Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 10px; margin-top: 0px; margin-bottom: 0px;"/>
378
+ <span class="link-text" style=" margin-right: 5px;">Online Demo</span>
379
+ </a> |
380
+ <a href="https://github.com/imoneoi/openchat">
381
+ <img src="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png" alt="GitHub Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/>
382
+ <span class="link-text" style=" margin-right: 5px;">GitHub</span>
383
+ </a> |
384
+ <a href="https://arxiv.org/pdf/2309.11235.pdf">
385
+ <img src="https://github.com/alpayariyak/openchat/blob/master/assets/arxiv-logomark-small-square-border.png?raw=true" alt="ArXiv Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/>
386
+ <span class="link-text" style="margin-right: 5px;">Paper</span>
387
+ </a> |
388
+ <a href="https://discord.gg/pQjnXvNKHY">
389
+ <img src="https://cloud.githubusercontent.com/assets/6291467/26705903/96c2d66e-477c-11e7-9f4e-f3c0efe96c9a.png" alt="Discord Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/>
390
+ <span class="link-text">Discord</span>
391
+ </a>
392
+ </p>
393
+
394
+ <p align="center" style="margin-top: 0px;">
395
+ <span class="link-text" style=" margin-right: 0px; font-size: 0.8em">Sponsored by RunPod</span>
396
+ <img src="https://styles.redditmedia.com/t5_6075m3/styles/profileIcon_71syco7c5lt81.png?width=256&height=256&frame=1&auto=webp&crop=256:256,smart&s=24bd3c71dc11edc5d4f88d0cbc1da72ed7ae1969" alt="RunPod Logo" style="width:30px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/>
397
+ </p>
398
+
399
+ <div style="background-color: white; padding: 0.7em; border-radius: 0.5em; color: black; display: flex; flex-direction: column; justify-content: center; text-align: center; ont-size: 0.5em; border: 0.8em solid #864AF9;">
400
+ <a href="https://huggingface.co/openchat/openchat-3.5-0106" style="text-decoration: none; color: black;">
401
+ <span style="font-size: 1.7em; font-family: 'Helvetica'; letter-spacing: 0.1em; font-weight: bold; color: black;">OPENCHAT</span><span style="font-size: 1.8em; font-family: 'Helvetica'; color: #3c72db; ">3.5</span>
402
+ <span style="font-size: 1.0em; font-family: 'Helvetica'; color: white; background-color: #864AF9; vertical-align: top; border-radius: 6em; padding: 0.066em 0.4em; letter-spacing: 0.1em; font-weight: bold;">0106</span>
403
+ <span style="font-size: 0.85em; font-family: 'Helvetica'; color: black;">
404
+ <br> 🏆 The Overall Best Performing Open Source 7B Model 🏆
405
+ <br> 🤖 Outperforms <span style="font-weight: bold;">ChatGPT</span> (March) and <span style="font-weight: bold;">Grok-1</span> 🤖
406
+ <br> 🚀<span style="font-size: 1em; font-family: 'Helvetica'; color: black; font-weight: bold;">15</span>-point improvement in Coding over <span style="font-size: 0.9em;
407
+ font-family: 'Helvetica'; color: black; font-weight: bold;">OpenChat-3.5🚀</span>
408
+ <br><br><span style="font-size: 1em; font-family: 'Helvetica'; color: #3c72db; font-weight: bold;">New Features</span>
409
+ <br> 💡 2 Modes: Coding + Generalist, Mathematical Reasoning 💡
410
+ <br> 🧑‍⚖️ Experimental support for Evaluator and Feedback capabilities 🧑‍⚖️
411
+ </span>
412
+ </a>
413
+ </div>
414
+
415
+ <div style="display: flex; justify-content: center; align-items: center">
416
+ <img src="https://raw.githubusercontent.com/imoneoi/openchat/master/assets/openchat-bench-0106.png" style="width: 100%; border-radius: 1em">
417
+ </div>
418
+
419
+
420
+ <div>
421
+ <h3> Table of Contents</h3>
422
+ </div>
423
+
424
+ 1. [Usage](#usage)
425
+ 2. [Benchmarks](#benchmarks)
426
+ 3. [Limitations](#limitations)
427
+ 4. [License](#license)
428
+ 6. [Citation](#citation)
429
+ 7. [Acknowledgements](#acknowledgements)
430
+
431
+
432
+ <div align="center">
433
+ <h2> Usage </h2>
434
+ </div>
435
+
436
+ To use this model, we highly recommend installing the OpenChat package by following the [installation guide](https://github.com/imoneoi/openchat#installation) in our repository and using the OpenChat OpenAI-compatible API server by running the serving command from the table below. The server is optimized for high-throughput deployment using [vLLM](https://github.com/vllm-project/vllm) and can run on a consumer GPU with 24GB RAM. To enable tensor parallelism, append `--tensor-parallel-size N` to the serving command.
437
+
438
+ Once started, the server listens at `localhost:18888` for requests and is compatible with the [OpenAI ChatCompletion API specifications](https://platform.openai.com/docs/api-reference/chat). Please refer to the example request below for reference. Additionally, you can use the [OpenChat Web UI](https://github.com/imoneoi/openchat#web-ui) for a user-friendly experience.
439
+
440
+ If you want to deploy the server as an online service, you can use `--api-keys sk-KEY1 sk-KEY2 ...` to specify allowed API keys and `--disable-log-requests --disable-log-stats --log-file openchat.log` for logging only to a file. For security purposes, we recommend using an [HTTPS gateway](https://fastapi.tiangolo.com/es/deployment/concepts/#security-https) in front of the server.
441
+
442
+ | Model | Size | Context | Weights | Serving |
443
+ |-------------------|------|---------|------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
444
+ | OpenChat-3.5-0106 | 7B | 8192 | [Huggingface](https://huggingface.co/openchat/openchat-3.5-0106) | `python -m ochat.serving.openai_api_server --model openchat/openchat-3.5-0106 --engine-use-ray --worker-use-ray` |
445
+
446
+ <details>
447
+ <summary>Example request (click to expand)</summary>
448
+
449
+ 💡 **Default Mode (GPT4 Correct)**: Best for coding, chat and general tasks
450
+
451
+ ```bash
452
+ curl http://localhost:18888/v1/chat/completions \
453
+ -H "Content-Type: application/json" \
454
+ -d '{
455
+ "model": "openchat_3.5",
456
+ "messages": [{"role": "user", "content": "You are a large language model named OpenChat. Write a poem to describe yourself"}]
457
+ }'
458
+ ```
459
+
460
+ 🧮 **Mathematical Reasoning Mode**: Tailored for solving math problems
461
+
462
+ ```bash
463
+ curl http://localhost:18888/v1/chat/completions \
464
+ -H "Content-Type: application/json" \
465
+ -d '{
466
+ "model": "openchat_3.5",
467
+ "condition": "Math Correct",
468
+ "messages": [{"role": "user", "content": "10.3 − 7988.8133 = "}]
469
+ }'
470
+ ```
471
+
472
+ </details>
473
+
474
+ ### Conversation templates
475
+
476
+ 💡 **Default Mode (GPT4 Correct)**: Best for coding, chat and general tasks
477
+
478
+ ```
479
+ GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant: Hi<|end_of_turn|>GPT4 Correct User: How are you today?<|end_of_turn|>GPT4 Correct Assistant:
480
+ ```
481
+
482
+ 🧮 **Mathematical Reasoning Mode**: Tailored for solving math problems
483
+
484
+ ```
485
+ Math Correct User: 10.3 − 7988.8133=<|end_of_turn|>Math Correct Assistant:
486
+ ```
487
+
488
+ ⚠️ **Notice:** Remember to set `<|end_of_turn|>` as end of generation token.
489
+
490
+ The default (GPT4 Correct) template is also available as the integrated `tokenizer.chat_template`,
491
+ which can be used instead of manually specifying the template:
492
+
493
+ ```python
494
+ messages = [
495
+ {"role": "user", "content": "Hello"},
496
+ {"role": "assistant", "content": "Hi"},
497
+ {"role": "user", "content": "How are you today?"}
498
+ ]
499
+ tokens = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
500
+ assert tokens == [1, 420, 6316, 28781, 3198, 3123, 1247, 28747, 22557, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747, 15359, 32000, 420, 6316, 28781, 3198, 3123, 1247, 28747, 1602, 460, 368, 3154, 28804, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747]
501
+ ```
502
+
503
+ <div align="center">
504
+ <h2> (Experimental) Evaluator / Feedback Capabilities </h2>
505
+ </div>
506
+
507
+ We've included evaluator capabilities in this release to advance open-source models as evaluators. You can use `Default Mode (GPT4 Correct)` with the following prompt (same as [Prometheus](https://huggingface.co/datasets/kaist-ai/Feedback-Collection)) to evaluate a response.
508
+
509
+ ```
510
+ ###Task Description:
511
+ An instruction (might include an Input inside it), a response to evaluate, a reference answer that gets a score of 5, and a score rubric representing a evaluation criteria are given.
512
+ 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general.
513
+ 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric.
514
+ 3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)"
515
+ 4. Please do not generate any other opening, closing, and explanations.
516
+
517
+ ###The instruction to evaluate:
518
+ {orig_instruction}
519
+
520
+ ###Response to evaluate:
521
+ {orig_response}
522
+
523
+ ###Reference Answer (Score 5):
524
+ {orig_reference_answer}
525
+
526
+ ###Score Rubrics:
527
+ [{orig_criteria}]
528
+ Score 1: {orig_score1_description}
529
+ Score 2: {orig_score2_description}
530
+ Score 3: {orig_score3_description}
531
+ Score 4: {orig_score4_description}
532
+ Score 5: {orig_score5_description}
533
+
534
+ ###Feedback:
535
+ ```
536
+ <div align="center">
537
+ <h2> Benchmarks </h2>
538
+ </div>
539
+
540
+ | Model | # Params | Average | MT-Bench | HumanEval | BBH MC | AGIEval | TruthfulQA | MMLU | GSM8K | BBH CoT |
541
+ |-----------------------|----------|----------|----------|-----------|----------|----------|------------|----------|----------|----------|
542
+ | **OpenChat-3.5-0106** | **7B** | **64.5** | 7.8 | **71.3** | **51.5** | **49.1** | 61.0 | 65.8 | **77.4** | 62.2 |
543
+ | OpenChat-3.5-1210 | **7B** | 63.8 | 7.76 | 68.9 | 49.5 | 48.0 | **61.8** | 65.3 | 77.3 | 61.8 |
544
+ | OpenChat-3.5 | **7B** | 61.6 | 7.81 | 55.5 | 47.6 | 47.4 | 59.1 | 64.3 | 77.3 | 63.5 |
545
+ | ChatGPT (March)* | ???B | 61.5 | **7.94** | 48.1 | 47.6 | 47.1 | 57.7 | **67.3** | 74.9 | **70.1** |
546
+ | | | | | | | | | | | |
547
+ | OpenHermes 2.5 | 7B | 59.3 | 7.54 | 48.2 | 49.4 | 46.5 | 57.5 | 63.8 | 73.5 | 59.9 |
548
+ | OpenOrca Mistral | 7B | 52.7 | 6.86 | 38.4 | 49.4 | 42.9 | 45.9 | 59.3 | 59.1 | 58.1 |
549
+ | Zephyr-β^ | 7B | 34.6 | 7.34 | 22.0 | 40.6 | 39.0 | 40.8 | 39.8 | 5.1 | 16.0 |
550
+ | Mistral | 7B | - | 6.84 | 30.5 | 39.0 | 38.0 | - | 60.1 | 52.2 | - |
551
+
552
+ <details>
553
+ <summary>Evaluation Details(click to expand)</summary>
554
+
555
+ *: ChatGPT (March) results are from [GPT-4 Technical Report](https://arxiv.org/abs/2303.08774), [Chain-of-Thought Hub](https://github.com/FranxYao/chain-of-thought-hub), and our evaluation. Please note that ChatGPT is not a fixed baseline and evolves rapidly over time.
556
+
557
+ ^: Zephyr-β often fails to follow few-shot CoT instructions, likely because it was aligned with only chat data but not trained on few-shot data.
558
+
559
+ **: Mistral and Open-source SOTA results are taken from reported results in instruction-tuned model papers and official repositories.
560
+
561
+ All models are evaluated in chat mode (e.g. with the respective conversation template applied). All zero-shot benchmarks follow the same setting as in the AGIEval paper and Orca paper. CoT tasks use the same configuration as Chain-of-Thought Hub, HumanEval is evaluated with EvalPlus, and MT-bench is run using FastChat. To reproduce our results, follow the instructions in [our repository](https://github.com/imoneoi/openchat/#benchmarks).
562
+
563
+ </details>
564
+ <div>
565
+ <h3>HumanEval+</h3>
566
+ </div>
567
+
568
+ | Model | Size | HumanEval+ pass@1 |
569
+ |-----------------------------|--------|-------------------|
570
+ | **OpenChat-3.5-0106** | **7B** | **65.9** |
571
+ | ChatGPT (December 12, 2023) | ???B | 64.6 |
572
+ | WizardCoder-Python-34B-V1.0 | 34B | 64.6 |
573
+ | OpenChat 3.5 1210 | 7B | 63.4 |
574
+ | OpenHermes 2.5 | 7B | 41.5 |
575
+
576
+ <div>
577
+ <h3>OpenChat-3.5 vs. Grok</h3>
578
+ </div>
579
+
580
+ 🔥 OpenChat-3.5-0106 (7B) now outperforms Grok-0 (33B) on **all 4 benchmarks** and Grok-1 (???B) on average and **3/4 benchmarks**.
581
+
582
+ | | License | # Param | Average | MMLU | HumanEval | MATH | GSM8k |
583
+ |-----------------------|-------------|---------|----------|--------|-----------|----------|----------|
584
+ | **OpenChat-3.5-0106** | Apache-2.0 | **7B** | **61.0** | 65.8 | **71.3** | **29.3** | **77.4** |
585
+ | OpenChat-3.5-1210 | Apache-2.0 | **7B** | 60.1 | 65.3 | 68.9 | 28.9 | 77.3 |
586
+ | OpenChat-3.5 | Apache-2.0 | **7B** | 56.4 | 64.3 | 55.5 | 28.6 | 77.3 |
587
+ | Grok-0 | Proprietary | 33B | 44.5 | 65.7 | 39.7 | 15.7 | 56.8 |
588
+ | Grok-1 | Proprietary | ???B | 55.8 | **73** | 63.2 | 23.9 | 62.9 |
589
+
590
+ *: Grok results are reported by [X.AI](https://x.ai/).
591
+
592
+ <div align="center">
593
+ <h2> Limitations </h2>
594
+ </div>
595
+
596
+ **Foundation Model Limitations**
597
+ Despite its advanced capabilities, OpenChat is still bound by the limitations inherent in its foundation models. These limitations may impact the model's performance in areas such as:
598
+
599
+ - Complex reasoning
600
+ - Mathematical and arithmetic tasks
601
+ - Programming and coding challenges
602
+
603
+ **Hallucination of Non-existent Information**
604
+ OpenChat may sometimes generate information that does not exist or is not accurate, also known as "hallucination". Users should be aware of this possibility and verify any critical information obtained from the model.
605
+
606
+ **Safety**
607
+ OpenChat may sometimes generate harmful, hate speech, biased responses, or answer unsafe questions. It's crucial to apply additional AI safety measures in use cases that require safe and moderated responses.
608
+
609
+ <div align="center">
610
+ <h2> License </h2>
611
+ </div>
612
+
613
+ Our OpenChat 3.5 code and models are distributed under the Apache License 2.0.
614
+
615
+ <div align="center">
616
+ <h2> Citation </h2>
617
+ </div>
618
+
619
+ ```
620
+ @article{wang2023openchat,
621
+ title={OpenChat: Advancing Open-source Language Models with Mixed-Quality Data},
622
+ author={Wang, Guan and Cheng, Sijie and Zhan, Xianyuan and Li, Xiangang and Song, Sen and Liu, Yang},
623
+ journal={arXiv preprint arXiv:2309.11235},
624
+ year={2023}
625
+ }
626
+ ```
627
+
628
+ <div align="center">
629
+ <h2> 💌 Main Contributor </h2>
630
+ </div>
631
+
632
+ * Wang Guan [imonenext@gmail.com], Cheng Sijie [csj23@mails.tsinghua.edu.cn], Alpay Ariyak [aariyak@wpi.edu]
633
+ * We look forward to hearing you and collaborating on this exciting project!
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "<|end_of_turn|>": 32000,
3
+ "<|pad_0|>": 32001
4
+ }
config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/workspace/process/openchat_openchat-3.5-0106/source",
3
+ "architectures": [
4
+ "MistralForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 14336,
13
+ "max_position_embeddings": 8192,
14
+ "model_type": "mistral",
15
+ "num_attention_heads": 32,
16
+ "num_hidden_layers": 32,
17
+ "num_key_value_heads": 8,
18
+ "pad_token_id": 0,
19
+ "pretraining_tp": 1,
20
+ "rms_norm_eps": 1e-05,
21
+ "rope_theta": 10000.0,
22
+ "sliding_window": 4096,
23
+ "tie_word_embeddings": false,
24
+ "torch_dtype": "bfloat16",
25
+ "transformers_version": "4.37.0.dev0",
26
+ "use_cache": true,
27
+ "vocab_size": 32002,
28
+ "quantization_config": {
29
+ "bits": 4,
30
+ "group_size": 128,
31
+ "damp_percent": 0.1,
32
+ "desc_act": true,
33
+ "static_groups": false,
34
+ "sym": true,
35
+ "true_sequential": true,
36
+ "model_name_or_path": null,
37
+ "model_file_base_name": "model",
38
+ "quant_method": "gptq",
39
+ "modules_in_block_to_quantize": [
40
+ [
41
+ "self_attn.k_proj",
42
+ "self_attn.v_proj",
43
+ "self_attn.q_proj"
44
+ ],
45
+ [
46
+ "self_attn.o_proj"
47
+ ],
48
+ [
49
+ "mlp.up_proj",
50
+ "mlp.gate_proj"
51
+ ],
52
+ [
53
+ "mlp.down_proj"
54
+ ]
55
+ ]
56
+ }
57
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 32000,
5
+ "max_length": 8192,
6
+ "pad_token_id": 0,
7
+ "temperature": 0.5,
8
+ "transformers_version": "4.35.2"
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbae6e8ed18c58f458cadfb3a078afecd6d48a408d839768bf93c2de7a1f9468
3
+ size 4158695048
openchat.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"local_rank": 0, "model_path": "imone/Mistral_7B_with_EOT_token", "data_prefix": "", "save_path": "", "save_every": 1, "batch_max_len": 77824, "epochs": 5, "lr": 1.1179251066632773e-05, "lr_min_ratio": 0.1, "lr_warmup_ratio": 0.05, "weight_decay": 0.1, "beta1": 0.9, "beta2": 0.95, "eps": 1e-05, "deepspeed": true, "deepspeed_config": "ochat/training_deepspeed/deepspeed_config.json", "deepscale": false, "deepscale_config": null, "deepspeed_mpi": false, "model_type": "openchat_v3.2_mistral", "device": "<non-serializable>", "epoch": 2}
quantize_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "group_size": 128,
4
+ "damp_percent": 0.1,
5
+ "desc_act": true,
6
+ "static_groups": false,
7
+ "sym": true,
8
+ "true_sequential": true,
9
+ "model_name_or_path": null,
10
+ "model_file_base_name": "model"
11
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|end_of_turn|>",
4
+ "<|pad_0|>"
5
+ ],
6
+ "bos_token": {
7
+ "content": "<s>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "eos_token": {
14
+ "content": "</s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "unk_token": {
21
+ "content": "<unk>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ }
27
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
tokenizer_config.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "32000": {
30
+ "content": "<|end_of_turn|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "32001": {
38
+ "content": "<|pad_0|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ }
45
+ },
46
+ "additional_special_tokens": [
47
+ "<|end_of_turn|>",
48
+ "<|pad_0|>"
49
+ ],
50
+ "bos_token": "<s>",
51
+ "chat_template": "{{ bos_token }}{% for message in messages %}{{ 'GPT4 Correct ' + message['role'].title() + ': ' + message['content'] + '<|end_of_turn|>'}}{% endfor %}{% if add_generation_prompt %}{{ 'GPT4 Correct Assistant:' }}{% endif %}",
52
+ "clean_up_tokenization_spaces": false,
53
+ "eos_token": "</s>",
54
+ "legacy": true,
55
+ "model_max_length": 1000000000000000019884624838656,
56
+ "pad_token": null,
57
+ "sp_model_kwargs": {},
58
+ "spaces_between_special_tokens": false,
59
+ "tokenizer_class": "LlamaTokenizer",
60
+ "unk_token": "<unk>",
61
+ "use_default_system_prompt": true
62
+ }