v2.2 · 2026-06-12
Code Llama 7B Instruct
codellama-7b-instruct
Code Llama 7B Instruct is a 7B code model profile for local AI planning. This page records provider, license, context, quantization, hardware-fit estimates, setup hints, source links, and caveats so readers do not choose a model by name alone.
PROVIDER
Meta
FAMILY
Code Llama
MODEL TYPE
code
PARAMETERS
7B
MODALITIES
text
ARCHITECTURE
auto-regressive transformer
CONTEXT WINDOW
100,000 tokens
TRAINING TOKENS
0.5T
RELEASE DATE
2023-08-24
GGUF REPOSITORIES
TheBloke/CodeLlama-7B-Instruct-GGUF community conversion
Community GGUF conversion/quantization of the Meta Code Llama Instruct checkpoint; file table used for Q4_K_M, Q5_K_M, and Q8_0 sizes.
SETUP HINTS
OLLAMA
Use `ollama run codellama:7b-instruct`LM STUDIO
Search for `TheBloke/CodeLlama-7B-Instruct-GGUF` and start with the Q4_K_M file for balanced quality and size.
LLAMA.CPP
Use `llama-cli -hf TheBloke/CodeLlama-7B-Instruct-GGUF:Q4_K_M` with the Code Llama instruct prompt templateQUANTIZATION FILE SIZES (GGUF)
Q4_K_M
4.08 GB
Q5_K_M
4.78 GB
Q8_0
7.16 GB
Quantization note: Q4_K_M
RAM / VRAM ESTIMATES
MIN RAM
6.58 GB
COMFORTABLE RAM
8 GB
MIN VRAM
5 GB
COMFORTABLE VRAM
8 GB
These are conservative local-inference estimates, not official hardware requirements.
HARDWARE FIT
CPU only (no GPU)
possible
8 GB RAM
possible
16 GB RAM
good
32 GB RAM
good
8 GB VRAM
good
12 GB VRAM
good
24 GB VRAM
good
Apple Silicon (unified memory)
good
Hardware fit values are conservative local-inference estimates based on GGUF size plus runtime and KV-cache overhead. Actual requirements depend on context length, quantization, runtime, GPU offload, and other running apps.
BEST FOR
·Local code explanation and code generation with an instruction/chat prompt format
AVOID IF
·You need a modern function-calling/tool-calling model with an official tool schema
CAVEATS
·RAM and VRAM estimates are conservative local-inference estimates based on GGUF file size plus runtime and KV-cache overhead, not official Meta requirements.
·Meta describes stable generations up to 100,000 tokens, while common local runtimes and the Ollama catalog may default to smaller contexts such as 16K.
SOURCE URLS
FIELD EVIDENCE
parameterSizeBhuggingface.co/codellama/CodeLlama-7b-Instruct-hf
contextWindowTokensai.meta.com/blog/code-llama-large-language-model-coding/
trainingTokensai.meta.com/blog/code-llama-large-language-model-coding/
LANGUAGES
EnglishPythonC++JavaPHPTypeScriptJavaScriptC#Bash
CAPABILITIES
code tuned