selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

A newer version exists: Qwen3.5-9B9.7B · released 27 Feb 2026
Qwen logo

Qwen3-8B

Qwen·Instruct·released 27 Apr 2025

Apache 2.08.2B40K ctx ≈6.5 GB
Your GPU
ollama run qwen3:8b
All 7 runners ↓

Qwen3-8B is an 8.2B-parameter instruct model from Qwen for chat and text generation. It takes text input and produces text output, with a context window of 40,960 tokens. It is licensed under Apache 2.0, commercial use is allowed, and downloads are not gated. It is the instruct variant of the 8B size in the Qwen3 family, with Qwen3-8B-Base as its base model. The family also lists 0.6B, 1.7B and 4B sizes.

How much VRAM does Qwen3-8B need?

At Q4_K_M Qwen3-8B needs about 6.5 GB with an 8K context (6.5 GB at Q4, 18 GB at full precision). Pick your GPU to see what fits and how fast it runs.

--vram
any
--gpus
--quant

Needs: ≈6.5 GB · Q4_K_M · 8K context — Pick a GPU to check the fit.

Change quant, context or KV cache to compare
Advanced: context 8K · KV cache 16-bit
Context
KV cache

Smallest GPU for each quant and context (KV cache 16-bit)

Quantisation4K8K16K32K
Q3_K_M
Q4_K_M
Q5_K_M
Q6_K
Q8_0
FP16

≤16 GB card24–32 GB48–96 GBmore

QuantisationQualityWeightsKV cacheTotal
Q2_KHeavy lossSmallest, noticeably worse qualityHeavy loss3.1 GB file1.1 GB≈4.8 GB
Q3_K_MNoticeable lossSmall, some quality lossNoticeable loss3.8 GB file1.1 GB≈5.7 GB
Q4_K_MrecommendedSmall lossRecommended default for local useSmall loss4.7 GB file1.1 GB≈6.5 GB
Q5_K_MNear-losslessNear-lossless for most tasksNear-lossless5.5 GB file1.1 GB≈7.3 GB
Q6_KNear-losslessPractically losslessNear-lossless6.3 GB file1.1 GB≈8.2 GB
Q8_0LosslessLossless in practice, twice the size of Q4Lossless8.1 GB file1.1 GB≈10 GB
FP16 / BF16LosslessFull precision, as releasedLossless15 GB file1.1 GB≈18 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?

Model quant
KV cache

At 8K context, Q4_K_M needs ≈6.5 GB(4.7 GB weights + 1.1 GB KV cache + 0.7 GB overhead). Pick a GPU above to see how much context fits.

05101K2K4K8K16K40KGB

Weights + overheadKV cache

Can the RTX 4060 run Qwen3-8B? →

Speed vs quality per quant

Smaller quants run faster and fit in less memory, but lose quality.

Q2_KQ3_K_MQ4_K_MQ5_K_MQ6_KQ8_0F16

Fits in VRAMTight fitCPU offload✕ won't runQuality is typical KL divergence vs FP16, not measured for this model.

Real-world speed of Qwen3-8B

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 Qwen3-8B locally

--quantQ4_K_Mdefault; pick your GPU to tailor itQwen/Qwen3-8B-GGUF

From the Ollama librarydocs
ollama run qwen3:8b

The library build picks its own default quantisation.

Q4_K_M straight from Hugging Facedocs
ollama run hf.co/Qwen/Qwen3-8B-GGUF:Q4_K_M

Install Ollama

OpenAI-compatible server with a web UIdocs
llama-server -hf Qwen/Qwen3-8B-GGUF:Q4_K_M

Downloads the GGUF on first run. Installed through llama.app? The same flags work with `llama serve`.

Install llama.cpp

Download with the lms CLIdocs
lms get Qwen/Qwen3-8B-GGUF@Q4_K_M

Then load it from the LM Studio app or with `lms load`.

Install LM Studio

Apple Silicon with mlx-lmdocs
bash
pip install mlx-lm
mlx_lm.generate --model lmstudio-community/Qwen3-8B-MLX-8bit --prompt "Hello"

Use `mlx_lm.chat` with the same --model for an interactive chat.

OpenAI-compatible serverdocs
mlx_lm.server --model lmstudio-community/Qwen3-8B-MLX-8bit --port 8080

API on http://localhost:8080/v1.

Install MLX

Serve an OpenAI-compatible APIdocs
vllm serve Qwen/Qwen3-8B
Smaller AWQ builddocs
vllm serve Qwen/Qwen3-8B-AWQ
Docker Compose (NVIDIA)docs
yaml
services:
  vllm:
    image: vllm/vllm-openai:latest
    command: Qwen/Qwen3-8B
    ports:
      - "8000:8000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 8000.

Install vLLM

Serve an OpenAI-compatible APIdocs
sglang serve Qwen/Qwen3-8B --host 0.0.0.0 --port 30000
Docker Compose (NVIDIA)docs
yaml
services:
  sglang:
    image: lmsysorg/sglang:latest
    command: sglang serve Qwen/Qwen3-8B --host 0.0.0.0 --port 30000
    ports:
      - "30000:30000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 30000.

Install SGLang

Chat with the pipeline APIdocs
python
from transformers import pipeline

