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.

empero-ai logo

Qwen3.8-4B-Distill

empero-ai·Instruct·released 15 Aug 2026

Apache 2.04.7B256K ctx ≈4.3 GB
Your GPU
ollama run hf.co/empero-ai/Qwen3.8-4B-Distill-GGUF:Q4_K_M
All 7 runners ↓

Qwen3.8-4B is a full-parameter distillation of Qwen3.8 2.4T A95B into the Qwen3.5-4B architecture. The student was trained on ~45,000 curated teacher traces from our internal Qwen3.8 distillation datasets — dense chain-of-thought spanning mathematics, general reasoning, and instruction following…

Notify me when

How much VRAM does Qwen3.8-4B-Distill need?

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

--vram
any
--gpus
--quant

Needs: ≈4.2 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)

Quantisation8K16K32K64K128K256K
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 loss1.8 GB file1.0 GB≈3.4 GB
Q3_K_MNoticeable lossSmall, some quality lossNoticeable loss2.2 GB file1.0 GB≈3.8 GB
Q4_K_MrecommendedSmall lossRecommended default for local useSmall loss2.6 GB file1.0 GB≈4.2 GB
Q5_K_MNear-losslessNear-lossless for most tasksNear-lossless2.9 GB file1.0 GB≈4.6 GB
Q6_KNear-losslessPractically losslessNear-lossless3.3 GB file1.0 GB≈5.0 GB
Q8_0LosslessLossless in practice, twice the size of Q4Lossless4.3 GB file1.0 GB≈6.0 GB
FP16 / BF16LosslessFull precision, as releasedLossless8.1 GB file1.0 GB≈10.0 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 ≈4.2 GB(2.6 GB weights + 1.0 GB KV cache + 0.6 GB overhead). Pick a GPU above to see how much context fits.

0102030401K2K4K8K16K32K64K128K256KGB

Weights + overheadKV cache

Can the RTX 4060 run Qwen3.8-4B-Distill? →

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.8-4B-Distill

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.8-4B-Distill locally

--quantQ4_K_Mdefault; pick your GPU to tailor itempero-ai/Qwen3.8-4B-Distill-GGUF

Q4_K_M straight from Hugging Facedocs
ollama run hf.co/empero-ai/Qwen3.8-4B-Distill-GGUF:Q4_K_M

Install Ollama

OpenAI-compatible server with a web UIdocs
llama-server -hf empero-ai/Qwen3.8-4B-Distill-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 empero-ai/Qwen3.8-4B-Distill-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 yachen4ever/Qwen3.8-4B-Distill-Heretic-Abliterated-MLX-4bit --prompt "Hello"

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

OpenAI-compatible serverdocs
mlx_lm.server --model yachen4ever/Qwen3.8-4B-Distill-Heretic-Abliterated-MLX-4bit --port 8080

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

Install MLX

Serve an OpenAI-compatible APIdocs
vllm serve empero-ai/Qwen3.8-4B-Distill
Docker Compose (NVIDIA)docs
yaml
services:
  vllm:
    image: vllm/vllm-openai:latest
    command: empero-ai/Qwen3.8-4B-Distill
    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 empero-ai/Qwen3.8-4B-Distill --host 0.0.0.0 --port 30000
Docker Compose (NVIDIA)docs
yaml
services:
  sglang:
    image: lmsysorg/sglang:latest
    command: sglang serve empero-ai/Qwen3.8-4B-Distill --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="empero-ai/Qwen3.8-4B-Distill", 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

  • Jancommunity · desktop app
  • KoboldCpp logoKoboldCppcommunity · desktop app
  • LocalAI logoLocalAIcommunity · inference server

Quantised versions and downloads

RepositoryFormatQuantSizeDownloads
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFQ2_K2.0 GB1.9K
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFQ3_K_S2.1 GB1.9K
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFQ3_K_M2.3 GB1.9K
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFQ3_K_L2.5 GB1.9K
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFIQ4_XS2.6 GB1.9K
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFQ4_K_S2.6 GB1.9K
empero-ai/Qwen3.8-4B-Distill-GGUFGGUFQ4_K_M2.8 GB567.8K
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFQ4_K_M2.8 GB1.9K
mradermacher/Qwen3.8-4B-Distill-GGUFGGUFQ5_K_S3.1 GB1.9K
empero-ai/Qwen3.8-4B-Distill-GGUFGGUFQ5_K_M3.2 GB567.8K

