Files
Strata/app
Niko1221 c8d70bbcdc RAM budget per mode: "Leave 20% for my work" keeps RAM less 24 GB, Full performance and the Terminal get RAM less 17 GB; 0.2.16 configs move once; the reading rounds up to the PC's size
Owner decisions 11-19. Setup writes both numbers in the run config: --resident-budget-gib in args is the new rule (47 on 64 GB), and "ui_budget_work_gib" is the old
rule (40) from the same function (resident_budget_gib(work=True)). The app's "Leave 20% for my work" swaps the second one into args and records what it replaced in the
resource baseline (setupBudget); "Full performance" runs with setup's number and puts it back after a work load. The app holds no copy of the rule. The key is left out when
setup was asked for a budget, when the config keeps one of the person's (user_args, an edit of args), and where the two rules agree (a unified-memory GPU, 24 in both; every
expert in RAM). A budget, --ram-keep-gib, STRATA_RAM_KEEP_GIB or STRATA_RESIDENT_HEADROOM_GIB of the person's wins in every mode.

A 0.2.16 config (setup's old number, args_written equal, no second number) moves once at the first command of the new Control (strata.py -> strata_cli/ram_budget_move.py,
setup.migrate_ram_budget): 40 -> 47 on 64 GB, 24 -> 31 on 48 GB, 8 -> 15 on 32 GB, with the old number as the work number. A number the person set, a unified-memory PC
and a layer split are not touched; the earlier file is kept as .bak, a second run changes nothing, and a config with nothing to move is not written.

The RAM reading is rounded up to the size the PC is sold with (16/24/32/48/64/96/128/192/256, then a multiple of 8) where it reads within 3% under it, only in the budget rule:
a 64 GB Windows PC (63.1) gets 47 like Linux, a PC with 60 GB gets 43.

Tests: terminal/tools/test_setup_rammode.py, app/host/tests/resource-rammode.test.mjs, goldens regenerated with the repo's generators, docs (UNSLOTH_Q4.md, DETAILS.md).
2026-11-19 16:51:47 +01:00
..