TheBloke commited on
Commit
f82dad8
1 Parent(s): dbba9a2

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +525 -0
README.md ADDED
@@ -0,0 +1,525 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: uukuguy/speechless-codellama-34b-v2.0
3
+ datasets:
4
+ - jondurbin/airoboros-2.2
5
+ - Open-Orca/OpenOrca
6
+ - garage-bAInd/Open-Platypus
7
+ - WizardLM/WizardLM_evol_instruct_V2_196k
8
+ inference: false
9
+ language:
10
+ - en
11
+ library_name: transformers
12
+ license: llama2
13
+ model-index:
14
+ - name: SpeechlessCoder
15
+ results:
16
+ - dataset:
17
+ name: HumanEval
18
+ type: openai_humaneval
19
+ metrics:
20
+ - name: pass@1
21
+ type: pass@1
22
+ value: 75.61
23
+ verified: false
24
+ task:
25
+ type: text-generation
26
+ model_creator: Jiangwen Su
27
+ model_name: Speechless Codellama 34B v2.0
28
+ model_type: llama
29
+ pipeline_tag: text-generation
30
+ prompt_template: '{prompt}
31
+
32
+ '
33
+ quantized_by: TheBloke
34
+ tags:
35
+ - llama-2
36
+ - code
37
+ ---
38
+
39
+ <!-- header start -->
40
+ <!-- 200823 -->
41
+ <div style="width: auto; margin-left: auto; margin-right: auto">
42
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
43
+ </div>
44
+ <div style="display: flex; justify-content: space-between; width: 100%;">
45
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
46
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
47
+ </div>
48
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
49
+ <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>
50
+ </div>
51
+ </div>
52
+ <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>
53
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
54
+ <!-- header end -->
55
+
56
+ # Speechless Codellama 34B v2.0 - GGUF
57
+ - Model creator: [Jiangwen Su](https://huggingface.co/uukuguy)
58
+ - Original model: [Speechless Codellama 34B v2.0](https://huggingface.co/uukuguy/speechless-codellama-34b-v2.0)
59
+
60
+ <!-- description start -->
61
+ ## Description
62
+
63
+ This repo contains GGUF format model files for [Jiangwen Su's Speechless Codellama 34B v2.0](https://huggingface.co/uukuguy/speechless-codellama-34b-v2.0).
64
+
65
+ <!-- description end -->
66
+ <!-- README_GGUF.md-about-gguf start -->
67
+ ### About GGUF
68
+
69
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
70
+
71
+ Here is an incomplate list of clients and libraries that are known to support GGUF:
72
+
73
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
74
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
75
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
76
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
77
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
78
+ * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
79
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
80
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
81
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
82
+
83
+ <!-- README_GGUF.md-about-gguf end -->
84
+ <!-- repositories-available start -->
85
+ ## Repositories available
86
+
87
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-AWQ)
88
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GPTQ)
89
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF)
90
+ * [Jiangwen Su's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/uukuguy/speechless-codellama-34b-v2.0)
91
+ <!-- repositories-available end -->
92
+
93
+ <!-- prompt-template start -->
94
+ ## Prompt template: None
95
+
96
+ ```
97
+ {prompt}
98
+
99
+ ```
100
+
101
+ <!-- prompt-template end -->
102
+
103
+
104
+ <!-- compatibility_gguf start -->
105
+ ## Compatibility
106
+
107
+ These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
108
+
109
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
110
+
111
+ ## Explanation of quantisation methods
112
+ <details>
113
+ <summary>Click to see details</summary>
114
+
115
+ The new methods available are:
116
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
117
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
118
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
119
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
120
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
121
+
122
+ Refer to the Provided Files table below to see what files use which methods, and how.
123
+ </details>
124
+ <!-- compatibility_gguf end -->
125
+
126
+ <!-- README_GGUF.md-provided-files start -->
127
+ ## Provided files
128
+
129
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
130
+ | ---- | ---- | ---- | ---- | ---- | ----- |
131
+ | [speechless-codellama-34b-v2.0.Q2_K.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q2_K.gguf) | Q2_K | 2 | 14.21 GB| 16.71 GB | smallest, significant quality loss - not recommended for most purposes |
132
+ | [speechless-codellama-34b-v2.0.Q3_K_S.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q3_K_S.gguf) | Q3_K_S | 3 | 14.61 GB| 17.11 GB | very small, high quality loss |
133
+ | [speechless-codellama-34b-v2.0.Q3_K_M.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q3_K_M.gguf) | Q3_K_M | 3 | 16.28 GB| 18.78 GB | very small, high quality loss |
134
+ | [speechless-codellama-34b-v2.0.Q3_K_L.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q3_K_L.gguf) | Q3_K_L | 3 | 17.77 GB| 20.27 GB | small, substantial quality loss |
135
+ | [speechless-codellama-34b-v2.0.Q4_0.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q4_0.gguf) | Q4_0 | 4 | 19.05 GB| 21.55 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
136
+ | [speechless-codellama-34b-v2.0.Q4_K_S.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q4_K_S.gguf) | Q4_K_S | 4 | 19.15 GB| 21.65 GB | small, greater quality loss |
137
+ | [speechless-codellama-34b-v2.0.Q4_K_M.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q4_K_M.gguf) | Q4_K_M | 4 | 20.22 GB| 22.72 GB | medium, balanced quality - recommended |
138
+ | [speechless-codellama-34b-v2.0.Q5_0.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q5_0.gguf) | Q5_0 | 5 | 23.24 GB| 25.74 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
139
+ | [speechless-codellama-34b-v2.0.Q5_K_S.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q5_K_S.gguf) | Q5_K_S | 5 | 23.24 GB| 25.74 GB | large, low quality loss - recommended |
140
+ | [speechless-codellama-34b-v2.0.Q5_K_M.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q5_K_M.gguf) | Q5_K_M | 5 | 23.84 GB| 26.34 GB | large, very low quality loss - recommended |
141
+ | [speechless-codellama-34b-v2.0.Q6_K.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q6_K.gguf) | Q6_K | 6 | 27.68 GB| 30.18 GB | very large, extremely low quality loss |
142
+ | [speechless-codellama-34b-v2.0.Q8_0.gguf](https://huggingface.co/TheBloke/speechless-codellama-34b-v2.0-GGUF/blob/main/speechless-codellama-34b-v2.0.Q8_0.gguf) | Q8_0 | 8 | 35.86 GB| 38.36 GB | very large, extremely low quality loss - not recommended |
143
+
144
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
145
+
146
+
147
+
148
+ <!-- README_GGUF.md-provided-files end -->
149
+
150
+ <!-- README_GGUF.md-how-to-download start -->
151
+ ## How to download GGUF files
152
+
153
+ **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file.
154
+
155
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
156
+ - LM Studio
157
+ - LoLLMS Web UI
158
+ - Faraday.dev
159
+
160
+ ### In `text-generation-webui`
161
+
162
+ Under Download Model, you can enter the model repo: TheBloke/speechless-codellama-34b-v2.0-GGUF and below it, a specific filename to download, such as: speechless-codellama-34b-v2.0.Q4_K_M.gguf.
163
+
164
+ Then click Download.
165
+
166
+ ### On the command line, including multiple files at once
167
+
168
+ I recommend using the `huggingface-hub` Python library:
169
+
170
+ ```shell
171
+ pip3 install huggingface-hub
172
+ ```
173
+
174
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
175
+
176
+ ```shell
177
+ huggingface-cli download TheBloke/speechless-codellama-34b-v2.0-GGUF speechless-codellama-34b-v2.0.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
178
+ ```
179
+
180
+ <details>
181
+ <summary>More advanced huggingface-cli download usage</summary>
182
+
183
+ You can also download multiple files at once with a pattern:
184
+
185
+ ```shell
186
+ huggingface-cli download TheBloke/speechless-codellama-34b-v2.0-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
187
+ ```
188
+
189
+ 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).
190
+
191
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
192
+
193
+ ```shell
194
+ pip3 install hf_transfer
195
+ ```
196
+
197
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
198
+
199
+ ```shell
200
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/speechless-codellama-34b-v2.0-GGUF speechless-codellama-34b-v2.0.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
201
+ ```
202
+
203
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
204
+ </details>
205
+ <!-- README_GGUF.md-how-to-download end -->
206
+
207
+ <!-- README_GGUF.md-how-to-run start -->
208
+ ## Example `llama.cpp` command
209
+
210
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
211
+
212
+ ```shell
213
+ ./main -ngl 32 -m speechless-codellama-34b-v2.0.Q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"
214
+ ```
215
+
216
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
217
+
218
+ Change `-c 4096` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically.
219
+
220
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
221
+
222
+ For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
223
+
224
+ ## How to run in `text-generation-webui`
225
+
226
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
227
+
228
+ ## How to run from Python code
229
+
230
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries.
231
+
232
+ ### How to load this model in Python code, using ctransformers
233
+
234
+ #### First install the package
235
+
236
+ Run one of the following commands, according to your system:
237
+
238
+ ```shell
239
+ # Base ctransformers with no GPU acceleration
240
+ pip install ctransformers
241
+ # Or with CUDA GPU acceleration
242
+ pip install ctransformers[cuda]
243
+ # Or with AMD ROCm GPU acceleration (Linux only)
244
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
245
+ # Or with Metal GPU acceleration for macOS systems only
246
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
247
+ ```
248
+
249
+ #### Simple ctransformers example code
250
+
251
+ ```python
252
+ from ctransformers import AutoModelForCausalLM
253
+
254
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
255
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/speechless-codellama-34b-v2.0-GGUF", model_file="speechless-codellama-34b-v2.0.Q4_K_M.gguf", model_type="llama", gpu_layers=50)
256
+
257
+ print(llm("AI is going to"))
258
+ ```
259
+
260
+ ## How to use with LangChain
261
+
262
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
263
+
264
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
265
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
266
+
267
+ <!-- README_GGUF.md-how-to-run end -->
268
+
269
+ <!-- footer start -->
270
+ <!-- 200823 -->
271
+ ## Discord
272
+
273
+ For further support, and discussions on these models and AI in general, join us at:
274
+
275
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
276
+
277
+ ## Thanks, and how to contribute
278
+
279
+ Thanks to the [chirper.ai](https://chirper.ai) team!
280
+
281
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
282
+
283
+ 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.
284
+
285
+ 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.
286
+
287
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
288
+
289
+ * Patreon: https://patreon.com/TheBlokeAI
290
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
291
+
292
+ **Special thanks to**: Aemon Algiz.
293
+
294
+ **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski
295
+
296
+
297
+ Thank you to all my generous patrons and donaters!
298
+
299
+ And thank you again to a16z for their generous grant.
300
+
301
+ <!-- footer end -->
302
+
303
+ <!-- original-model-card start -->
304
+ # Original model card: Jiangwen Su's Speechless Codellama 34B v2.0
305
+
306
+
307
+ <p><h1> speechless-codellama-34b-v2.0 </h1></p>
308
+
309
+ Use the following datasets to fine-tune codellama/CodeLlama-34B in order to improve the model's inference and planning capabilities.
310
+
311
+ Total 153,013 samples.
312
+ - jondurbin/airoboros-2.2: Filter categories related to coding, reasoning and planning. 23,462 samples.
313
+ - Open-Orca/OpenOrca: Filter the 'cot' category in 1M GPT4 dataset. 74,440 samples.
314
+ - garage-bAInd/Open-Platypus: 100%, 24,926 samples.
315
+ - WizardLM/WizardLM_evol_instruct_V2_196k: Coding coversation part. 30,185 samples
316
+
317
+
318
+
319
+
320
+
321
+ ## HumanEval
322
+
323
+ | human-eval | pass@1 |
324
+ | --- | --- |
325
+ | humaneval-python | 75.61 |
326
+
327
+ [Big Code Models Leaderboard](https://huggingface.co/spaces/bigcode/bigcode-models-leaderboard)
328
+
329
+ | Models | pass@1 |
330
+ |------ | ------ |
331
+ | Phind-CodeLlama-34B-v2| 71.95|
332
+ | WizardCoder-Python-34B-V1.0| 70.73|
333
+ | Phind-CodeLlama-34B-Python-v1| 70.22|
334
+ | Phind-CodeLlama-34B-v1| 65.85|
335
+ | WizardCoder-Python-13B-V1.0| 62.19|
336
+ | WizardCoder-15B-V1.0| 58.12|
337
+ | CodeLlama-34B-Python| 53.29|
338
+ | CodeLlama-34B-Instruct| 50.79|
339
+ | CodeLlama-13B-Instruct| 50.6|
340
+ | CodeLlama-34B| 45.11|
341
+ | CodeLlama-13B-Python| 42.89|
342
+ | CodeLlama-13B| 35.07|
343
+
344
+ ## NL2SQL
345
+
346
+ SQL-EVAL: 125/175 (71.43%)
347
+
348
+ Average rate of exact match: 67.43%
349
+
350
+ Average correct rate: 71.43%
351
+
352
+ - GPT4: 130/175 (74.29%)
353
+ - GPT3-Turbo-0613: 105/174 (60.00%)
354
+
355
+
356
+ ## lm-evaluation-harness
357
+
358
+ [Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
359
+ | Metric | Value |
360
+ | --- | --- |
361
+ | ARC | 54.35 |
362
+ | HellaSwag | 75.65 |
363
+ | MMLU | 54.67 |
364
+ | TruthfulQA | 45.21 |
365
+ | Average | 57.47 |
366
+
367
+
368
+ H800-80G x 2
369
+
370
+ transformers=4.33.0
371
+
372
+ flash-attn=2.1.0
373
+
374
+ bitsandbytes=0.41.1
375
+
376
+ peft=0.5.0
377
+
378
+ ## Training Arguments
379
+ | | |
380
+ |------ | ------ |
381
+ | lr | 2e-4 |
382
+ | lr_scheduler_type | cosine |
383
+ | weight_decay | 0.0 |
384
+ | optim | paged_adamw_8bit |
385
+ | flash_attention | True |
386
+ | rerope | False |
387
+ | max_new_tokens | 8192 |
388
+ | num_train_epochs | 3 |
389
+ | bits | 4 |
390
+ | lora_r | 64 |
391
+ | lora_alpha | 16 |
392
+ | lora_dropout | 0.05 |
393
+ | double_quant | True |
394
+ | quant_type | nf4 |
395
+ | dataset_format | airoboros |
396
+ | mini_batch_size | 4 |
397
+ | grandient_accumulation_steps | 16 |
398
+ | bf16 | True |
399
+
400
+
401
+ | | |
402
+ |------ | ------ |
403
+ | epoch | 3.0 |
404
+ | etrain_loss | 0.4261 |
405
+ | etrain_runtime | 1 day, 14:42:57.87 |
406
+ | etrain_samples_per_second | 3.227 |
407
+ | etrain_steps_per_second | 0.025 |
408
+ | eeval_loss | 0.4537 |
409
+ | eeval_runtime | 0:00:36.19 |
410
+ | eeval_samples_per_second | 5.525 |
411
+ | eeval_steps_per_second | 2.763 |
412
+
413
+
414
+ # **Code Llama**
415
+
416
+ Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This is the repository for the base 13B version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom.
417
+
418
+ | | Base Model | Python | Instruct |
419
+ | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
420
+ | 7B | [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) |
421
+ | 13B | [codellama/CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf) | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) |
422
+ | 34B | [codellama/CodeLlama-34b-hf](https://huggingface.co/codellama/CodeLlama-34b-hf) | [codellama/CodeLlama-34b-Python-hf](https://huggingface.co/codellama/CodeLlama-34b-Python-hf) | [codellama/CodeLlama-34b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) |
423
+
424
+
425
+ ## Model Use
426
+
427
+ To use this model, please make sure to install transformers from `main` until the next version is released:
428
+
429
+ ```bash
430
+ pip install git+https://github.com/huggingface/transformers.git@main accelerate
431
+ ```
432
+
433
+ Model capabilities:
434
+
435
+ - [x] Code completion.
436
+ - [x] Infilling.
437
+ - [ ] Instructions / chat.
438
+ - [ ] Python specialist.
439
+
440
+
441
+ ```python
442
+ from transformers import AutoTokenizer
443
+ import transformers
444
+ import torch
445
+
446
+ model = "codellama/CodeLlama-13b-hf"
447
+
448
+ tokenizer = AutoTokenizer.from_pretrained(model)
449
+ pipeline = transformers.pipeline(
450
+ "text-generation",
451
+ model=model,
452
+ torch_dtype=torch.float16,
453
+ device_map="auto",
454
+ )
455
+
456
+ sequences = pipeline(
457
+ 'import socket\n\ndef ping_exponential_backoff(host: str):',
458
+ do_sample=True,
459
+ top_k=10,
460
+ temperature=0.1,
461
+ top_p=0.95,
462
+ num_return_sequences=1,
463
+ eos_token_id=tokenizer.eos_token_id,
464
+ max_length=200,
465
+ )
466
+ for seq in sequences:
467
+ print(f"Result: {seq['generated_text']}")
468
+ ```
469
+
470
+
471
+ ## Model Details
472
+ *Note: Use of this model is governed by the Meta license. Meta developed and publicly released the Code Llama family of large language models (LLMs).
473
+
474
+ **Model Developers** Meta
475
+
476
+ **Variations** Code Llama comes in three model sizes, and three variants:
477
+
478
+ * Code Llama: base models designed for general code synthesis and understanding
479
+ * Code Llama - Python: designed specifically for Python
480
+ * Code Llama - Instruct: for instruction following and safer deployment
481
+
482
+ All variants are available in sizes of 7B, 13B and 34B parameters.
483
+
484
+ **This repository contains the base version of the 13B parameters model.**
485
+
486
+ **Input** Models input text only.
487
+
488
+ **Output** Models generate text only.
489
+
490
+ **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture.
491
+
492
+ **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
493
+
494
+ **Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released as we improve model safety with community feedback.
495
+
496
+ **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
497
+
498
+ **Research Paper** More information can be found in the paper "[Code Llama: Open Foundation Models for Code](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)" or its [arXiv page](https://arxiv.org/abs/2308.12950).
499
+
500
+ ## Intended Use
501
+ **Intended Use Cases** Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications.
502
+
503
+ **Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants.
504
+
505
+ ## Hardware and Software
506
+ **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
507
+
508
+ **Carbon Footprint** In aggregate, training all 9 Code Llama models required 400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 65.3 tCO2eq, 100% of which were offset by Meta’s sustainability program.
509
+
510
+ ## Training Data
511
+
512
+ All experiments reported here and the released models have been trained and fine-tuned using the same data as Llama 2 with different weights (see Section 2 and Table 1 in the [research paper](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/) for details).
513
+
514
+ ## Evaluation Results
515
+
516
+ See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
517
+
518
+
519
+ ## Ethical Considerations and Limitations
520
+
521
+ Code Llama and its variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model.
522
+
523
+ Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-user-guide](https://ai.meta.com/llama/responsible-user-guide).
524
+
525
+ <!-- original-model-card end -->