pipe = pipeline("text-generation", model="Qwen/Qwen3-8B", 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"])

Install Transformers

Benchmarks

BenchmarkScoreRankSourceDate
BFCL v442.6%#9 / 36 independentOct 2026

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

RepositoryFormatQuantSizeDownloads
unsloth/Qwen3-8B-unsloth-bnb-4bitSafetensorsBNB-4BIT—140.1K
nvidia/Qwen3-8B-NVFP4SafetensorsNVFP4—117.5K
Qwen/Qwen3-8B-FP8SafetensorsFP8—268.1K
unsloth/Qwen3-8B-GGUFGGUFUD-IQ1_S2.3 GB158.3K
unsloth/Qwen3-8B-GGUFGGUFUD-IQ1_M2.4 GB158.3K
unsloth/Qwen3-8B-GGUFGGUFUD-IQ2_XXS2.6 GB158.3K
unsloth/Qwen3-8B-GGUFGGUFUD-IQ2_M3.1 GB158.3K
unsloth/Qwen3-8B-GGUFGGUFQ2_K3.3 GB158.3K
unsloth/Qwen3-8B-GGUFGGUFUD-IQ3_XXS3.4 GB158.3K
unsloth/Qwen3-8B-GGUFGGUFQ2_K_L3.4 GB158.3K

About Qwen3-8B

Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models. Built upon extensive training, Qwen3 delivers groundbreaking advancements in reasoning, instruction-following, agent capabilities, and multilingual support, with the following key features: • Uniquely support of seamless switching between thinking mode (for complex logical reasoning, math, and coding) and non-thinking mode (for efficient, general-purpose dialogue) within single model, ensuring optimal performance across various scenarios. • Significantly enhancement in its reasoning capabilities, surpassing previous QwQ (in thinking mode) and Qwen2.5 instruct models (in non-thinking mode) on mathematics, code generation, and commonsense logical reasoning. • Superior human preference alignment, excelling in creative writing, role-playing, multi-turn dialogues, and instruction following, to deliver a more natural, engaging, and immersive conversational experience. • Expertise in agent capabilities, enabling precise integration with external tools in both thinking and unthinking modes and achieving leading performance among open-source models in complex agent-based tasks. • Support of 100+ languages and dialects with strong capabilities for multilingual instruction following and translation.

Full model card on Hugging Face →

Other Qwen3 models

Whole family →
Qwen logo596MCommercial OK≈1.7 GB↓ 614.5K
Qwen logo752MCommercial OK≈1.8 GB↓ 21.5M
Qwen logo1.7BCommercial OK≈2.4 GB↓ 589.5K
Qwen logo2BCommercial OK≈2.6 GB↓ 4.3M
Qwen logo4BCommercial OK≈4.0 GB↓ 6.7M
Qwen logo4BCommercial OK≈4.0 GB↓ 419.1K
Qwen logo4BCommercial OK≈4.0 GB↓ 2.5M
Qwen logo4BCommercial OK≈4.0 GB↓ 394.9K
Qwen logo8.2BCommercial OK≈6.5 GB↓ 539.2K
Qwen logo14.8BCommercial OK≈11 GB↓ 12.9M
Qwen logo30.5BA3BCommercial OK≈19 GB↓ 1.1M
Qwen logo30.5BA3BCommercial OK≈19 GB↓ 935K

Alternatives to Qwen3-8B

All alternatives →
ornith-ai logo

Ornith-1.0-9B

ornith-ai·Chat

≈6.8 GB

Aloha! 🌺 Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding.

9B256K ctx MIT
804.7KJun 2026gguf
ornith-ai logo

Ornith-1.5-9B

ornith-ai·Chat

≈7.2 GB

Chirp Chirp! 🐦 We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement.

9.7B256K ctx MIT
494.1KAug 2026ollama
IFM logo

K2-Horizon-7B

IFM·Chat

≈7.0 GB

K2-Horizon-7B is the medium dense member of the K2-Horizon family: a 7B-core decoder-only model with a 512K context window.

9B512K ctx Apache 2.0
84.5KSept 2026gguf
ibm-granite logo

granite-4.2-8b

ibm-granite·Chat

≈7.0 GB

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.

8.8B128K ctx Apache 2.0
68.3KAug 2026ollama

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.

8B64K ctx openmdw-1.1
22.8KOct 2026gguf
Qwen logo≈5.5 GB

Qwen2.5 is the latest series of Qwen large language models. For Qwen2.5, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters. Qwen2.5 brings the following improvements upon Qwen2:

7.6B32K ctx Apache 2.0
6.2MSept 2024ollama

Qwen3-8B FAQ

How much VRAM does Qwen3-8B need?
About 6.5 GB at Q4_K_M with an 8K context. Q8_0 needs about 10 GB and full precision about 18 GB. Longer contexts need more memory for the KV cache.
Can Qwen3-8B run on the RTX 4060?
Yes. It fits at Q5_K_M (about 7.3 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 Qwen3-8B commercially?
Yes. It is released under Apache 2.0. Permissive: use, modify and sell freely; keep the notice and licence text.
What is the context length of Qwen3-8B?
40,960 tokens (40K). The full window needs far more memory than an 8K context.
How do I run Qwen3-8B with Ollama or llama.cpp?
With Ollama: ollama run qwen3:8b. With llama.cpp: llama-server -hf Qwen/Qwen3-8B-GGUF:Q4_K_M, which starts an OpenAI-compatible server.

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.