About Qwen3.8-4B-Distill

Qwen3.8-4B is a full-parameter distillation of Qwen3.8 2.4T A95B into the Qwen3.5-4B architecture. The student was trained on ~45,000 curated teacher traces from our internal Qwen3.8 distillation datasets — dense chain-of-thought spanning mathematics, general reasoning, and instruction following, quality-filtered before training. The objective: bring the reasoning behavior of a frontier-scale teacher into a 4B that runs comfortably on consumer hardware. • Distilled chain-of-thought — every answer opens with a block learned directly from Qwen3.8 2.4T A95B traces rather than synthetic self-generated reasoning. • 4B weight class — bf16 fits in ~8 GB; quantized builds run on laptops and consumer GPUs. • Native function calling per Qwen3.5's specification — no wrapper or tool-specific fine-tune required. • 262,144-token native context, inherited from the Qwen3.5 base. • Full fine-tune — every parameter updated; not an adapter. • Type: Causal Language Model (text path of a vision-language base) • Base: Qwen/Qwen3.5-4B • Number of Parameters: 4B • Training: SFT (off-policy distillation) on ~45,000 teacher traces • Teacher: Qwen3.8 2.4T A95B (internal distillation datasets) • Context Length: 262,144 natively

Full model card on Hugging Face →

Alternatives to Qwen3.8-4B-Distill

All alternatives →
nvidia logo≈4.2 GB

NVIDIA-Nemotron-3-Nano-4B-BF16 is a small language model (SLM) trained from scratch by NVIDIA, and designed as a unified model for both reasoning and non-reasoning tasks. It responds to user queries and tasks by first generating a reasoning trace and then concluding with a final response.

4B256K ctx nvidia-nemotron-open-model-license
1.9MMar 2026gguf
Qwen logo≈4.0 GB

We introduce the updated version of the Qwen3-4B non-thinking mode, named Qwen3-4B-Instruct-2507, featuring the following key enhancements:

4B256K ctx Apache 2.0
2.7MAug 2025gguf
Nanbeige logo

Nanbeige4.2-3B

Nanbeige·Chat

≈3.7 GB

Nanbeige4.2-3B is a compact agentic model built on Nanbeige4.2-3B-Base, designed to combine strong agentic behavior with broad reasoning and alignment capabilities. Its Looped Transformer architecture reuses the transformer layers to increase model capacity without adding parameters.

4.2B256K ctx Apache 2.0
89.1KJul 2026gguf
Qwen logo

Qwen3-4B

Qwen·Chat

≈4.0 GB

Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models.

4B40K ctx Apache 2.0
3.1MApr 2025ollama
XHToken logo

Spark-X2.6-4B

XHToken·Chat

≈4.1 GB

A little over a month has passed since Spark-X2.5. In the rapidly evolving world of AI agents, that is enough time to rethink, refine, and move the frontier forward.

4.1B1M ctx Apache 2.0
30.8KOct 2026gguf
ibm-granite logo

granite-4.1-3b

ibm-granite·Chat

≈3.1 GB

Model Summary: Granite-4.1-3B is a 3B parameter long-context instruct model finetuned from Granite-4.1-3B-Base using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets.

3.4B128K ctx Apache 2.0
436KApr 2026ollama

Qwen3.8-4B-Distill FAQ

How much VRAM does Qwen3.8-4B-Distill need?
About 4.3 GB at Q4_K_M with an 8K context. Q8_0 needs about 6.3 GB and full precision about 11 GB. Longer contexts need more memory for the KV cache.
Can Qwen3.8-4B-Distill run on the RTX 4060?
Yes. It fits at Q8_0 (about 6.0 GB), at an estimated 30 tokens/s. It fits comfortably on the Apple M4 (16 GB), Radeon RX 6700 XT, RTX 3060 12GB.
Can I use Qwen3.8-4B-Distill 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.8-4B-Distill?
262,144 tokens (256K). The full window needs far more memory than an 8K context.
How do I run Qwen3.8-4B-Distill with Ollama or llama.cpp?
With Ollama: ollama run hf.co/empero-ai/Qwen3.8-4B-Distill-GGUF:Q4_K_M. With llama.cpp: llama-server -hf empero-ai/Qwen3.8-4B-Distill-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.