mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4874] [Engine] Support turbo8 KV cache and VBR (--vbr-entry t8) to free up VRAM for Vision at long context #2238
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#2238
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 @eeGorre on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4874
In Strata, the default 8-bit KV cache (
--kv int8/q8_0) holds a static 8.5 bpv across all layers, while dropping globally toq4_0at 64K–128K+ context causes a noticeable perplexity hit. When Vision (mmproj, ~1.1 GiB VRAM) is enabled on 12–24 GB GPUs, it directly competes with long-context KV cache and cached MoE experts.It would be great to port
turbo8and dynamic VBR (--vbr-entry t8) from spiritbuun/buun-llama-cpp, where--vbr-entry t8is the specifically recommended configuration forQwen3.8-Flash-Next.buun-llama-cppis also under the MIT license, so theturbo8kernels can be adapted directly...turbo8uses fewer bits per value (8.125 bpv vs 8.5 bpv forq8_0), achieves slightly better perplexity (5.693 vs 5.698 at the same0.00020median KLD), and decodes faster (28.6 t/s vs 27.4 t/s).turbo8(--vbr-entry t8) givesturbo8quality from token 1, and as context grows and VRAM fills up, it dynamically steps down only the least-sensitive(layer, side)tensors along the Turbo ladder (turbo8 → turbo4at 4.125 bpv /0.00090KLD, which is lower KLD thanq4_0at0.00115). This reclaims gigabytes of KV VRAM at long context with near-zero quality loss, opening the exact VRAM window needed to keep Vision (mmproj) on GPU without evicting MoE experts.buun-llama-cppalso implements on-demand GPU swapping formmproj(keeping it in RAM and swapping to GPU for ~1–2s only when an image arrives), which pairs well with this setup.