mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2532] [CLOSED] feat(setup): add --engine-args to pass extra engine flags to the run config #4102
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#4102
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/2532
Author: @hlo-world
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:setup-engine-args📝 Commits (2)
467dc59feat(setup): add --engine-args to pass extra engine flags to the run config4511882fix(setup): address the --engine-args review - arity-aware merge, calibration re-apply, tests📊 Changes
2 files changed (+151 additions, -6 deletions)
View changed files
📝
setup.py(+93 -5)📝
tools/test_setup_qwen36.py(+58 -1)📄 Description
Motivation
setup.sh already exposes some of the engine's flags as its own options (--context, --kv, --vram-reserve-mib, --parallel, ...), but the engine has far more levers than setup has options: the MTP verify depth (--spec) and the prefill chunk size (--prefill), for example, have no setup-side switch. A user who wants them has to hand-edit the generated run config - and a later setup run can rewrite that edit out from under them.
This PR adds one generic switch instead of one option per engine flag:
--engine-args, a shell-quoted string of extra engine arguments appended to the model's engine arguments, in both install paths (own-path families and ready-made packs).How it works
--engine-argstakes a shell-quoted string, e.g.--engine-args '--prefill 1024 --spec 3'. Parsed with shlex, so quotes around individual values work.--engine-args --prefill 1024overrides setup's--prefillinstead of leaving two occurrences. The engine takes the last occurrence of a flag either way. A two-value flag (such as--control-vector-layer-range) is matched by its value count, so it is replaced whole.--prefill 2048becomesauto) skips a--prefillnamed in the extras: that value is the user's own, not a legacy default.engine_args_extra(added to SETUP_KEYS), so re-running setup keeps the extras without re-passing them; passing the flag again overrides the saved value.--engine-args ''clears them.--engine-argsrun throughinstall_own_pathin tools/test_setup_qwen36.py.Usage
The generated run config's
argsends with the extras, and a later./setup.shrun for the same model keeps them.Review response (second revision): the three reported issues are fixed - the test Namespace gains
engine_args(plus end-to-end and unit coverage for the option), the merge matches same-named flags by their value count so a two-value flag is replaced whole instead of leaving a stray token, and the saved extras are re-merged right after eachCAL.applyso a user-chosen value stays on top of the calibration. tools/test_setup_qwen36.py passes (21 tests), as does the rest of the setup/calibrate suites.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.