35
submitted 3 weeks ago by yogthos@lemmy.ml to c/technology@lemmy.ml
  • Qwen3.8-27B-i1-IQ4_XS-GGUF-Smaller is a custom hybrid quantization specifically designed to fit Multi-Token Prediction (MTP) and long contexts into a 16GB VRAM budget.
  • Jinja chat template helps use fewer thinking tokens without noticeably affecting quality, which is great for speed.
  • And the final ingridient is beellama.cpp engine which supports the kvarn KV cache types needed for this optimization.

Here's a command to start the server, the magic is in the kvarn cache settings and the tail precision:

"$LLAMA_DIR"/llama-server \
    -m "$MODEL_PATH" \
    -a "$MODEL_NAME" \
    --port 11434 \
    --temp 1.0 \
    --top-p 0.95 \
    --top-k 20 \
    --min-p 0.0 \
    --presence-penalty 0.0 \
    --repeat-penalty 1.0 \
    --parallel 1 \
    --n-gpu-layers 99 \
    --batch-size 1024 \
    --ubatch-size 256 \
    --flash-attn on \
    --spec-type draft-mtp \
    --spec-draft-n-max 2 \
    --cache-type-k kvarn5 \
    --cache-type-v kvarn4 \
    --kv-tail-tokens 1024 \
    --ctx-size 100000 \
    --fit-ctx 100000 \
    --jinja \
    --chat-template-kwargs '{"preserve_thinking": true, "reasoning_effort": "medium"}' \
    --chat-template-file "$MODEL_JINJA" \
    --no-mmproj-offload \
    --threads 7 \
    --threads-batch 8 \
    --metrics \
    --verbosity 3 \
    --perf

This should give you around 50 tok/sec using just under 16GB of VRAM.

The kvarn5 (K) / kvarn4 use the kvarn types from beellama to balance memory and quality. Using speculative decoding --spec-type draft-mtp with 2 draft tokens gives another speed boost. The --kv-tail-tokens 1024 precision tail is key for keeping recent tokens at higher precision to preserve output quality. Finally, the near-lossless kvarn quantization for the KV cache is the real star here. It delivers q5-class fidelity at q4-class memory usage, which is incredible.

top 2 comments
sorted by: hot top new old
[-] bruce965@lemmy.ml 1 points 2 weeks ago

Hi, thanks for posting this guide!

I tried it on a modern laptop with 32GB of unified memory. It starts at 40 tok/s when loading the context, but the output drops to 3 tok/s.

Could I ask you which GPU you are using for these tests? What context size would a 16GB GPU give?

[-] yogthos@lemmy.ml 2 points 2 weeks ago

I saw the guide posted on reddit originally, so not sure which card it was tested with unfortunately.

this post was submitted on 29 Aug 2026
35 points (90.7% liked)

Technology

43300 readers
47 users here now

This is the official technology community of Lemmy.ml for all news related to creation and use of technology, and to facilitate civil, meaningful discussion around it.


Ask in DM before posting product reviews or ads. All such posts otherwise are subject to removal.


Rules:

1: All Lemmy rules apply

2: Do not post low effort posts

3: NEVER post naziped*gore stuff

4: Always post article URLs or their archived version URLs as sources, NOT screenshots. Help the blind users.

5: personal rants of Big Tech CEOs like Elon Musk are unwelcome (does not include posts about their companies affecting wide range of people)

6: no advertisement posts unless verified as legitimate and non-exploitative/non-consumerist

7: crypto related posts, unless essential, are disallowed

founded 7 years ago
MODERATORS