TheBloke commited on
Commit
70c0e71
1 Parent(s): 2a3aa92

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +448 -0
README.md ADDED
@@ -0,0 +1,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: umd-zhou-lab/claude2-alpaca-13B
3
+ datasets:
4
+ - umd-zhou-lab/claude2_alpaca
5
+ inference: false
6
+ language:
7
+ - en
8
+ license: llama2
9
+ model_creator: Tianyi Lab @ UMD
10
+ model_name: Claude2 Alpaca 13B
11
+ model_type: llama
12
+ prompt_template: 'Below is an instruction that describes a task. Write a response
13
+ that appropriately completes the request.
14
+
15
+
16
+ ### Instruction:
17
+
18
+ {prompt}
19
+
20
+
21
+ ### Response:
22
+
23
+ '
24
+ quantized_by: TheBloke
25
+ ---
26
+ <!-- markdownlint-disable MD041 -->
27
+
28
+ <!-- header start -->
29
+ <!-- 200823 -->
30
+ <div style="width: auto; margin-left: auto; margin-right: auto">
31
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
32
+ </div>
33
+ <div style="display: flex; justify-content: space-between; width: 100%;">
34
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
35
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
36
+ </div>
37
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
38
+ <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>
39
+ </div>
40
+ </div>
41
+ <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>
42
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
43
+ <!-- header end -->
44
+
45
+ # Claude2 Alpaca 13B - GPTQ
46
+ - Model creator: [Tianyi Lab @ UMD](https://huggingface.co/umd-zhou-lab)
47
+ - Original model: [Claude2 Alpaca 13B](https://huggingface.co/umd-zhou-lab/claude2-alpaca-13B)
48
+
49
+ <!-- description start -->
50
+ ## Description
51
+
52
+ This repo contains GPTQ model files for [Tianyi Lab @ UMD's Claude2 Alpaca 13B](https://huggingface.co/umd-zhou-lab/claude2-alpaca-13B).
53
+
54
+ 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.
55
+
56
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
57
+
58
+ <!-- description end -->
59
+ <!-- repositories-available start -->
60
+ ## Repositories available
61
+
62
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/claude2-alpaca-13B-AWQ)
63
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ)
64
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/claude2-alpaca-13B-GGUF)
65
+ * [Tianyi Lab @ UMD's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/umd-zhou-lab/claude2-alpaca-13B)
66
+ <!-- repositories-available end -->
67
+
68
+ <!-- prompt-template start -->
69
+ ## Prompt template: Alpaca
70
+
71
+ ```
72
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
73
+
74
+ ### Instruction:
75
+ {prompt}
76
+
77
+ ### Response:
78
+
79
+ ```
80
+
81
+ <!-- prompt-template end -->
82
+
83
+
84
+
85
+ <!-- README_GPTQ.md-compatible clients start -->
86
+ ## Known compatible clients / servers
87
+
88
+ These GPTQ models are known to work in the following inference servers/webuis.
89
+
90
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
91
+ - [KoboldAI United](https://github.com/henk717/koboldai)
92
+ - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
93
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
94
+
95
+ This may not be a complete list; if you know of others, please let me know!
96
+ <!-- README_GPTQ.md-compatible clients end -->
97
+
98
+ <!-- README_GPTQ.md-provided-files start -->
99
+ ## Provided files, and GPTQ parameters
100
+
101
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
102
+
103
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
104
+
105
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
106
+
107
+ <details>
108
+ <summary>Explanation of GPTQ parameters</summary>
109
+
110
+ - Bits: The bit size of the quantised model.
111
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
112
+ - 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.
113
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
114
+ - 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).
115
+ - 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.
116
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
117
+
118
+ </details>
119
+
120
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
121
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
122
+ | [main](https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
123
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
124
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
125
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
126
+ | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 14.55 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
127
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
128
+
129
+ <!-- README_GPTQ.md-provided-files end -->
130
+
131
+ <!-- README_GPTQ.md-download-from-branches start -->
132
+ ## How to download, including from branches
133
+
134
+ ### In text-generation-webui
135
+
136
+ To download from the `main` branch, enter `TheBloke/claude2-alpaca-13B-GPTQ` in the "Download model" box.
137
+
138
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/claude2-alpaca-13B-GPTQ:gptq-4bit-32g-actorder_True`
139
+
140
+ ### From the command line
141
+
142
+ I recommend using the `huggingface-hub` Python library:
143
+
144
+ ```shell
145
+ pip3 install huggingface-hub
146
+ ```
147
+
148
+ To download the `main` branch to a folder called `claude2-alpaca-13B-GPTQ`:
149
+
150
+ ```shell
151
+ mkdir claude2-alpaca-13B-GPTQ
152
+ huggingface-cli download TheBloke/claude2-alpaca-13B-GPTQ --local-dir claude2-alpaca-13B-GPTQ --local-dir-use-symlinks False
153
+ ```
154
+
155
+ To download from a different branch, add the `--revision` parameter:
156
+
157
+ ```shell
158
+ mkdir claude2-alpaca-13B-GPTQ
159
+ huggingface-cli download TheBloke/claude2-alpaca-13B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir claude2-alpaca-13B-GPTQ --local-dir-use-symlinks False
160
+ ```
161
+
162
+ <details>
163
+ <summary>More advanced huggingface-cli download usage</summary>
164
+
165
+ 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.
166
+
167
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
168
+
169
+ 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).
170
+
171
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
172
+
173
+ ```shell
174
+ pip3 install hf_transfer
175
+ ```
176
+
177
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
178
+
179
+ ```shell
180
+ mkdir claude2-alpaca-13B-GPTQ
181
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/claude2-alpaca-13B-GPTQ --local-dir claude2-alpaca-13B-GPTQ --local-dir-use-symlinks False
182
+ ```
183
+
184
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
185
+ </details>
186
+
187
+ ### With `git` (**not** recommended)
188
+
189
+ To clone a specific branch with `git`, use a command like this:
190
+
191
+ ```shell
192
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/claude2-alpaca-13B-GPTQ
193
+ ```
194
+
195
+ 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.)
196
+
197
+ <!-- README_GPTQ.md-download-from-branches end -->
198
+ <!-- README_GPTQ.md-text-generation-webui start -->
199
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
200
+
201
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
202
+
203
+ 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.
204
+
205
+ 1. Click the **Model tab**.
206
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/claude2-alpaca-13B-GPTQ`.
207
+
208
+ - To download from a specific branch, enter for example `TheBloke/claude2-alpaca-13B-GPTQ:gptq-4bit-32g-actorder_True`
209
+ - see Provided Files above for the list of branches for each option.
210
+
211
+ 3. Click **Download**.
212
+ 4. The model will start downloading. Once it's finished it will say "Done".
213
+ 5. In the top left, click the refresh icon next to **Model**.
214
+ 6. In the **Model** dropdown, choose the model you just downloaded: `claude2-alpaca-13B-GPTQ`
215
+ 7. The model will automatically load, and is now ready for use!
216
+ 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.
217
+
218
+ - 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`.
219
+
220
+ 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
221
+
222
+ <!-- README_GPTQ.md-text-generation-webui end -->
223
+
224
+ <!-- README_GPTQ.md-use-from-tgi start -->
225
+ ## Serving this model from Text Generation Inference (TGI)
226
+
227
+ 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`
228
+
229
+ Example Docker parameters:
230
+
231
+ ```shell
232
+ --model-id TheBloke/claude2-alpaca-13B-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
233
+ ```
234
+
235
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
236
+
237
+ ```shell
238
+ pip3 install huggingface-hub
239
+ ```
240
+
241
+ ```python
242
+ from huggingface_hub import InferenceClient
243
+
244
+ endpoint_url = "https://your-endpoint-url-here"
245
+
246
+ prompt = "Tell me about AI"
247
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
248
+
249
+ ### Instruction:
250
+ {prompt}
251
+
252
+ ### Response:
253
+ '''
254
+
255
+ client = InferenceClient(endpoint_url)
256
+ response = client.text_generation(prompt,
257
+ max_new_tokens=128,
258
+ do_sample=True,
259
+ temperature=0.7,
260
+ top_p=0.95,
261
+ top_k=40,
262
+ repetition_penalty=1.1)
263
+
264
+ print(f"Model output: {response}")
265
+ ```
266
+ <!-- README_GPTQ.md-use-from-tgi end -->
267
+ <!-- README_GPTQ.md-use-from-python start -->
268
+ ## How to use this GPTQ model from Python code
269
+
270
+ ### Install the necessary packages
271
+
272
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
273
+
274
+ ```shell
275
+ pip3 install transformers optimum
276
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
277
+ ```
278
+
279
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
280
+
281
+ ```shell
282
+ pip3 uninstall -y auto-gptq
283
+ git clone https://github.com/PanQiWei/AutoGPTQ
284
+ cd AutoGPTQ
285
+ git checkout v0.4.2
286
+ pip3 install .
287
+ ```
288
+
289
+ ### You can then use the following code
290
+
291
+ ```python
292
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
293
+
294
+ model_name_or_path = "TheBloke/claude2-alpaca-13B-GPTQ"
295
+ # To use a different branch, change revision
296
+ # For example: revision="gptq-4bit-32g-actorder_True"
297
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
298
+ device_map="auto",
299
+ trust_remote_code=False,
300
+ revision="main")
301
+
302
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
303
+
304
+ prompt = "Tell me about AI"
305
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
306
+
307
+ ### Instruction:
308
+ {prompt}
309
+
310
+ ### Response:
311
+ '''
312
+
313
+ print("\n\n*** Generate:")
314
+
315
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
316
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
317
+ print(tokenizer.decode(output[0]))
318
+
319
+ # Inference can also be done using transformers' pipeline
320
+
321
+ print("*** Pipeline:")
322
+ pipe = pipeline(
323
+ "text-generation",
324
+ model=model,
325
+ tokenizer=tokenizer,
326
+ max_new_tokens=512,
327
+ do_sample=True,
328
+ temperature=0.7,
329
+ top_p=0.95,
330
+ top_k=40,
331
+ repetition_penalty=1.1
332
+ )
333
+
334
+ print(pipe(prompt_template)[0]['generated_text'])
335
+ ```
336
+ <!-- README_GPTQ.md-use-from-python end -->
337
+
338
+ <!-- README_GPTQ.md-compatibility start -->
339
+ ## Compatibility
340
+
341
+ The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
342
+
343
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama and Mistral models in 4-bit. Please see the Provided Files table above for per-file compatibility.
344
+
345
+ For a list of clients/servers, please see "Known compatible clients / servers", above.
346
+ <!-- README_GPTQ.md-compatibility end -->
347
+
348
+ <!-- footer start -->
349
+ <!-- 200823 -->
350
+ ## Discord
351
+
352
+ For further support, and discussions on these models and AI in general, join us at:
353
+
354
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
355
+
356
+ ## Thanks, and how to contribute
357
+
358
+ Thanks to the [chirper.ai](https://chirper.ai) team!
359
+
360
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
361
+
362
+ 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.
363
+
364
+ 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.
365
+
366
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
367
+
368
+ * Patreon: https://patreon.com/TheBlokeAI
369
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
370
+
371
+ **Special thanks to**: Aemon Algiz.
372
+
373
+ **Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
374
+
375
+
376
+ Thank you to all my generous patrons and donaters!
377
+
378
+ And thank you again to a16z for their generous grant.
379
+
380
+ <!-- footer end -->
381
+
382
+ # Original model card: Tianyi Lab @ UMD's Claude2 Alpaca 13B
383
+
384
+ # Model Card for umd-zhou-lab/claude2-alpaca-13B
385
+
386
+ <!-- Provide a quick summary of what the model is/does. -->
387
+
388
+ This model is trained by fine-tuning llama-2 with claude2 alpaca data.
389
+
390
+ ## Model Details
391
+
392
+ ### Model Description
393
+
394
+ <!-- Provide a longer summary of what this model is. -->
395
+
396
+
397
+ - **Developed by:** UMD Tianyi Zhou Lab
398
+ - **Model type:** An auto-regressive language model based on the transformer architecture
399
+ - **License:** Llama 2 Community License Agreement
400
+ - **Finetuned from model:** [meta-llama/Llama-2-13b](https://huggingface.co/meta-llama/Llama-2-13b)
401
+
402
+ ### Model Sources
403
+
404
+ <!-- Provide the basic links for the model. -->
405
+
406
+ - **GitHub:** [Claude2-Alpaca](https://github.com/Lichang-Chen/claude2-alpaca)
407
+ - **Data:** [claude2_alpaca](https://huggingface.co/datasets/umd-zhou-lab/claude2_alpaca)
408
+
409
+ ## Uses
410
+
411
+ The primary use of this model is research on large language models and chatbots.
412
+ The primary intended users of the model are researchers and hobbyists in natural language processing, machine learning, and artificial intelligence.
413
+
414
+ ## Training
415
+
416
+ We use the prompt from [Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca)
417
+
418
+
419
+ | Hyperparameter | Global Batch Size | Learning rate | Epochs | Max length | Weight decay |
420
+ | --- | ---: | ---: | ---: | ---: | ---: |
421
+ | Model (13B) | 128 | 1e-5 | 5 | 2048 | 0 |
422
+
423
+ ## Performance
424
+
425
+ Compared to the llama2-chat, our models can have better average performance.<br>
426
+
427
+ | | Average | ARC | HellaSwag | MMLU | TruthfulQA | Alpaca_Eval | Avg Length |
428
+ |---|---|---|---|---|---|---|---|
429
+ | Llama-2-7b-chat | 56.335 | 52.9 | 78.55 | 48.32 | 45.57 | 71.37 | 1479 |
430
+ | Llama-2-13b-chat | 59.935 | 59.04| 81.94 | 54.64 | 44.12 | 81.09 | 1513 |
431
+ |||||||||
432
+ | claude_alpaca-7b | 57.78 | 56.66 | 81.17 | 46.58 | 46.71 | 71.23 | 1066 |
433
+ | claude_alpaca-13b | 61.29 | 61.18 | 84.08 | 55.74 | 44.18 | 78.93 | 1127 |
434
+
435
+
436
+ ## Citation
437
+
438
+ Please consider citing our paper if you think our codes, data, or models are useful. Thank you!
439
+ ```
440
+ @misc{claude2-alpaca,
441
+ author = {Lichang Chen and Khalid Saifullah and Ming Li and Tianyi Zhou and Heng Huang},
442
+ title = {Claude2-Alpaca: Instruction tuning datasets distilled from claude},
443
+ year = {2023},
444
+ publisher = {GitHub},
445
+ journal = {GitHub repository},
446
+ howpublished = {\url{https://github.com/Lichang-Chen/claude2-alpaca}},
447
+ }
448
+ ```