mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2693] Feature request: KV cache quantization (--kv int8 / --kv q4_0) for the Qwen3.6-35B-A3B (strata-q36) path #1074
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1074
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TorBere on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2693
The q36 path keeps its KV cache in fp32 (
src/qwen35; 45,056 B per context cell). On a 12 GB card that is the wall for long contexts: at--max-context 131072the KV alone takes ~5.9 GB, so no routed expert stays in VRAM at all (engine log:0 of 256 per layer in VRAM). The Flash-Next path already offers--kv int8/--kv q4_0/k8v4; on the q36 path, setting--kv int8changes nothing (same KV size, same placement).Setup: RTX 3060 12 GB, Ryzen 7 5800XT, 64 GB RAM, Windows 10, Strata 0.1.44.1 (ready-made CUDA 13 engine),
unsloth/Qwen3.6-35B-A3B-MTP-GGUFUD-Q4_K_XL (setup's pinned file, SHA-256 checked), config as setup writes it (--native <gguf> --max-context N --prefill auto --mtp 2).Measured (greedy, 120-token answers, warmup + 2 runs each, after a fresh start):
--mtp 2) is worth +40–44% here (46 vs 32 tok/s at 64K; 34 vs 24 at 128K) — it stays on.Why this fits the existing code: Qwen3.6's
head_dimis 256 — the exact size of the FWHT-256 rotation used by--kv q4_0(PR #21). With int8 (1,056 B per cell) or q4_0 (576 B per cell) the 128K KV shrinks from ~5.9 GB to ~1.4 GB / ~0.76 GB: ~4.5–5.1 GB back for experts at 128K and 3–6x less KV traffic per decoded token (related: #2464, where decode falls with context on a V100).Happy to run A/Bs (int8 vs q4_0 vs fp16, several contexts) on the 3060 if that helps.
@rintic-13 commented on GitHub (Oct 15, 2026):
You can use Qwen Flash Next to create Q 5_1 with Hadamar rotation in the code, Q4_0 is unacceptable for KV
@TorBere commented on GitHub (Oct 15, 2026):
i've already made the change and set it to 8/8. This way it runs at 59 instead of 33 t/s with mtp=3. Pull request is up.
@merbanan commented on GitHub (Oct 16, 2026):
I use k8v4. That seems to work ok.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.