15 Downloads Updated 3 days ago
ollama run dna5rm/qwen3.8:27b-128k
Updated 3 days ago
3 days ago
ea9c3609c7a3 · 18GB ·
Qwen3.8-27B Q4_K_M, default context 131072, tuned for a 32 GB NVIDIA RTX 5090.
qwen3.8:27b-q4_K_M (17 GB, native 262144, vision + tools + thinking)ollama pull dna5rm/qwen3.8:27b-128k
Weights ~18 GB. Hybrid attention: only 16 of 64 layers keep a full KV cache (4 KV heads × dim 256). FP16 KV at 262144 tokens is 16 GiB on top of weights (~34 GB+) — does not fit 32 GB.
| Context | KV (q8_0) | Approx loaded VRAM |
|---|---|---|
| 32K | ~1 GB | ~21–23 GB |
| 128K (this tag) | ~4 GB | ~24–27 GB |
| 192K | ~6 GB | ~27–30 GB |
| 256K | ~8 GB | ~29–32 GB (no margin) |
[Service]
Environment=OLLAMA_FLASH_ATTENTION=1
Environment=OLLAMA_KV_CACHE_TYPE=q8_0
Environment=OLLAMA_NUM_PARALLEL=1
Environment=OLLAMA_MAX_LOADED_MODELS=1
Environment=OLLAMA_GPU_OVERHEAD=1073741824
q8_0 KV requires flash attention. Without it Ollama stays on f16 KV and 128K will be tight / spill.
Do not use 27b-q8_0 (~30 GB weights) on 32 GB.
FROM qwen3.8:27b-q4_K_M
PARAMETER num_ctx 131072
PARAMETER temperature 1
PARAMETER top_k 20
PARAMETER top_p 0.95
PARAMETER min_p 0
PARAMETER repeat_penalty 1
PARAMETER presence_penalty 0
Upstream sampling left as-is. Architecture still reports 262144 max; default allocation is 128K.
ollama show dna5rm/qwen3.8:27b-128k
ollama run dna5rm/qwen3.8:27b-128k
# another terminal:
ollama ps
# expect 100% GPU, CONTEXT 131072
num_ctx toward 196608 only with OLLAMA_KV_CACHE_TYPE=q8_0 and nothing else on the GPU.