meta-llama
Meta-Llama-3.1-405B-Instruct
- Parameters
- 410.1B
- Max context length
- 131,072
- Architecture
- llama
- License
- Conditional
- Base model
- meta-llama/Meta-Llama-3.1-405B-Instruct
- License
- llama3.1
About Meta-Llama-3.1-405B-Instruct
Meta-Llama-3.1-405B-Instruct is a GGUF model based on meta-llama/Meta-Llama-3.1-405B-Instruct on Hugging Face. GGUF files are published by MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF. It has about 410.1B parameters, the llama architecture, a maximum context length of 131,072 tokens (values written in the GGUF).
There are 2 quantizations, with file sizes from 151 GB (Q2_K) to 177 GB (Q3_K_S) (actual sizes on Hugging Face).
Running Q2_K (151 GB) with an 8,192-token context needs an estimated 160 GB of memory, and an estimated 186 GB at 32,768 tokens. For 8,192 tokens, a GPU with 192 GB or more of VRAM, or a Mac with 192 GB or more of unified memory, is a rough guide (macOS caps how much memory the GPU can use, so leave some headroom).
The original model is licensed under Llama 3.1 Community License, which allows commercial use with conditions such as scale or purpose. Check the original license for the terms of use.
File size and estimated memory per quantization
- Up to 8 GB
- Up to 16 GB
- Up to 24 GB
- Up to 48 GB
- Up to 128 GB
- More
File sizes are the actual values on Hugging Face. Memory is estimated for each context length (KV cache f16). The formula is in How memory is calculated.
All memory figures are Estimated (KV cache f16). It should run on a setup with at least this much VRAM (or Mac unified memory). Click a value to see the devices and models that fit that amount (Find by GPU / Mac).
About the "quality guide" (how far a quantization drifts from the original)
For each quantization type, how far the output drifts from the original model, grouped into six levels from values llama.cpp measured on Llama-3-8B.
The value is mean KLD (the difference between the original and quantized model in next-token probabilities); smaller means closer to the original. Quantizations made with an imatrix (importance data) come out slightly smaller. Levels use the value without an imatrix (or with one, for types that only have that).
These values were not measured on this model. Larger models and MoE models tend to drift less with the same type. Distributor-specific mixed types (such as UD-Q4_K_XL) cannot be matched by type name alone, so they show "-".
| Quantization | Quality guide | KLD (no imatrix) | KLD (imatrix) | Size (Llama-3-8B) |
|---|---|---|---|---|
| Q8_0 | Nearly identical | 0.0014 | - | 7.96 GiB |
| Q6_K | Very small | 0.0055 | - | 6.14 GiB |
| Q5_K_M | Very small | 0.0108 | - | 5.33 GiB |
| Q5_K_S | Small | 0.0166 | - | 5.21 GiB |
| Q5_1 | Small | 0.0180 | - | 5.65 GiB |
| Q5_0 | Small | 0.0222 | - | 5.21 GiB |
| Q4_K_M | Small | 0.0313 | 0.0282 | 4.58 GiB |
| Q4_K_S | Medium | 0.0431 | 0.0320 | 4.37 GiB |
| IQ4_NL | Small | - | 0.0357 | 4.35 GiB |
| IQ4_XS | Small | - | 0.0363 | 4.14 GiB |
| Q4_1 | Medium | 0.0717 | - | 4.78 GiB |
| Q4_0 | Medium | 0.0719 | - | 4.34 GiB |
| Q3_K_L | Medium | 0.0872 | 0.0731 | 4.03 GiB |
| Q3_K_M | Medium | 0.1019 | 0.0844 | 3.74 GiB |
| IQ3_M | Medium | - | 0.1025 | 3.53 GiB |
| IQ3_S | Medium | - | 0.1113 | 3.42 GiB |
| IQ3_XS | Large | - | 0.1387 | 3.28 GiB |
| IQ3_XXS | Large | - | 0.1836 | 3.05 GiB |
| Q3_K_S | Large | 0.2282 | 0.1998 | 3.41 GiB |
| IQ2_M | Large | - | 0.3260 | 2.74 GiB |
| Q2_K | Very large | 0.4451 | 0.3322 | 2.96 GiB |
| Q2_K_S | Very large | - | 0.4034 | 2.96 GiB |
| IQ2_S | Very large | - | 0.4392 | 2.56 GiB |
| IQ2_XS | Very large | - | 0.5463 | 2.43 GiB |
| IQ2_XXS | Very large | - | 0.8120 | 2.24 GiB |
| IQ1_M | Very large | - | 1.3931 | 2.01 GiB |
| IQ1_S | Very large | - | 2.2546 | 1.88 GiB |
Source: llama.cpp (MIT), measured on Llama-3-8B against FP16, Wikitext-2, revision f364eb6f. Original table · Reading and choosing quantizations
GGUF source
MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF
Converted and published by a third party About this label
Using the original model requires a request or agreement on Hugging Face (this does not affect downloading the GGUF files).
Last checked: Nov 3, 2026
- Architecture
- llama
- Supported before llama.cpp b4409
- Parameters
- 410.1B
- Max context length
- 131,072
- License
- llama3.1 Conditional
| Quantization | File size Measured | Quality guide | 4,096 | 8,192 | 16,384 | 32,768 | 65,536 | 131,072 max |
|---|---|---|---|---|---|---|---|---|
| Q2_K (9 parts) | 151 GB | Very large | 156 GB | 160 GB | 169 GB | 186 GB | 220 GB | 287 GB |
| Q3_K_S (9 parts) | 177 GB | Large | 182 GB | 186 GB | 195 GB | 212 GB | 245 GB | 313 GB |
Ollama ollama run hf.co/MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF:Q2_K
llama.cpp llama-server -hf MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF:Q2_K
Generation speed on common GPUs and Macs (estimated)
A rough guide to how fast Q2_K (151 GB) generates text. Each token reads the model weights once, so the upper limit is memory bandwidth ÷ file size. The guide is 60–80% of that, where most published measurements fall.
| Device | Memory bandwidth | Guide (tokens/s) Estimated | Upper limit |
|---|---|---|---|
| Apple M5 Ultra 256 GB | 1,200 GB/s | 4.8–6.3 | 7.9 |
Estimates only. Prompt processing speed (limited by compute) is not included. Longer contexts and offloading part of the model to the CPU make it slower. Macs are shown only when installed memory is at least 4/3 of what is needed. Devices without published bandwidth (some GeForce cards, etc.) are not shown.
License and commercial use
Llama 3.1 Community License Conditional
Allows commercial use. Over 700 million monthly active users requires a separate license from Meta. Redistribution and published derivatives must show "Built with Llama", and you must follow the Acceptable Use Policy.
Based on the license on the original model's Hugging Face page. Original license text (checked Oct 18, 2026)
The summary states facts this site read from the original text and is not legal advice. Always check the original license and its latest terms before use. All licenses
How to run
Example commands using Q2_K. To use another quantization, replace the name with one from the table above. How to run local LLMs
Ollama
Run it by pointing directly at the GGUF on Hugging Face.
ollama run hf.co/MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF:Q2_K
llama.cpp
Pass the repository and quantization name to llama-server (or llama-cli) with -hf.
llama-server -hf MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF:Q2_K
LM Studio
Paste MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF into the search box, download it, and choose the quantization from the file list.
Other models from meta-llama
-
8B
meta-llama
Meta-Llama-3.1-8B-Instruct
- Q4_K_M size
- 4.92 GB
- Memory at 8K
- 6.79 GB
Measured Estimated VRAM 8 GB+
-
3.2B
meta-llama
Llama-3.2-3B-Instruct
- Q4_K_M size
- 2.02 GB
- Memory at 8K
- 3.76 GB
Measured Estimated VRAM 4 GB+
-
1.2B
meta-llama
Llama-3.2-1B-Instruct
- Q4_K_M size
- 0.81 GB
- Memory at 8K
- 1.88 GB
Measured Estimated VRAM 4 GB+
-
70.6B
meta-llama
Llama-3.3-70B-Instruct
- Q4_K_M size
- 42.5 GB
- Memory at 8K
- 46.0 GB
Measured Estimated VRAM 48 GB+
-
107.8B
meta-llama
Llama-4-Scout-17B-16E-Instruct
- Q4_K_M size
- 65.4 GB
- Memory at 8K
- 67.9 GB
Measured Estimated VRAM 64 GB+
-
8B
meta-llama
Meta-Llama-3-8B-Instruct
- Q4_K_M size
- 4.92 GB
- Memory at 8K
- 6.79 GB
Measured Estimated VRAM 8 GB+
Models of a similar size (other developers)
-
402.9B
ornith-ai
Ornith-1.5-397B
- Q4_K_M size
- 244 GB
- Memory at 8K
- 246 GB
Measured Estimated
-
320.8B
zai-org
GLM-5.3-Flash
- UD-IQ1_S size
- 93.1 GB
- Memory at 8K
- 94.2 GB
Measured Estimated VRAM 96 GB+
-
295B
tencent
Hy3
- Q4_K_M size
- 182 GB
- Memory at 8K
- 186 GB
Measured Estimated VRAM 192 GB+
-
313.3B
SyndicateLabs
GLM-5.3-Flash-CYBERSECURITY
- Q4_K_M size
- 196 GB
- Memory at 8K
- 197 GB
Measured Estimated VRAM 192 GB+
-
320.8B
orcarouter
GLM-5.3-Flash-Uncensored
- IQ2_XXS size
- 97.1 GB
- Memory at 8K
- 98.2 GB
Measured Estimated VRAM 96 GB+
-
320.8B
antirez
glm-5.3-flash
- Q4_K size
- 191 GB
- Memory at 8K
- 216 GB
Measured Estimated
Frequently asked questions
- How much memory do I need to run Meta-Llama-3.1-405B-Instruct (Q2_K)?
- The file size is 151 GB (measured). With a 8,192-token context, the estimated memory including the KV cache is 160 GB. The formula is published at https://localllm.az-arte.com/en/guide/memory-calculation.
- Can Meta-Llama-3.1-405B-Instruct be used commercially?
- The original model's license is Llama 3.1 Community License (Commercial use with conditions).Allows commercial use. Over 700 million monthly active users requires a separate license from Meta. Redistribution and published derivatives must show "Built with Llama", and you must follow the Acceptable Use Policy. Check the original license text before deciding.
- Does Meta-Llama-3.1-405B-Instruct run in 8 GB, 12 GB, 16 GB or 24 GB of VRAM?
- 8 GB: no quantization fits; 12 GB: no quantization fits; 16 GB: no quantization fits; 24 GB: no quantization fits (estimated at 8,192 tokens with an f16 KV cache, files from the most-downloaded source).
- What is the command to run Meta-Llama-3.1-405B-Instruct with Ollama?
- Run "ollama run hf.co/MaziyarPanahi/Meta-Llama-3.1-405B-Instruct-GGUF:Q2_K" to use the GGUF on Hugging Face directly. To use another quantization, replace the name at the end.