Repository navigation
Conversation
…y (opt-in, CUDA) On a 12 GB card the 192 hyper-connection down/up projections (1.17 GiB BF16) compete with the expert cache. With STRATA_HC_HOST=1 they are loaded through the same loader into a temporary device arena (so they take the engine form), copied once into pinned mapped host memory, and the arena is freed: - the verify windows read the Q8_0 copy (needs STRATA_HC_Q8=1; a native GGUF's BF16 hc rows also get a load-time Q8_0 copy, so the Q8 read is taken there too); - the prompt path stages a layer's pair to the device on its own stream, two slots, the next half's pair copied while this half computes (without staging it read them over PCIe: 1,900 -> 220 tok/s). The freed VRAM goes to the expert cache. Off by default: without the variable nothing changes. Measured on an RTX 5070 Ti Laptop 12 GB, Core Ultra 7 255HX, 64 GB, Windows 11, Swift 1.5 IQ3_XXS (GSQ-RCO), 32 real opencode agent turns, 256 tokens each, temperature 1.0, engine ms/token, mirrored run orders. On this branch: expert cache 2494 -> 3221 slots, CPU expert time per window -15%, decode -0.9% (noise). With cache-aware routing (PR Niko1221#1017, on my fork): 2968 -> 3221 slots, -8.4% ms/token, the two-slot prompt staging another -1.3%; prompt reads unchanged.
Owner
|
Thanks for the clear write-up. On this tree the change is -0.9% (noise) because the larger cache only pays through cache-aware routing, which is not in main, and the files around it have moved (the HC_Q8 views). We are not porting it now. If routing lands, or you can show a gain of a few percent on current main, please send a rebased version. |
Owner
|
Thanks for the pull request. 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 review 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:
The rules are in CONTRIBUTING.md. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
STRATA_HC_HOST=1(opt-in, CUDA): the 192 hyper-connection down/up projections (1.17 GiB BF16 on Swift 1.5 IQ3_XXS)leave VRAM and live in pinned, mapped host memory. The freed VRAM goes to the expert cache.
into pinned mapped host memory, and the arena is freed.
STRATA_HC_Q8=1. A native GGUF whose hc down/up rows are BF16(the GSQ-RCO quants) now also gets a load-time Q8_0 copy, so the Q8 read is taken there too.
while this half computes. Without staging it read the pair over PCIe and prompt reads fell from ~1,900 to ~220 tok/s.
Without the variable nothing changes: the default path is the same code as before.
Why
On a 12 GB card the expert cache is what decides decode speed, and the hyper-connection pair is the largest dense
block left in VRAM. With
STRATA_HC_Q8=1the decode windows already read the Q8_0 copy, so the BF16 pair is onlyneeded by the prompt path, which can stage it.
Measured
RTX 5070 Ti Laptop 12 GB (PCIe 5.0 x8), Core Ultra 7 255HX, 64 GB DDR5-5600, Windows 11, Swift 1.5 IQ3_XXS (GSQ-RCO),
this branch (main 7695859 + this commit), the same config in both arms except
STRATA_HC_HOST:STRATA_HC_HOSTunsetSTRATA_HC_HOST=1Agent decode: 32 real opencode turns from held-out sessions, 256 tokens each, temperature 1.0, engine ms/token,
order off, on, on, off. On this branch the bigger cache takes ~15% of the CPU experts' time away, but the decode
window barely moves (-0.9%, inside the run-to-run noise): with the stock routing the GPU side is the longer path here.
On my daily fork, which also runs cache-aware routing (PR #1017) and so turns cache slots into speed much more
directly, the same change (2,968 -> 3,221 slots there) measured -8.4% ms/token, and the two-slot prompt staging another -1.3%; warm prompt reads were unchanged (1,923 vs
1,868-1,909 tok/s).
Checked
STRATA_HC_HOSTis read only there.About me
I run Strata every day on a gaming laptop (the hardware above) as the backend of opencode, and keep a fork with the
measurements, the config and the rejected experiments in
docs/LAPTOP_12GB_TUNING.md
(55 -> ~140 tok/s engine decode on this laptop since 0.1.38). My earlier PRs: #1536, #1537.