smtek/ Qwen3.8-27B-AD:map-k4v-128k

254 1 month ago

AtomicChat/Qwen3.8-27B-GGUF IQ4_XS optimized for 24 GB + map-k4v

vision
ollama run smtek/Qwen3.8-27B-AD:map-k4v-128k

Details

1 month ago

b3982c0c7dcd · 17GB

qwen35
·
27.3B
·
Q8_0
clip
·
461M
·
F16
{ "draft_ngram_map_k4v_min_hits": 1, "draft_ngram_map_k4v_size_m": 48, "draft_ngram_map_
{{ .Prompt }}

Readme

The Qwen3.8-27B model optimized for Ollama, utilizing the Atomic Dynamic (AD) layout structure to reduce quantization loss.

Model Overview

  • Model Name: smtek/Qwen3.8-27B-AD
  • File Size: ~17 GB
  • Context Window: 160K tokens
  • Capabilities: Text, Image (Vision)
  • Default Tag: IQ4_XS

Recommended Optimization

By default, Ollama allocates the KV-Cache in f16, which will exceed VRAM over long contexts. To run stably up to the full 256K window, set these environment variables in your system (/etc/systemd/system/ollama.service.d/override.conf on Linux):

[Service]
Environment="OLLAMA_FLASH_ATTENTION=1"
Environment="OLLAMA_KV_CACHE_TYPE=q8_0"
  • Flash Attention: Dramatically reduces context memory footprint.
  • q8_0 Cache: Compresses context tensors without the severe logic degradation caused by 4-bit (q4_0) cache quantization.

After editing, reload and restart:

sudo systemctl daemon-reload
sudo systemctl restart ollama

Important: custom Ollama build

The map-k4v, MTP3 + map-k4v, and DFlash2 + map-k4v tags use speculative-decoding fields that stock Ollama does not forward to llama.cpp. Stock Ollama still works for each clean baseline tag, but it does not activate these custom draft routes.

Build and run the custom runtime from the Ollama source. Build notes, local patches, and updates are maintained on Samuel Ishida’s GitHub.

cmake -B build .
cmake --build build --parallel 8
./ollama serve

For this tag set, use the custom launcher from the patched checkout:

scripts/ollama-ngram.sh build --full
OLLAMA_NGRAM_GPU_MASK=1 scripts/ollama-ngram.sh start-custom

The published tags remain usable as normal Ollama models. The custom build is needed only when users want the configured speculative route. Hardware, driver, GPU, cache type, and context size affect results; numbers below are local measurements, not universal guarantees.

Configuration:

draft_spec_type=draft-mtp,ngram-map-k4v
draft_num_predict=3
draft_ngram_map_k4v_size_n=12
draft_ngram_map_k4v_size_m=48
draft_ngram_map_k4v_min_hits=1

Short agentic result

Two agentic coding turns, 128 output tokens per turn, 50K-token synthetic repository, 65,536-token context, q4_0 K/V cache, batch 256, greedy seed 42, one cold run per arm, full Vulkan offload on RX 7900 XTX device 1:

Arm Aggregate decode tok/s Speedup Parity
IQ4_XS baseline 30.36 1.00x PASS
MTP3 + map n=12 61.06 2.01x PASS
MTP3 + map n=24 60.17 1.98x PASS
MTP3 + map n=32 57.27 1.89x PASS

Use n=12, m=48, min_hits=1. AD DFlash2 + map arms measured 48.01–49.34 tok/s but failed strict parity, so no AD DFlash2 tag is included in this push.

For more details, please refer to the source repository on https://huggingface.co/AtomicChat/Qwen3.8-27B-GGUF