mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1989] [CLOSED] STRATA_HC_HOST=1: hyper-connection down/up pairs in pinned host memory (opt-in, CUDA) #3793
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#3793
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1989
Author: @zsariboga
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:pr-hc-host📝 Commits (1)
fc0362bSTRATA_HC_HOST=1: hyper-connection down/up pairs in pinned host memory (opt-in, CUDA)📊 Changes
6 files changed (+175 additions, -8 deletions)
View changed files
📝
include/strata/core/weights.hpp(+12 -0)📝
src/core/layer.cpp(+30 -6)📝
src/core/native_dense.cpp(+15 -2)📝
src/core/weights.cpp(+12 -0)📝
src/prefill/prefill.cpp(+70 -0)📝
src/program/generate.cpp(+36 -0)📄 Description
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
7695859a+ this commit), the same config in both arms exceptSTRATA_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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.