TheBloke commited on
Commit
e7f0619
1 Parent(s): b324c81

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +434 -0
README.md ADDED
@@ -0,0 +1,434 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: codellama/CodeLlama-70b-hf
3
+ inference: false
4
+ language:
5
+ - code
6
+ license: llama2
7
+ model_creator: Code Llama
8
+ model_name: CodeLlama 70B
9
+ model_type: llama
10
+ pipeline_tag: text-generation
11
+ prompt_template: '{prompt}
12
+
13
+ '
14
+ quantized_by: TheBloke
15
+ tags:
16
+ - llama-2
17
+ ---
18
+ <!-- markdownlint-disable MD041 -->
19
+
20
+ <!-- header start -->
21
+ <!-- 200823 -->
22
+ <div style="width: auto; margin-left: auto; margin-right: auto">
23
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
24
+ </div>
25
+ <div style="display: flex; justify-content: space-between; width: 100%;">
26
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
27
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
28
+ </div>
29
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
30
+ <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>
31
+ </div>
32
+ </div>
33
+ <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>
34
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
35
+ <!-- header end -->
36
+
37
+ # CodeLlama 70B - GGUF
38
+ - Model creator: [Code Llama](https://huggingface.co/codellama)
39
+ - Original model: [CodeLlama 70B](https://huggingface.co/codellama/CodeLlama-70b-hf)
40
+
41
+ <!-- description start -->
42
+ ## Description
43
+
44
+ This repo contains GGUF format model files for [Code Llama's CodeLlama 70B](https://huggingface.co/codellama/CodeLlama-70b-hf).
45
+
46
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
47
+
48
+ <!-- description end -->
49
+ <!-- README_GGUF.md-about-gguf start -->
50
+ ### About GGUF
51
+
52
+ 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.
53
+
54
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
55
+
56
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
57
+ * [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.
58
+ * [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.
59
+ * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
60
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023.
61
+ * [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.
62
+ * [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.
63
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
64
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
65
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models.
66
+
67
+ <!-- README_GGUF.md-about-gguf end -->
68
+ <!-- repositories-available start -->
69
+ ## Repositories available
70
+
71
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/CodeLlama-70B-hf-AWQ)
72
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GPTQ)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF)
74
+ * [Code Llama's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/codellama/CodeLlama-70b-hf)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: None
79
+
80
+ ```
81
+ {prompt}
82
+
83
+ ```
84
+
85
+ <!-- prompt-template end -->
86
+
87
+
88
+ <!-- compatibility_gguf start -->
89
+ ## Compatibility
90
+
91
+ 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)
92
+
93
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
94
+
95
+ ## Explanation of quantisation methods
96
+
97
+ <details>
98
+ <summary>Click to see details</summary>
99
+
100
+ The new methods available are:
101
+
102
+ * 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)
103
+ * 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.
104
+ * 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.
105
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
106
+ * 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
107
+
108
+ Refer to the Provided Files table below to see what files use which methods, and how.
109
+ </details>
110
+ <!-- compatibility_gguf end -->
111
+
112
+ <!-- README_GGUF.md-provided-files start -->
113
+ ## Provided files
114
+
115
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
116
+ | ---- | ---- | ---- | ---- | ---- | ----- |
117
+ | [codellama-70b-hf.Q2_K.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q2_K.gguf) | Q2_K | 2 | 25.46 GB| 27.96 GB | significant quality loss - not recommended for most purposes |
118
+ | [codellama-70b-hf.Q3_K_S.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q3_K_S.gguf) | Q3_K_S | 3 | 29.92 GB| 32.42 GB | very small, high quality loss |
119
+ | [codellama-70b-hf.Q3_K_M.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q3_K_M.gguf) | Q3_K_M | 3 | 33.27 GB| 35.77 GB | very small, high quality loss |
120
+ | [codellama-70b-hf.Q3_K_L.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q3_K_L.gguf) | Q3_K_L | 3 | 36.15 GB| 38.65 GB | small, substantial quality loss |
121
+ | [codellama-70b-hf.Q4_0.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q4_0.gguf) | Q4_0 | 4 | 38.87 GB| 41.37 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
122
+ | [codellama-70b-hf.Q4_K_S.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q4_K_S.gguf) | Q4_K_S | 4 | 39.25 GB| 41.75 GB | small, greater quality loss |
123
+ | [codellama-70b-hf.Q4_K_M.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q4_K_M.gguf) | Q4_K_M | 4 | 41.42 GB| 43.92 GB | medium, balanced quality - recommended |
124
+ | [codellama-70b-hf.Q5_0.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q5_0.gguf) | Q5_0 | 5 | 47.46 GB| 49.96 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
125
+ | [codellama-70b-hf.Q5_K_S.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q5_K_S.gguf) | Q5_K_S | 5 | 47.46 GB| 49.96 GB | large, low quality loss - recommended |
126
+ | [codellama-70b-hf.Q5_K_M.gguf](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/blob/main/codellama-70b-hf.Q5_K_M.gguf) | Q5_K_M | 5 | 48.75 GB| 51.25 GB | large, very low quality loss - recommended |
127
+ | codellama-70b-hf.Q6_K.gguf | Q6_K | 6 | 56.59 GB| 59.09 GB | very large, extremely low quality loss |
128
+ | codellama-70b-hf.Q8_0.gguf | Q8_0 | 8 | 73.29 GB| 75.79 GB | very large, extremely low quality loss - not recommended |
129
+
130
+ **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.
131
+
132
+ ### Q6_K and Q8_0 files are split and require joining
133
+
134
+ **Note:** HF does not support uploading files larger than 50GB. Therefore I have uploaded the Q6_K and Q8_0 files as split files.
135
+
136
+ <details>
137
+ <summary>Click for instructions regarding Q6_K and Q8_0 files</summary>
138
+
139
+ ### q6_K
140
+ Please download:
141
+ * `codellama-70b-hf.Q6_K.gguf-split-a`
142
+ * `codellama-70b-hf.Q6_K.gguf-split-b`
143
+
144
+ ### q8_0
145
+ Please download:
146
+ * `codellama-70b-hf.Q8_0.gguf-split-a`
147
+ * `codellama-70b-hf.Q8_0.gguf-split-b`
148
+
149
+ To join the files, do the following:
150
+
151
+ Linux and macOS:
152
+ ```
153
+ cat codellama-70b-hf.Q6_K.gguf-split-* > codellama-70b-hf.Q6_K.gguf && rm codellama-70b-hf.Q6_K.gguf-split-*
154
+ cat codellama-70b-hf.Q8_0.gguf-split-* > codellama-70b-hf.Q8_0.gguf && rm codellama-70b-hf.Q8_0.gguf-split-*
155
+ ```
156
+ Windows command line:
157
+ ```
158
+ COPY /B codellama-70b-hf.Q6_K.gguf-split-a + codellama-70b-hf.Q6_K.gguf-split-b codellama-70b-hf.Q6_K.gguf
159
+ del codellama-70b-hf.Q6_K.gguf-split-a codellama-70b-hf.Q6_K.gguf-split-b
160
+
161
+ COPY /B codellama-70b-hf.Q8_0.gguf-split-a + codellama-70b-hf.Q8_0.gguf-split-b codellama-70b-hf.Q8_0.gguf
162
+ del codellama-70b-hf.Q8_0.gguf-split-a codellama-70b-hf.Q8_0.gguf-split-b
163
+ ```
164
+
165
+ </details>
166
+ <!-- README_GGUF.md-provided-files end -->
167
+
168
+ <!-- README_GGUF.md-how-to-download start -->
169
+ ## How to download GGUF files
170
+
171
+ **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.
172
+
173
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
174
+
175
+ * LM Studio
176
+ * LoLLMS Web UI
177
+ * Faraday.dev
178
+
179
+ ### In `text-generation-webui`
180
+
181
+ Under Download Model, you can enter the model repo: TheBloke/CodeLlama-70B-hf-GGUF and below it, a specific filename to download, such as: codellama-70b-hf.Q4_K_M.gguf.
182
+
183
+ Then click Download.
184
+
185
+ ### On the command line, including multiple files at once
186
+
187
+ I recommend using the `huggingface-hub` Python library:
188
+
189
+ ```shell
190
+ pip3 install huggingface-hub
191
+ ```
192
+
193
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
194
+
195
+ ```shell
196
+ huggingface-cli download TheBloke/CodeLlama-70B-hf-GGUF codellama-70b-hf.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
197
+ ```
198
+
199
+ <details>
200
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
201
+
202
+ You can also download multiple files at once with a pattern:
203
+
204
+ ```shell
205
+ huggingface-cli download TheBloke/CodeLlama-70B-hf-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
206
+ ```
207
+
208
+ 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).
209
+
210
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
211
+
212
+ ```shell
213
+ pip3 install hf_transfer
214
+ ```
215
+
216
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
217
+
218
+ ```shell
219
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/CodeLlama-70B-hf-GGUF codellama-70b-hf.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
220
+ ```
221
+
222
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
223
+ </details>
224
+ <!-- README_GGUF.md-how-to-download end -->
225
+
226
+ <!-- README_GGUF.md-how-to-run start -->
227
+ ## Example `llama.cpp` command
228
+
229
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
230
+
231
+ ```shell
232
+ ./main -ngl 35 -m codellama-70b-hf.Q4_K_M.gguf --color -c 16384 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"
233
+ ```
234
+
235
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
236
+
237
+ Change `-c 16384` 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. Note that longer sequence lengths require much more resources, so you may need to reduce this value.
238
+
239
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
240
+
241
+ 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)
242
+
243
+ ## How to run in `text-generation-webui`
244
+
245
+ Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp).
246
+
247
+ ## How to run from Python code
248
+
249
+ 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. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python.
250
+
251
+ ### How to load this model in Python code, using llama-cpp-python
252
+
253
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
254
+
255
+ #### First install the package
256
+
257
+ Run one of the following commands, according to your system:
258
+
259
+ ```shell
260
+ # Base ctransformers with no GPU acceleration
261
+ pip install llama-cpp-python
262
+ # With NVidia CUDA acceleration
263
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
264
+ # Or with OpenBLAS acceleration
265
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
266
+ # Or with CLBLast acceleration
267
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
268
+ # Or with AMD ROCm GPU acceleration (Linux only)
269
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
270
+ # Or with Metal GPU acceleration for macOS systems only
271
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
272
+
273
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
274
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
275
+ pip install llama-cpp-python
276
+ ```
277
+
278
+ #### Simple llama-cpp-python example code
279
+
280
+ ```python
281
+ from llama_cpp import Llama
282
+
283
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
284
+ llm = Llama(
285
+ model_path="./codellama-70b-hf.Q4_K_M.gguf", # Download the model file first
286
+ n_ctx=16384, # The max sequence length to use - note that longer sequence lengths require much more resources
287
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
288
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
289
+ )
290
+
291
+ # Simple inference example
292
+ output = llm(
293
+ "{prompt}", # Prompt
294
+ max_tokens=512, # Generate up to 512 tokens
295
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
296
+ echo=True # Whether to echo the prompt
297
+ )
298
+
299
+ # Chat Completion API
300
+
301
+ llm = Llama(model_path="./codellama-70b-hf.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
302
+ llm.create_chat_completion(
303
+ messages = [
304
+ {"role": "system", "content": "You are a story writing assistant."},
305
+ {
306
+ "role": "user",
307
+ "content": "Write a story about llamas."
308
+ }
309
+ ]
310
+ )
311
+ ```
312
+
313
+ ## How to use with LangChain
314
+
315
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
316
+
317
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
318
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
319
+
320
+ <!-- README_GGUF.md-how-to-run end -->
321
+
322
+ <!-- footer start -->
323
+ <!-- 200823 -->
324
+ ## Discord
325
+
326
+ For further support, and discussions on these models and AI in general, join us at:
327
+
328
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
329
+
330
+ ## Thanks, and how to contribute
331
+
332
+ Thanks to the [chirper.ai](https://chirper.ai) team!
333
+
334
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
335
+
336
+ 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.
337
+
338
+ 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.
339
+
340
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
341
+
342
+ * Patreon: https://patreon.com/TheBlokeAI
343
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
344
+
345
+ **Special thanks to**: Aemon Algiz.
346
+
347
+ **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
348
+
349
+
350
+ Thank you to all my generous patrons and donaters!
351
+
352
+ And thank you again to a16z for their generous grant.
353
+
354
+ <!-- footer end -->
355
+
356
+ <!-- original-model-card start -->
357
+ # Original model card: Code Llama's CodeLlama 70B
358
+
359
+ # **Code Llama**
360
+ Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the base 70B 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.
361
+
362
+ | | Base Model | Python | Instruct |
363
+ | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
364
+ | 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) |
365
+ | 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) |
366
+ | 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) |
367
+ | 70B | [codellama/CodeLlama-70b-hf](https://huggingface.co/codellama/CodeLlama-70b-hf) | [codellama/CodeLlama-70b-Python-hf](https://huggingface.co/codellama/CodeLlama-70b-Python-hf) | [codellama/CodeLlama-70b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-70b-Instruct-hf) |
368
+
369
+ ## Model Use
370
+
371
+ To use this model, please make sure to install `transformers`.
372
+
373
+ ```bash
374
+ pip install transformers accelerate
375
+ ```
376
+
377
+ Model capabilities:
378
+
379
+ - [x] Code completion.
380
+ - [ ] Infilling.
381
+ - [ ] Instructions / chat.
382
+ - [ ] Python specialist.
383
+
384
+ ## Model Details
385
+ *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).
386
+
387
+ **Model Developers** Meta
388
+
389
+ **Variations** Code Llama comes in four model sizes, and three variants:
390
+
391
+ * Code Llama: base models designed for general code synthesis and understanding
392
+ * Code Llama - Python: designed specifically for Python
393
+ * Code Llama - Instruct: for instruction following and safer deployment
394
+
395
+ All variants are available in sizes of 7B, 13B, 34B, and 70B parameters.
396
+
397
+ **This repository contains the base version of the 70B parameters model.**
398
+
399
+ **Input** Models input text only.
400
+
401
+ **Output** Models generate text only.
402
+
403
+ **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture. It was fine-tuned with up to 16k tokens and supports up to 100k tokens at inference time.
404
+
405
+ **Model Dates** Code Llama and its variants have been trained between January 2023 and January 2024.
406
+
407
+ **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.
408
+
409
+ **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/)
410
+
411
+ **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).
412
+
413
+ ## Intended Use
414
+ **Intended Use Cases** Code Llama and its variants are 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.
415
+
416
+ **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.
417
+
418
+ ## Hardware and Software
419
+ **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
420
+
421
+ **Carbon Footprint** In aggregate, training all 12 Code Llama models required 1400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 228.55 tCO2eq, 100% of which were offset by Meta’s sustainability program.
422
+
423
+
424
+ ## Evaluation Results
425
+
426
+ See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
427
+
428
+ ## Ethical Considerations and Limitations
429
+
430
+ 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.
431
+
432
+ Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-use-guide](https://ai.meta.com/llama/responsible-use-guide).
433
+
434
+ <!-- original-model-card end -->