mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2787] [Feature request] 16-bit KV cache option above 8K context (to A/B against int8) #1119
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#1119
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 @mbaaku on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2787
What: an opt-in
--kv f16(orbf16) for contexts above 8K. Today the choices there areint8(default),k8v4andq4_0; full precision is used only up to 8K.Why: with Qwen3.8-Flash-Next Coder IQ1_M (v0.1.44.1, SYCL, Arc Pro B60,
--kv int8,--max-context 131072) as the model of a coding agent, tool-call formatting degrades with prompt length:<function=Bash></function>, no parameter), 48 in 40 minutes against 19 well-formed ones;The broken calls are already in the raw model output (
STRATA_DEBUG=1), so this is generation, not parsing. It may be the weight quantization alone, but the KV cache is the other quantized part that grows with context, and there is currently no way to rule it out.docs/DETAILS.mdmeasures q4_0 against int8 (perplexity +8–12% on long documents); a 16-bit option would allow the same comparison one step up.What we would measure: the share of malformed tool calls per 10k prompt tokens over the same agent workload with
int8vsf16, from theSTRATA_DEBUGraw output. Happy to post the numbers here.Cost we understand: twice the KV memory of int8, so fewer experts in VRAM or a shorter context. It would be an opt-in for diagnosis and for cards with room to spare, not a new default.
@nghia1930mmm-cmd commented on GitHub (Oct 16, 2026):
2815521
Trên 16 tháng 10, 2026 22:44:23 GMT+07:00, Maciej Fleszar @.***> đã viết:
@nghia1930mmm-cmd commented on GitHub (Oct 16, 2026):
Trên 16 tháng 10, 2026 22:44:23 GMT+07:00, Maciej Fleszar @.***> đã viết:
@christopherrobertbrooks-tech commented on GitHub (Oct 18, 2026):
int8 vs fp16 KV up to ~120K on CUDA (V100): int8 looks safe as the default
On CUDA
--kv fp16already runs at long context (--max-context 131072), so here is the A/B this issue asks for, on the same Coder IQ1_M model. In case it helps with gate G-C too.Setup: Tesla V100-PCIe 32 GB (sm_70), Strata 0.1.41, Coder IQ1_M, everyday config (vision on the GPU, resident RAM mode). Only
--kvchanges between arms: fp16 / int8 / q4_0 / k8v4. Each length uses 4 different stretches of real code and docs, from this repo's own source. Greedy, thinking off. Quality is the KL of the first answer token's distribution against fp16 (fromSTRATA_DUMP_FIRST_LOGITS), plustools/needle_bench.pyat 32K/64K/128K × depths 10/30/50/70/90.For this issue: on this setup the int8 KV cache doesn't change the model's output in any measurable way below 64K, so tool calls breaking at 15–25K are unlikely to come from it. The weight quantization or the agent's context look like better suspects. For gate G-C: setup already writes
int8above 8K, so this suggests the engine default could follow.Data and scripts: https://github.com/christopherrobertbrooks-tech/strata-kv-precision
@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.