🚀 Code Llama
Code Llama is a collection of generative text models. These models, with parameters ranging from 7 billion to 34 billion, are pretrained and fine - tuned. This repository is for the 34B instruct - tuned version in the Hugging Face Transformers format, designed for general code synthesis and understanding. You can find links to other models at the bottom.
🚀 Quick Start
To use this model, you need to install the transformers
library. You can do this by running the following command:
pip install transformers accelerate
✨ Features
- Code Completion: The model can assist in completing code snippets.
- Instruction Following: It can follow instructions and be used in chat - based scenarios.
📦 Model Details
Property |
Details |
Model Developers |
Meta |
Variations |
Code Llama comes in three sizes (7B, 13B, 34B) and three variants: base for general code, Python - specific, and Instruct for instruction following. |
Input |
Text only |
Output |
Generated text only |
Model Architecture |
An auto - regressive language model using an optimized transformer architecture |
Model Dates |
Trained between January 2023 and July 2023 |
Status |
A static model trained on an offline dataset. Future improvements are planned with community feedback. |
License |
A custom commercial license is available at https://ai.meta.com/resources/models-and-libraries/llama-downloads/ |
Research Paper |
More information can be found in the paper "Code Llama: Open Foundation Models for Code" or its arXiv page |
📚 Intended Use
Intended Use Cases
Code Llama and its variants are for commercial and research use in English and relevant programming languages. The base model can handle various code tasks, the Python variant is for Python programming, and the Instruct variant is safer for code assistant and generation applications.
Out - of - Scope Uses
- Using the model in a way that violates applicable laws or regulations.
- Using languages other than English.
- Any use prohibited by the Acceptable Use Policy and Licensing Agreement.
🔧 Hardware and Software
Training Factors
Custom training libraries were used, and the models were trained and fine - tuned on Meta’s Research Super Cluster.
Carbon Footprint
Training all 9 Code Llama models needed 400K GPU hours on A100 - 80GB hardware. The estimated total emissions were 65.3 tCO2eq, all offset by Meta’s sustainability program.
📊 Training Data
All experiments and released models were trained and fine - tuned using the same data as Llama 2 with different weights. See the research paper for details.
📈 Evaluation Results
Refer to the research paper for evaluations of the main models, detailed ablations, and safety evaluations.
⚠️ Ethical Considerations and Limitations
Code Llama and its variants are new technologies with risks. Testing has been in English and cannot cover all scenarios. The model may produce inaccurate or objectionable responses. Developers should conduct safety testing and tuning for specific applications before deployment. See the Responsible Use Guide at https://ai.meta.com/llama/responsible-use-guide.
⚠️ Important Note
This is a non - official Code Llama repo. You can find the official Meta repository in the Meta Llama organization.