mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3563] [Benchmark] RTX 3070 16GB (modded) + DDR4 — ~60 tok/s decode with --kv-resident freeing VRAM for experts #1464
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#1464
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 @907739769 on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3563
Real-world numbers from multi-turn agent workloads (Hermes Agent / opencode) on an older desktop platform (PCIe 3.0, DDR4, 6-core CPU). Posting mainly because the same machine went from ~45 to ~60 tok/s median decode after a config change, and the biggest factor looks like
--kv-residentfreeing VRAM for the expert cache. This may help other 12–16 GB card owners.Related: #3558 (RTX 4060 Ti 16GB, ~39 tok/s median decode).
TL;DR
--kv-resident 32768)1. Hardware and runtime
nvidia-smi -lmc 7000,7000(core not locked) — done for driver stability (TDR), not tuningRuntime configuration (click to expand)
--max-context--kv--kv-resident--resident-experts--expert-cache--vram-reserve-mib--spec/--spec-min-p--mtp--pcie-frac--adapt-every/--adapt-swaps/--adapt-decay/--adapt-async--prefillproject, per-layerSTRATA_ROUTE_RESIDENT=0.52. Decode
Current config, 106 completed requests over two engine sessions (Oct 20–21):
By prompt length (output ≥64 tokens)
The current config has few requests above 64K, so the second column adds 3 earlier sessions where only
--vram-reserve-mibdiffered (900 / 1536 instead of 768).Unlike #3558, I see no clear drop with prompt length up to ~88K. Decode varies more with draft acceptance, which depends heavily on content: tool-call JSON drafts very well.
3. Prefill
Prefill is slower than #3558 (~1,205 tok/s), which fits the older CPU, DDR4 and PCIe 3.0. Requests reusing ≥90% of the prompt (n=62) had a median prefill time of 2.7 s.
4. Caches and speculation
With
--kv-resident 32768, almost all K/V reads still hit VRAM at these prompt lengths, so moving most of the KV to RAM cost very little.5. Before and after on the same machine
Same hardware and model. The earlier sessions used a simpler config:
--kv-resident--vram-reserve-mib--spec-min-pSeveral things changed at once and the workloads differ, so this is not an A/B test. The log does show the mechanism for the biggest one, though: keeping only 32K KV cells per layer in VRAM plus a smaller reserve roughly doubled the expert cache, and the hit rate rose from ~72% to ~86%. On a 16 GB card running a model whose experts mostly live in RAM, that seems to matter more than anything else.
Suggestions for other 12–16 GB users (to try, not proven)
--kv-resident 32768(or similar) and check thatexpert cache auto: X GiB freeincreases at startup.--vram-reserve-mibcarefully — see the caution below.--adapt-async 1with--adapt-every 2 --adapt-swaps 80.--spec-min-p 0.70with 0.50 on your own workload.6. Caution: VRAM headroom
With
--vram-reserve-mib 768, the engine warns that only 536 MiB of VRAM is free at request start (below its 1,024 MiB guideline, #2065), meaning the driver may page GPU memory and decode can collapse. I have not seen that during these sessions, but this is close to the edge. On a card that also drives a display, use a larger reserve.7. Limitations
@dandandelion commented on GitHub (Oct 21, 2026):
What kind of RAM headroom do you have when pushing approximately 75% of kv cache in RAM? Mine is already reaching ~57-58GiB out of the ~62GiB usable and that's all kv in VRAM.
Edit: AH you use IQ3_XXS, sorry didn't see that. I use IQ3_S
@907739769 commented on GitHub (Oct 21, 2026):
@dandandelion Less than you might expect. Numbers from the engine log of the current config (262K context, KV INT8):
KV streaming: 32768 of 262144 cells per QSA layer in VRAM, the K/V in 3.09 GiB of pinned RAM. So about 87.5% of the KV cells are in RAM, but that whole part is only 3.09 GiB at 262K, because only the QSA layers' K/V is streamed.--resident-experts). That's less than with all KV in VRAM, because the bigger GPU expert cache (5,158 slots / 8.37 GiB) keeps more experts off the RAM copy..wslconfig) and Chrome etc. are running, so this is a normal desktop, not a clean box.So
--kv-residentcosts roughly 3 GiB of RAM at 262K and freed ~3 GiB of VRAM, which went to the expert cache. If you're at 57–58 GiB with everything in VRAM, the VRAM side is probably the bigger lever. Check whatexpert cache auto: X GiB freereports at startup with and without it.I'll follow up with a real long-context run (~190K prompt, and across an agent-side context compression) once it's done.
@dandandelion commented on GitHub (Oct 21, 2026):
My VRAM only has slots for ~2800 experts but it's hitting ~65% to ~75% (+2%-6% from PCIe) VRAM cache hit. It's quite fast with this anyways, so I don't bother tweaking much of this mainly because at IQ3_S, my RAM consumption is at the edge of this box. I can maybe experiment with the kv-cache streaming or kv-grow and bench too. But with the current setup, this is what I'm getting.
@907739769 commented on GitHub (Oct 21, 2026):
Follow-up: long-context run to ~197K, plus agent-side compression
Same config as above (262K max context,
--kv-resident 32768, 8 GiB conversation cache, single slot). One Hermes Agent session doing news lookups / web searches, grown from ~25K to 196.5K tokens until Hermes' context compression kicked in, then continued for ~25 more turns. 97 requests in total, all parsed from the engine log.Decode stays flat up to ~197K
Output ≥64 tokens:
Incremental turns at long context are cheap
What compression costs
At 196.5K, Hermes compressed the context:
So compression costs about 4.5 minutes one time, mostly spent generating the summary. Decode speed is unaffected. After compression, 26 turns ran at a median of 59.4 tok/s.
Takeaways
--kv-resident 32768doesn't seem to hurt long context: ~57 tok/s at 190K+ versus ~59 below 64K.Same caveats as before: real workload, one session, not a controlled sweep.
@Niko1221 commented on GitHub (Oct 22, 2026):
Thanks — I'll add the RTX 3070 16 GB --kv-resident result (~60 tok/s, up from ~45) and the 197K follow-up to docs/COMMUNITY_BENCHMARKS.md, marked as observational.
@Niko1221 commented on GitHub (Oct 29, 2026):
Thank you for measuring this and writing it up. We are building a Strata website with a page for community benchmarks, and results like these will be added there when it launches, so we are closing this here. If your numbers change with a new version, you are welcome to post them again.