Initial GPTQ model commit
Browse files
README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
1 |
---
|
2 |
inference: false
|
|
|
|
|
3 |
license: llama2
|
4 |
model_creator: Meta
|
5 |
-
model_link: https://
|
6 |
model_name: CodeLlama 13B
|
7 |
model_type: llama
|
|
|
8 |
quantized_by: TheBloke
|
9 |
tags:
|
10 |
- llama-2
|
11 |
-
- codellama
|
12 |
---
|
13 |
|
14 |
<!-- header start -->
|
@@ -30,11 +32,11 @@ tags:
|
|
30 |
|
31 |
# CodeLlama 13B - GPTQ
|
32 |
- Model creator: [Meta](https://huggingface.co/meta-llama)
|
33 |
-
- Original model: [CodeLlama 13B](https://
|
34 |
|
35 |
## Description
|
36 |
|
37 |
-
This repo contains GPTQ model files for [Meta's CodeLlama 13B](https://
|
38 |
|
39 |
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.
|
40 |
|
@@ -43,7 +45,7 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
|
|
43 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-13B-GPTQ)
|
44 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-13B-GGUF)
|
45 |
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/CodeLlama-13B-GGML)
|
46 |
-
* [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/
|
47 |
|
48 |
## Prompt template: TBC
|
49 |
|
@@ -214,7 +216,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
|
|
214 |
|
215 |
**Special thanks to**: Aemon Algiz.
|
216 |
|
217 |
-
**Patreon special mentions**:
|
218 |
|
219 |
|
220 |
Thank you to all my generous patrons and donaters!
|
@@ -225,123 +227,112 @@ And thank you again to a16z for their generous grant.
|
|
225 |
|
226 |
# Original model card: Meta's CodeLlama 13B
|
227 |
|
|
|
|
|
228 |
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
<div style="display: flex; justify-content: space-between; width: 100%;">
|
235 |
-
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
236 |
-
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
237 |
-
</div>
|
238 |
-
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
239 |
-
<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>
|
240 |
-
</div>
|
241 |
-
</div>
|
242 |
-
<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>
|
243 |
-
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
244 |
-
<!-- header end -->
|
245 |
-
|
246 |
-
# CodeLlama 13B fp16
|
247 |
-
- Model creator: [Meta](https://ai.meta.com/llama/)
|
248 |
-
|
249 |
-
## Description
|
250 |
-
|
251 |
-
This is Transformers/HF format fp16 weights for CodeLlama 13B. It is the result of downloading CodeLlama 13B from [Meta](https://ai.meta.com/blog/code-llama-large-language-model-coding/) and converting to HF using `convert_llama_weights_to_hf.py`.
|
252 |
-
|
253 |
-
Quantisations will be coming shortly.
|
254 |
-
|
255 |
-
Please note that due to a change in the RoPE Theta value, for correct results you must load these FP16 models with `trust_remote_code=True`
|
256 |
-
|
257 |
-
Credit to @emozilla for creating the necessary modelling code to achieve this!
|
258 |
-
|
259 |
-
## Prompt template: TBC
|
260 |
-
|
261 |
-
|
262 |
-
<!-- footer start -->
|
263 |
-
<!-- 200823 -->
|
264 |
-
## Discord
|
265 |
|
266 |
-
For further support, and discussions on these models and AI in general, join us at:
|
267 |
-
|
268 |
-
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
269 |
-
|
270 |
-
## Thanks, and how to contribute.
|
271 |
|
272 |
-
|
273 |
|
274 |
-
|
275 |
|
276 |
-
|
|
|
|
|
277 |
|
278 |
-
|
279 |
|
280 |
-
|
281 |
-
|
|
|
|
|
282 |
|
283 |
-
**Special thanks to**: Aemon Algiz.
|
284 |
|
285 |
-
|
|
|
|
|
|
|
286 |
|
|
|
287 |
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
|
292 |
-
<!-- footer end -->
|
293 |
|
294 |
-
|
|
|
295 |
|
296 |
-
|
297 |
|
298 |
-
|
299 |
|
300 |
-
|
|
|
|
|
301 |
|
302 |
-
**Variations** Code Llama comes in three model sizes, and three variants:
|
303 |
-
1) Code Llama: our base models designed for general code synthesis and understanding
|
304 |
-
2) Code Llama - Python: designed specifically for Python
|
305 |
-
3) Code Llama - Instruct: for instruction following and safer deployment
|
306 |
-
|
307 |
All variants are available in sizes of 7B, 13B and 34B parameters.
|
308 |
|
|
|
|
|
309 |
**Input** Models input text only.
|
310 |
|
311 |
-
**Output** Models
|
312 |
|
313 |
-
**Model Architecture** Code Llama
|
314 |
|
315 |
**Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
|
316 |
|
317 |
-
**Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released
|
318 |
|
319 |
-
**
|
320 |
|
321 |
**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/)".
|
322 |
|
323 |
-
|
324 |
-
|
325 |
-
## **Intended Use**
|
326 |
**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.
|
327 |
|
328 |
**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.
|
329 |
|
330 |
-
##
|
331 |
-
**Training Factors**
|
332 |
-
We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
|
333 |
|
334 |
**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.
|
335 |
|
336 |
-
|
|
|
337 |
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).
|
338 |
-
Code Llama - Instruct uses additional instruction fine-tuning data.
|
339 |
|
340 |
-
|
|
|
341 |
See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
|
342 |
|
343 |
-
|
|
|
|
|
344 |
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.
|
345 |
|
346 |
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).
|
347 |
-
|
|
|
1 |
---
|
2 |
inference: false
|
3 |
+
language:
|
4 |
+
- code
|
5 |
license: llama2
|
6 |
model_creator: Meta
|
7 |
+
model_link: https://huggingface.co/codellama/CodeLlama-13b-hf
|
8 |
model_name: CodeLlama 13B
|
9 |
model_type: llama
|
10 |
+
pipeline_tag: text-generation
|
11 |
quantized_by: TheBloke
|
12 |
tags:
|
13 |
- llama-2
|
|
|
14 |
---
|
15 |
|
16 |
<!-- header start -->
|
|
|
32 |
|
33 |
# CodeLlama 13B - GPTQ
|
34 |
- Model creator: [Meta](https://huggingface.co/meta-llama)
|
35 |
+
- Original model: [CodeLlama 13B](https://huggingface.co/codellama/CodeLlama-13b-hf)
|
36 |
|
37 |
## Description
|
38 |
|
39 |
+
This repo contains GPTQ model files for [Meta's CodeLlama 13B](https://huggingface.co/codellama/CodeLlama-13b-hf).
|
40 |
|
41 |
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.
|
42 |
|
|
|
45 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-13B-GPTQ)
|
46 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-13B-GGUF)
|
47 |
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/CodeLlama-13B-GGML)
|
48 |
+
* [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/codellama/CodeLlama-13b-hf)
|
49 |
|
50 |
## Prompt template: TBC
|
51 |
|
|
|
216 |
|
217 |
**Special thanks to**: Aemon Algiz.
|
218 |
|
219 |
+
**Patreon special mentions**: Kacper Wikieł, knownsqashed, Leonard Tan, Asp the Wyvern, Daniel P. Andersen, Luke Pendergrass, Stanislav Ovsiannikov, RoA, Dave, Ai Maven, Kalila, Will Dee, Imad Khwaja, Nitin Borwankar, Joseph William Delisle, Tony Hughes, Cory Kujawski, Rishabh Srivastava, Russ Johnson, Stephen Murray, Lone Striker, Johann-Peter Hartmann, Elle, J, Deep Realms, SuperWojo, Raven Klaugh, Sebastain Graf, ReadyPlayerEmma, Alps Aficionado, Mano Prime, Derek Yates, Gabriel Puliatti, Mesiah Bishop, Magnesian, Sean Connelly, biorpg, Iucharbius, Olakabola, Fen Risland, Space Cruiser, theTransient, Illia Dulskyi, Thomas Belote, Spencer Kim, Pieter, John Detwiler, Fred von Graf, Michael Davis, Swaroop Kallakuri, subjectnull, Clay Pascal, Subspace Studios, Chris Smitley, Enrico Ros, usrbinkat, Steven Wood, alfie_i, David Ziegler, Willem Michiel, Matthew Berman, Andrey, Pyrater, Jeffrey Morgan, vamX, LangChain4j, Luke @flexchar, Trenton Dambrowitz, Pierre Kircher, Alex, Sam, James Bentley, Edmond Seymore, Eugene Pentland, Pedro Madruga, Rainer Wilmers, Dan Guido, Nathan LeClaire, Spiking Neurons AB, Talal Aujan, zynix, Artur Olbinski, Michael Levine, 阿明, K, John Villwock, Nikolai Manek, Femi Adebogun, senxiiz, Deo Leter, NimbleBox.ai, Viktor Bowallius, Geoffrey Montalvo, Mandus, Ajan Kanaga, ya boyyy, Jonathan Leane, webtim, Brandon Frisco, danny, Alexandros Triantafyllidis, Gabriel Tamborski, Randy H, terasurfer, Vadim, Junyu Yang, Vitor Caleffi, Chadd, transmissions 11
|
220 |
|
221 |
|
222 |
Thank you to all my generous patrons and donaters!
|
|
|
227 |
|
228 |
# Original model card: Meta's CodeLlama 13B
|
229 |
|
230 |
+
# **Code Llama**
|
231 |
+
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.
|
232 |
|
233 |
+
| | Base Model | Python | Instruct |
|
234 |
+
| --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
235 |
+
| 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) |
|
236 |
+
| 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) |
|
237 |
+
| 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) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
+
## Model Use
|
241 |
|
242 |
+
To use this model, please make sure to install transformers from `main` until the next version is released:
|
243 |
|
244 |
+
```bash
|
245 |
+
pip install git+https://github.com/huggingface/transformers.git@main accelerate
|
246 |
+
```
|
247 |
|
248 |
+
Model capabilities:
|
249 |
|
250 |
+
- [x] Code completion.
|
251 |
+
- [x] Infilling.
|
252 |
+
- [ ] Instructions / chat.
|
253 |
+
- [ ] Python specialist.
|
254 |
|
|
|
255 |
|
256 |
+
```python
|
257 |
+
from transformers import AutoTokenizer
|
258 |
+
import transformers
|
259 |
+
import torch
|
260 |
|
261 |
+
model = "codellama/CodeLlama-13b-hf"
|
262 |
|
263 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
264 |
+
pipeline = transformers.pipeline(
|
265 |
+
"text-generation",
|
266 |
+
model=model,
|
267 |
+
torch_dtype=torch.float16,
|
268 |
+
device_map="auto",
|
269 |
+
)
|
270 |
|
271 |
+
sequences = pipeline(
|
272 |
+
'import socket\n\ndef ping_exponential_backoff(host: str):',
|
273 |
+
do_sample=True,
|
274 |
+
top_k=10,
|
275 |
+
temperature=0.1,
|
276 |
+
top_p=0.95,
|
277 |
+
num_return_sequences=1,
|
278 |
+
eos_token_id=tokenizer.eos_token_id,
|
279 |
+
max_length=200,
|
280 |
+
)
|
281 |
+
for seq in sequences:
|
282 |
+
print(f"Result: {seq['generated_text']}")
|
283 |
+
```
|
284 |
|
|
|
285 |
|
286 |
+
## Model Details
|
287 |
+
*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).
|
288 |
|
289 |
+
**Model Developers** Meta
|
290 |
|
291 |
+
**Variations** Code Llama comes in three model sizes, and three variants:
|
292 |
|
293 |
+
* Code Llama: base models designed for general code synthesis and understanding
|
294 |
+
* Code Llama - Python: designed specifically for Python
|
295 |
+
* Code Llama - Instruct: for instruction following and safer deployment
|
296 |
|
|
|
|
|
|
|
|
|
|
|
297 |
All variants are available in sizes of 7B, 13B and 34B parameters.
|
298 |
|
299 |
+
**This repository contains the base version of the 13B parameters model.**
|
300 |
+
|
301 |
**Input** Models input text only.
|
302 |
|
303 |
+
**Output** Models generate text only.
|
304 |
|
305 |
+
**Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture.
|
306 |
|
307 |
**Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
|
308 |
|
309 |
+
**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.
|
310 |
|
311 |
+
**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/)
|
312 |
|
313 |
**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/)".
|
314 |
|
315 |
+
## Intended Use
|
|
|
|
|
316 |
**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.
|
317 |
|
318 |
**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.
|
319 |
|
320 |
+
## Hardware and Software
|
321 |
+
**Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
|
|
|
322 |
|
323 |
**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.
|
324 |
|
325 |
+
## Training Data
|
326 |
+
|
327 |
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).
|
|
|
328 |
|
329 |
+
## Evaluation Results
|
330 |
+
|
331 |
See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
|
332 |
|
333 |
+
|
334 |
+
## Ethical Considerations and Limitations
|
335 |
+
|
336 |
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.
|
337 |
|
338 |
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).
|
|