Aloha! 🌺 Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding.
Llama-3.1-8B-Instruct
meta-llama·Instruct·released 18 Jul 2024
ollama run llama3.1:8bLlama-3.1-8B-Instruct is an 8B-parameter chat and text generation model from Meta's meta-llama organisation, part of the Llama 3.1 family. It takes text input and produces text output, with a context window of 131,072 tokens. It is released under the Llama 3.1 Community License, which limits commercial use, and the download is gated. Within the family, it is the 8B instruct variant, smaller than the 70B and 405B instruct models.
How much VRAM does Llama-3.1-8B-Instruct need?
At Q4_K_M Llama-3.1-8B-Instruct needs about 6.3 GB with an 8K context (6.3 GB at Q4, 17 GB at full precision). Pick your GPU to see what fits and how fast it runs.
Needs: ≈6.3 GB · Q4_K_M · 8K context — Pick a GPU to check the fit.
Advanced: context 8K · KV cache 16-bit
Smallest GPU for each quant and context (KV cache 16-bit)
| Quantisation | 4K | 8K | 16K | 32K | 64K | 128K |
|---|---|---|---|---|---|---|
| Q3_K_M | ||||||
| Q4_K_M | ||||||
| Q5_K_M | ||||||
| Q6_K | ||||||
| Q8_0 | ||||||
| FP16 |
≤16 GB card24–32 GB48–96 GBmore
| Quantisation | Total |
|---|---|
| Q2_KHeavy lossSmallest, noticeably worse quality | ≈4.6 GB |
| Q3_K_MNoticeable lossSmall, some quality loss | ≈5.4 GB |
| Q4_K_MrecommendedSmall lossRecommended default for local use | ≈6.3 GB |
| Q5_K_MNear-losslessNear-lossless for most tasks | ≈7.1 GB |
| Q6_KNear-losslessPractically lossless | ≈8.0 GB |
| Q8_0LosslessLossless in practice, twice the size of Q4 | ≈9.8 GB |
| FP16 / BF16LosslessFull precision, as released | ≈17 GB |
Estimates for 8K tokens of context: weights + KV cache + runtime overhead. Speed assumes memory-bound decoding at your GPU’s bandwidth. Pick a GPU above and the fit column checks every row against it. Weights marked “file” use the real GGUF download size; “est.” rows are computed from the parameter count.
How to pick a quant
Take the biggest quant that fits with room left for context. Q4_K_M is the usual sweet spot. Below Q4 quality drops fast, above Q6 you mostly pay memory for nothing. Big models (70B+, large MoE) tolerate low quants better than small ones.
- LosslessF16, Q8_0
- Near-losslessQ6_K, Q5_K_M
- Small lossQ5_K_S, Q4_K_M, IQ4_NL, IQ4_XS, Q4_K_S
- Noticeable lossQ4_0, Q3_K_L, Q3_K_M, IQ3_M
- Heavy lossIQ3_XXS, Q3_K_S, IQ2_M, Q2_K
Typical quality loss, not measured per model. Tiers come from KL divergence against FP16 on Llama 3 8B: llama.cpp perplexity README: LLaMA 3 8B scoreboard (KLD and ΔPPL vs FP16, Wikitext-2); llama.cpp quantize tool: ΔPPL per quant type @ Llama-3-8B
How much context fits?
At 8K context, Q4_K_M needs ≈6.3 GB(4.6 GB weights + 1.0 GB KV cache + 0.7 GB overhead). Pick a GPU above to see how much context fits.
Weights + overheadKV cache
Can the RTX 4060 run Llama-3.1-8B-Instruct? →
Speed vs quality per quant
Smaller quants run faster and fit in less memory, but lose quality.
Fits in VRAMTight fitCPU offload✕ won't runQuality is typical KL divergence vs FP16, not measured for this model.
Real-world speed of Llama-3.1-8B-Instruct
Tokens per second measured by people running it at home. A GPU shows a median once 3 reports agree on the same setup. Reports far from our estimate wait for a review. Measure yours with llama-bench →
No medians yet. Be one of the first 3 to report a setup.
All reports
Run Llama-3.1-8B-Instruct locally
--quantQ4_K_Mdefault; pick your GPU to tailor itunsloth/Llama-3.1-8B-Instruct-GGUF
ollama run llama3.1:8bThe library build picks its own default quantisation.
ollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_M llama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_MDownloads the GGUF on first run. Installed through llama.app? The same flags work with `llama serve`.
lms get unsloth/Llama-3.1-8B-Instruct-GGUF@Q4_K_MThen load it from the LM Studio app or with `lms load`.
pip install mlx-lm
mlx_lm.generate --model mlx-community/Llama-3.1-8B-Instruct-4bit --prompt "Hello"Use `mlx_lm.chat` with the same --model for an interactive chat.
mlx_lm.server --model mlx-community/Llama-3.1-8B-Instruct-4bit --port 8080API on http://localhost:8080/v1.
vllm serve meta-llama/Llama-3.1-8B-InstructGated on Hugging Face: accept the licence on the model page and export HF_TOKEN first.
vllm serve RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8services:
vllm:
image: vllm/vllm-openai:latest
command: meta-llama/Llama-3.1-8B-Instruct
ports:
- "8000:8000"
ipc: host
volumes:
- ~/.cache/huggingface:/root/.cache/huggingface
environment:
- HF_TOKEN=${HF_TOKEN}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]API on port 8000.
sglang serve meta-llama/Llama-3.1-8B-Instruct --host 0.0.0.0 --port 30000Gated on Hugging Face: accept the licence on the model page and export HF_TOKEN first.
services:
sglang:
image: lmsysorg/sglang:latest
command: sglang serve meta-llama/Llama-3.1-8B-Instruct --host 0.0.0.0 --port 30000
ports:
- "30000:30000"
ipc: host
volumes:
- ~/.cache/huggingface:/root/.cache/huggingface
environment:
- HF_TOKEN=${HF_TOKEN}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]API on port 30000.
from transformers import pipeline
pipe = pipeline("text-generation", model="meta-llama/Llama-3.1-8B-Instruct", dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "Explain self-hosting in one paragraph."}]
out = pipe(messages, max_new_tokens=512)
print(out[0]["generated_text"][-1]["content"])Gated on Hugging Face: accept the licence on the model page and export HF_TOKEN first.
Benchmarks
| Benchmark | Score | Source |
|---|---|---|
| MMLU-Pro | 38.0% | independent |
| GPQA Diamond | 30.4% | self-reported |
| GPQA | 31.5% | independent |
| IFEval | 49.2% | independent |
| BIG-Bench Hard | 50.9% | independent |
| MATH Level 5 | 15.6% | independent |
| MuSR | 39.7% | independent |
| Open LLM Leaderboard v2 average | 23.76 | independent |
| GSM8K | 84.5% | self-reported |
| LMArena Text | 1187 | independent |
| BFCL v4 | 25.8% | independent |
Self-reported scores come from the model card and are not independently verified. Rank is among all models with a score on that benchmark.
Quantised versions and downloads
| Repository | Format | Quant | Size |
|---|---|---|---|
| unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit | Safetensors | BNB-4BIT | — |
| unsloth/Meta-Llama-3.1-8B-Instruct-unsloth-bnb-4bit | Safetensors | BNB-4BIT | — |
| RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8 | Safetensors | FP8 | — |
| unsloth/Llama-3.1-8B-Instruct-GGUF | GGUF | UD-IQ1_S | 2.2 GB |
| unsloth/Llama-3.1-8B-Instruct-GGUF | GGUF | UD-IQ1_M | 2.3 GB |
| unsloth/Llama-3.1-8B-Instruct-GGUF | GGUF | UD-IQ2_XXS | 2.5 GB |
| unsloth/Llama-3.1-8B-Instruct-GGUF | GGUF | UD-IQ2_M | 3.0 GB |
| unsloth/Llama-3.1-8B-Instruct-GGUF | GGUF | Q2_K | 3.2 GB |
| unsloth/Llama-3.1-8B-Instruct-GGUF | GGUF | Q2_K_L | 3.3 GB |
| unsloth/Llama-3.1-8B-Instruct-GGUF | GGUF | UD-IQ3_XXS | 3.3 GB |
About Llama-3.1-8B-Instruct
The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes (text in/text out). The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks. Model developer: Meta Model Architecture: Llama 3.1 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety. Training Data Params Input modalities Output modalities Context length GQA Token count Knowledge cutoff Llama 3.1 (text only) A new mix of publicly available online data. 8B Multilingual Text Multilingual Text and code 128k Yes 15T+ December 2023 70B Multilingual Text Multilingual Text and code 128k Yes 405B Multilingual Text Multilingual Text and code 128k Yes Supported languages: English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai. Llama 3.1 family of models. Token counts refer to pretraining data only. All model versions use Grouped-Query Attention (GQA) for improved inference scalability. Model Release Date: July 23, 2024.
Full model card on Hugging Face →Other Llama 3.1 models
Whole family →Alternatives to Llama-3.1-8B-Instruct
All alternatives →Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models.
Chirp Chirp! 🐦 We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement.
K2-Horizon-7B is the medium dense member of the K2-Horizon family: a 7B-core decoder-only model with a 512K context window.
NVIDIA-Nemotron-3.5-Bolt-E4B-BF16 is a small language model (SLM) further post-trained from Gemma-4-E4B-it by NVIDIA. This is the full-precision (BF16) release.
Granite is a family of open-source large language models developed by IBM, designed for enterprise and research use. Granite models are built to be versatile, safe, and efficient — covering a range of sizes and capabilities from compact edge-deployable models to large-scale reasoning systems.
Llama-3.1-8B-Instruct FAQ
- How much VRAM does Llama-3.1-8B-Instruct need?
- About 6.3 GB at Q4_K_M with an 8K context. Q8_0 needs about 9.8 GB and full precision about 17 GB. Longer contexts need more memory for the KV cache.
- Can Llama-3.1-8B-Instruct run on the RTX 4060?
- Yes. It fits at Q5_K_M (about 7.1 GB), at an estimated 26 tokens/s. It fits comfortably on the Apple M4 (16 GB), Radeon RX 6700 XT, RTX 3060 12GB.
- Can I use Llama-3.1-8B-Instruct commercially?
- Yes, with conditions. It is released under Llama 3.1 Community License. Free for commercial use unless you have over 700M monthly active users; requires "Built with Llama" attribution and follows the acceptable use policy.
- What is the context length of Llama-3.1-8B-Instruct?
- 131,072 tokens (128K). The full window needs far more memory than an 8K context.
- How do I run Llama-3.1-8B-Instruct with Ollama or llama.cpp?
- With Ollama: ollama run llama3.1:8b. With llama.cpp: llama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_M, which starts an OpenAI-compatible server.
Rate this model
Data from Hugging Face, the model card and public leaderboards. Memory and speed figures are estimates; real numbers depend on the runtime, context length and drivers. Always check the licence yourself before commercial use.
0 comments