Meta
CodeLlama 34B
Downloads
Model Report
Overview
Code Llama 34B is a large language model (LLM) developed by Meta, optimized for code generation, understanding, and related tasks. Released on August 24, 2023, Code Llama 34B is part of the broader Code Llama family, which leverages the underlying architecture of Llama 2 to support a range of programming-focused applications. This model is designed to interpret code, follow instructions for programming tasks, and provide context-rich code completions and explanations, addressing both professional and educational programming needs as documented in the Meta blog post and Meta publication.

Figure 1. Animated demonstration of Code Llama 34B identifying and correcting a bug in a Python code snippet, then explaining the correction in natural language. Prompt: '# Fix the bug in the code above and explain the fix.'
Model Architecture and Training
Code Llama 34B builds upon the auto-regressive transformer architecture introduced with Llama 2. It is specifically adapted for code by further training on extensive datasets of programming code and code-related natural language. This code specialization extends to longer sequence handling, enabling context windows of up to 100,000 tokens, and allows the model to engage effectively with large codebases and complex tasks. The training process utilized Meta’s Research Super Cluster and included approximately 500 billion tokens of code and code-related data as detailed in the HuggingFace model card.
The training procedure involves the same foundational data as Llama 2 but introduces differentiated weighting and fine-tuning strategies, including further pre-training on curated code corpora and reinforcement learning from human feedback to improve instruction following and safety. The Python-specialized variant received additional fine-tuning on 100 billion Python tokens for improved performance in that language, as described in the Meta blog post.
Capabilities and Variants
Code Llama 34B supports a range of programming languages, including Python, C++, Java, PHP, Typescript (JavaScript), C#, and Bash. The model generates code from natural language or code prompts, interprets code snippets, performs debugging, provides natural language explanations, and completes code based on partial inputs. It also demonstrates infilling capabilities in select variants, allowing code to be inserted seamlessly into existing code blocks, as detailed in the Meta publication.

Figure 2. Animated sequence illustrating Code Llama 34B providing a natural language explanation for a Python function that calculates the nth Fibonacci number. Prompt: '# Explain this code in natural language.'

Figure 3. Demonstration of Code Llama 34B generating a concise summary of a provided Python code block in response to the prompt: '# Summarize this code.'
There are three primary variants of Code Llama 34B to address diverse use cases:
- The Base model is intended for general code synthesis, completion, and understanding.
- Code Llama 34B - Python is fine-tuned for enhanced performance on Python-specific tasks.
- Code Llama 34B - Instruct is aligned to follow natural language instructions and generate contextually relevant, safe, and helpful responses, as stated in the Meta blog post.
Performance is stable and accurate across long contexts, supporting both zero-shot and instruction-guided programming tasks. The model's design prioritizes developer productivity and educational accessibility.
Performance Benchmarks
On industry-standard benchmarks, Code Llama 34B's performance is assessed against established code-specific models. In controlled internal evaluations, Code Llama 34B achieved an accuracy score of 53.7% on the HumanEval benchmark, which tests functional correctness in code generation from docstrings, and obtained 56.2% on MBPP, a benchmark for code completion from English prompts, as described in the Meta blog post and Meta publication. These results are comparable to those of models such as ChatGPT.

