mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #384] Layer split with the low-RAM resident mode: 2-GPU numbers on 16+16 GB / 47 GB RAM (IQ3_XXS and Q2_0) #180
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#180
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 @Gpanazio on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/384
Follow-up to #250 (closed). The answer there was that the low-RAM resident mode runs on one GPU by design. #364 describes a related workaround. These are measurements from a 2-GPU / 47 GB RAM box to help decide whether the setup should offer the layer split here.
Setup
30ec18e)--max-context 131072 --kv int8 --spec 4 --mtp,--expert-cache autoBench: two short prompts (27 tokens → 150–180 generated), then cold 27k and 46k prompts (128 generated). Numbers come from the
strata serve: prompt …log lines.Results
--resident-experts, low-RAM), CPU uncapped"gpu": [0,1],"layer_split": "auto",--resident-expertsremoved), CPU 45 W--gpus 0,1 --low-ram off(layer split 0–24 / 25–47), CPU 45 WCaveat: this host has an unrelated PCIe problem where H2D drops to ~7 GB/s after a load transition. It happened during the 2-GPU runs: the engine probe logged
CUDA1 PCIe probe 7.4 GB/son the IQ3_XXS 2-GPU start, and a measurement after the Q2_0 runs showed 6.9 GB/s. So the 2-GPU numbers are probably a lower bound.Observations
--resident-expertsand a layer split it exits with--resident-cpu-experts does not support layer splits or remote expert caches. Without the flag it runs, but RAM sits at 46/46 GB used and 0 available during long prompts. That works for a bench, but it is fragile next to anything else on the box.Request
--resident-experts(or a variant of it) together with the layer split, so the split IQ3_XXS config can run with predictable RAM instead of filling page cache to 0 available.Happy to rerun anything on this box (including 0.1.31) if useful.
@Gpanazio commented on GitHub (Oct 1, 2026):
Update: IQ3_XXS with the 2-GPU layer split (json edited, no
--resident-experts), CPU uncapped and PCIe healthy this time. The engine probed 28.0 / 27.4 GB/s and the host measured ~26 GB/s before and after the run.The split is ~1.3× faster on short decode, about even at 27k, and 1.6× faster on 46k prefill. RAM was again at 46/46 GB with 0 available during the 46k prompt. The CPU package hit 100 °C because of the stock cooler, so expect some throttling in these numbers.
@Niko1221 commented on GitHub (Oct 1, 2026):
Thank you for the careful numbers. In the next release:
--gpus 0,1is honoured), and explains the RAM cost (see #364).--resident-expertswith a layer split. It will warn that the resident RAM mode doesn't support a split yet and reads the experts the GPUs don't hold through the file cache, which is what your hand-edited config does.A real resident mode across a split (predictable RAM) is a larger engine change. It's on our list, and we'd welcome a rerun on your box when it lands. Keeping this open until the release.
@Niko1221 commented on GitHub (Oct 1, 2026):
Released in 0.1.33: setup offers the layer split on low-RAM PCs (see #364), and the engine runs
--resident-expertswith a split as--mmap-expertswith a warning instead of refusing. One note: your hand-edited config (without--resident-expertsand without--mmap-experts) copied all experts into RAM, which is why it reached 0 free; the mapped mode setup writes now reads them through the file cache instead. A resident mode across a split stays on our list. Thanks!@Gpanazio commented on GitHub (Oct 2, 2026):
Rerun on current main (engine 0.1.34, HEAD
1678de3- includes the 0.1.33 changes), built from source on Linux (Release, sm_120, native experts). Same box: 2x RTX 5060 Ti 16 GB, 47 GB RAM, i9-12900KF. Differences from the first post: CPU not power-capped (new air cooler), and PCIe healthy the whole time (engine probe 27.9 / 27.3-27.5 GB/s, both links stayed Gen5 x8 before and after).IQ3_XXS, 2-GPU layer split (auto, K=24: CUDA0 layers 0-23, CUDA1 24-47),
--max-context 131072 --kv int8 --spec 4 --mtp,--expert-cache auto. One run each, same json, only the experts flag differs.What changed for us
--resident-experts+ layer split now starts. It prints the warning, logsexperts via mmap, and serves normally. No more--resident-cpu-experts does not support layer splits.MemAvailableevery 2 s from load through the long prompts. Lowest value: ~42.0 GB with--resident-experts, ~42.9 GB with--mmap-experts. With the hand-edited json on 0.1.30 it was 0 available at the 46k prompt. (Caveat:MemAvailablecounts reclaimable file cache, so this shows the experts are no longer copied into anonymous RAM, not that file-cache pressure is gone.)Numbers (tokens/s)
--resident-experts+ split (runs as mmap)--mmap-experts+ splitCaveats
--resident-expertsarm ran first with a cold file cache (first request prefilled at 12 tok/s, the 21k prompt at 797 tok/s); the mmap arm ran second on a warm cache. Read the mmap row as the warm case. One run each, no repeats, so the two rows are not an A/B of the flags.iommu=pt, cooler), so the decode gains cannot be attributed to the engine version.Thanks for the quick change. Happy to rerun when the real resident mode across a split lands.
@Gpanazio commented on GitHub (Oct 2, 2026):
Follow-up: a cleaner A/B on the same box (2x RTX 5060 Ti 16 GB, 47 GB RAM, i9-12900KF), same prompts and same json, IQ3_XXS with the 2-GPU layer split, warm file cache. PCIe healthy throughout (engine probe 27.8 GB/s, both links Gen5 x8 before and after), CPU max 68 C, so no throttling.
Arms: (A) engine 0.1.30 with the json from my first post (no
--resident-experts, no--mmap-experts); (B) engine 0.1.34 (main,1678de3) with that same json; (C) 0.1.34 with--mmap-experts. Order A, B, C, C, B, A to cancel ordering effects. Per arm: 2 server starts x 2 requests per size, so 4 per cell. Cells are medians (tokens/s); decode is shown with min-max because it is noisy.--mmap-expertsWhat I take from it:
--mmap-expertsis not faster than 0.1.30 on this box: prefill is about 4-5% lower (1,406 vs 1,473 at 21k, 1,516 vs 1,595 at 35.5k) and decode is within the noise. The earlier decode gains I saw were the host (iommu=pt, cooler), not the engine version.--mmap-experts, against about 0.5 GB with the 0.1.30 json. That is what the change was for, and it costs a few percent of prefill.session is up (engine 0.1.34)and the prompt-path lines, but /health never answered. The same json on 0.1.30 loads in about 40 s. I do not know the cause (RAM pressure is my guess, not verified), and my harness gave up at 600 s, so I cannot say it would never have come up. Mentioning it because it is the "no flag" path your last comment described.One log line to ignore:
cudaMalloc(1538035200) for the weight arena failedappears twice in every run, including the ones that work, so it looks benign.Single box, 4 samples per cell, so treat the 4-5% as indicative, not exact. I can send the raw logs for the B runs if useful.