Repository navigation
setup: UD-Q4_K_XL / UD-IQ4_XS keep their RAM budget on a layer split (#642) - #1564
ShevchenkoVadim wants to merge 1 commit into
Conversation
…iko1221#642) Engine 0.1.40 (fe9c10c, Niko1221#848) keeps the resident RAM copy on a layer split - every stage's cache left out of it, the rest ranked by the whole expert profile - and --resident-budget-gib runs through the same code (pin_cache_complement), so the old engine refusal of the budget on a split is gone. setup.py's split_mmap() got the matching exemption (43c8cfa), but the budget's three paths still assumed the old engine (Niko1221#498): - split_budget(): a start of a budget config on several GPUs deleted --resident-budget-gib (and asked for ~135 GB of RAM below that); - offer_together(): a budget config was offered both cards only with ~135 GB of RAM, and "on both it has no budget"; - unsloth_together() / q4_split at install: --gpus, or "2" when asked, dropped the budget, and an explicit --resident-budget-gib kept one GPU. From RESIDENT_SPLIT_ENGINE the budget is kept in all three, at any RAM. The recommendations stay as they were (the golden configs are unchanged): one GPU by default at install, "n" by default when a start offers both cards, --yes alone one GPU; the split is taken only when asked for. Tests: the Niko1221#498 tests run with MIN_ENGINE pinned before RESIDENT_SPLIT_ENGINE (as test_setup_risk's StartOnSeveralGpus does for Niko1221#642), three new ones run the kept budget; tools/test_setup_*.py on Linux: 421 tests, the 2 failures of test_setup_engine_hash are the same without this change (no ready-made 0.1.41 engine to download in the test box). Measured with engine 0.1.41 on an RTX 3090 (x16) + RTX 3080 Ti (x4), 91 GB of RAM, UD-Q4_K_XL, budget 64 GiB: the auto split gives the x4 card layers 0-1 (678 slots) and the 3090 layers 2-47 (4,182 slots); 57.6 GiB of experts in RAM, no file-tier reads per request; decode 45.0 / 45.1 tok/s (two runs) against 38.4 on the 3090 alone, a 20K prompt in ~18 s on both. Answers checked by hand. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thank you, ported with your authorship and your measurements (UD-Q4_K_XL on a 3090 plus a 3080 Ti, 45 tok/s against 38 on the 3090 alone). With an engine that keeps the resident RAM copy on a layer split, setup now keeps the RAM budget on several GPUs at any RAM; one GPU stays the recommendation. Your new tests are in, and the older #498 tests are pinned to the engine they describe. |
|
Thanks for the pull request. Your change is already in If part of your work did not make it in and you want it considered, open a new pull request on top of |
Title
Issue: related to #1145 (the comment there: setup is stale for UD-IQ4_XS on several GPUs, a hand-built config was needed)
Summary
Since engine 0.1.40 (fe9c10c, #848) the resident RAM copy works on a layer split - every stage's cache is left out of it and the rest is ranked by the whole expert profile - and
--resident-budget-gibruns through the same code (pin_cache_complement), so the engine no longer refuses the budget on a split.split_mmap()got the matching setup exemption in 43c8cfa, but the RAM budget's setup paths still assume the old engine (#498): a start of a UD-Q4_K_XL / UD-IQ4_XS config on several GPUs deletes--resident-budget-giband asks for ~135 GB of RAM, and--gpusat setup drops the budget too.This keeps the budget on a split from
RESIDENT_SPLIT_ENGINE, gated exactly like #642. The recommendations do not change (golden configs unchanged): one GPU stays the default; the split is used only when asked for.What changed
setup.pysplit_budget(): returns without touching the config whenresident_split()(assplit_mmap()does).offer_together(): a budget config is offered both cards at any RAM, with a message that the budget is kept; the default answer stays "n".unsloth_together(): with--gpus(also with an explicit--resident-budget-gib) or "2" when asked, the cards go together with the budget; asked as before with one GPU recommended;--yesalone keeps one GPU.q4_split(the "split without the budget" path) only beforeRESIDENT_SPLIT_ENGINE, so--resident-budget-gibstays in the args.tools/test_setup_unsloth.py: the setup: offer the layer split (--gpus) for UD-Q4_K_XL when the GGUFs fit in RAM — the engine already runs it without the budget (2x RTX 3090: 31 → 64-78 tok/s) #498 tests run withMIN_ENGINEpinned to 0.1.39 (asStartOnSeveralGpusdoes for A dual-GPU fork for 32 GB PCs (resident mode on a layer split, pipelined windows) #642); three new tests cover the kept budget at install (--gpus, explicit budget, the "2" answer) and at a start (--gpusat 165 and 64 GB, the offer).docs/UNSLOTH_Q4.md,docs/MULTI_GPU.md: the budget on a split.Extra Notes
Tests:
python -m unittest discover -s tools -p "test_setup_*.py"on Linux (the strata Docker image,STRATA_EXECVunset): 421 tests; the 2 failures intest_setup_engine_hashare the same on main without this change (no ready-made 0.1.41 engine to download from the test box).Measured on real hardware, engine 0.1.41, this branch's setup.py starting the config: RTX 3090 (PCIe x16) + RTX 3080 Ti (x4), i9-14900K, 91 GB RAM, UD-Q4_K_XL, budget 64 GiB, 262K context,
--no-prefill-borrow --prefill 4096, images on:Answers checked by hand (arithmetic, a list, an image). Before this change the same config on two cards lost its budget at every start.
Resident RAM mode on a layer split — 3 GPUs, UD-IQ4_XS, 40 GB RAM (engine 0.1.40) #1145 ran
--resident-budget-gib 18on a 3-GPU split with engine 0.1.40 for 2 hours without crashes, NaN windows or stalls - the engine side of this.Not changed: the default stays one GPU for these models. On this box the split was +17% decode; whether two cards should become the recommendation (as A dual-GPU fork for 32 GB PCs (resident mode on a layer split, pipelined windows) #642 did for the low-RAM mode) is your call.
🤖 Generated with Claude Code