Figure 4. Table comparing performance of Code Llama and several other language models across HumanEval, MBPP, and Multilingual HumanEval benchmarks. Code Llama 34B's performance is presented for these tasks.
Evaluations on additional benchmarks, such as MultiPL-E, show that Code Llama 34B and its family achieved notable results compared to other publicly available open-source models on multi-language programming tasks, as detailed in the Meta publication. Each variant's benchmarks reflect its respective training focus, with the Python-specialized and Instruct models achieving peak scores on Python and instruction-following assessments.
Applications and Use Cases
Code Llama 34B is designed as an assistive tool for software development, code comprehension, and instruction. It can generate new code from text prompts, complete partially written code, explain code functionality in natural language, and assist in debugging by identifying and correcting errors. Its extended context window facilitates navigation and manipulation of large codebases, supporting refactoring and documentation tasks, according to the Meta blog post. The model's application spans productivity toolchains for experienced developers, educational support for programming learners, and program synthesis for research.
In addition to direct code generation, Code Llama 34B serves roles in code review, automated documentation, and providing insights into code logic. The model's capabilities across multiple languages and programming tasks position it as a resource for both commercial and academic environments, as outlined in the HuggingFace model card.
Limitations and Responsible Use
As with other large language models, Code Llama 34B is subject to certain limitations. Its responses can at times be inaccurate or unsuitable for sensitive environments, necessitating thorough safety review and tailored deployment protocols for production scenarios, as noted in the HuggingFace model card. Potential risks include generation of erroneous, incomplete, or unsafe code, and developers are encouraged to conduct domain-specific validation and align with Meta’s Acceptable Use Policy.
Code Llama 34B and its variants are static models—that is, they do not learn or adapt after deployment. Their training data emphasize English and popular programming languages, with less tested support for other languages. The model, notably in its base and Python versions, is not recommended for general-purpose natural language tasks outside software contexts, according to the Meta blog post.
Red teaming has been conducted to assess the risk of generating malicious code, and while Code Llama provided safer outputs compared to certain proprietary models in testing, adherence to responsible AI guidelines remains essential, as described in the Meta blog post.
Licensing and Accessibility
Code Llama 34B is distributed under the Llama 2 community license, offering commercial and research use under community-centric terms. These include requirements for attribution, responsible deployment, adherence to the Acceptable Use Policy, and restrictions on using model outputs to improve other LLMs outside the Llama family, as outlined in the HuggingFace model card. Organizations exceeding specific user thresholds must request licensing directly from Meta.
The model and derivatives are available as open foundation resources, accompanied by documentation and model cards supporting transparency and reproducibility, as stated in the Meta research paper. Reporting channels exist for responsible disclosure of issues, misuse, and security concerns via Meta’s recommended pathways.
External Resources
More in the Llama 2 Family
Llama 2 7B
CodeLlama 7B
Vicuna 7B
Pygmalion 2 7B
OpenChat 3.5 7B
Xwin LM 7B
Llama 2 13B
CodeLlama 13B
Nous Hermes 13b
Vicuna 13B
MythoMax L2
WizardLM 13B
Pygmalion 2 13B
Mythalion 13B
Xwin LM 13B
Llama 2 70B
CodeLlama 70B
Xwin 70B
WizardLM 70B
Nous Hermes Llama 2 70B
More from Meta
LLaMA 7B
LLaMA 13B
LLaMA 33B
LLaMA 65B
Llama 4 Scout (17Bx16E)
Llama 4 Maverick (17Bx128E)
Llama 3 8B
Llama 3 70B
Llama 3.1 8B
Llama 3.1 70B
Llama 3.2 3B
Llama 3.3 70B
MusicGen
Magnet
Seamless
Compatible Apps

Open WebUI
A polished, self-hosted chat interface for LLMs with Ollama integration, multimodal prompts, and extensive workspace customization.
Web UI
Chat UIs · Beginner Friendly
llama.cpp
GGUF model inference with a polished web UI and OpenAI-format API. CPU-only build — high hardware compatibility, works on any machine without a GPU.
Web UI · API · CLI
LLM Inference · Chat UIs
llama.cpp (CUDA)
GGUF model inference with a polished web UI and OpenAI-format API. CUDA build — GPU-accelerated for NVIDIA GPUs.
Web UI · API · CLI
LLM Inference · Chat UIs

Text Generation Web UI
A feature-rich interface for running and experimenting with open-weight LLMs, including multiple inference backends, plugins, and tuning controls.
Web UI · API
Chat UIs · LLM Inference