mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3785] [Other] --kv fp16 is documented as valid but rejected by setup.py, and strata launch masks it as exit 6 #1595
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#1595
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 @simlu on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3785
Strata bug report —
--kv fp16is documented but rejected bysetup.py, andstrata launchmasks it as exit 6Title
[Other] --kv fp16 is documented as valid but rejected by setup.py, and strata launch masks it as exit 6Area
[Other] (anything else, including setup and installation)Desktop app, Terminal or source?
DockerWhat happened
I set
KV: fp16in the container environment (asdocs/DOCKER.mdinstructs) for astrata:0.2.2-cuda13image. The container crashed within a second with the generic"The model could not be installed." / exit code 6 and an empty error. Running
setup.pydirectly in the container revealed the real cause:--kv fp16is an invalidargparse choice.
Expected: the documented
KV: fp16should be accepted (or at minimum the errorshould say
fp16is not a valid--kvvalue).Actual:
setup.pyrejects--kv fp16at argparse time, andstrata launchswallows the usage error (it is not a
[X]-prefixed line) and reports only the generic"could not be installed" / exit 6 with no error text — so the real cause is invisible.
Smallest steps or command that reproduce it
Docker compose (the minimal trigger —
KV: fp16alone is enough):docker compose up llama-qwen-flash→ crash:To see the real error, bypass the launcher and run
setup.pydirectly in the container:That prints:
Omitting
--kvlets the samesetup.pyrun complete end-to-end (it defaults toint8for a 196608 context). Removing
KV: fp16from the compose lets the container start.Reproduction status
Reproduced locally(on the reporter's machine; both the crash withKV: fp16and thesuccessful run without it)
Strata version
Strata 0.2.2 · engine 0.1.47(imageghcr.io/niko1221/strata:0.2.2-cuda13)Graphics card, memory and system
NVIDIA RTX 3090 ×4 (24 GB) · 192 GB DDR4 · Linux
Model, size and settings
UD-Q6_K_XL(unsloth, Q6_K_XL) · 196608 context · pictures on (VISION: on)Logs
(sanitized — no credentials)
Container output:
setup.py(direct):Root cause (verified against source on
main)setup.py's argparse for--kv(line 7818) lists only["int8", "q4_0", "k8v4"]—fp16is omitted:But
fp16is a real, supported KV cache format elsewhere in the same file:setup.py:8458—kv = "fp16" if ctx <= 8192 else (a.kv or "int8")— fp16 is thedefault for contexts ≤ 8192.
setup.py:6787—UD_FIT_KV_BYTES = {"fp16": 2112, "int8": 1056, "q4_0": 576, "k8v4": 816}—fp16 has a per-token memory budget, like the accepted formats.
strata_cli/launch/runner.py:146/:197— the start path normalizes KV withwant_kv = s.kv or ("int8" if (s.context or 32768) > 8192 else "fp16"), so fp16 isfully handled at launch/start time.
So the engine and the launcher both understand fp16; only the
setup.pyargparsechoiceslist omits it. The fix is a one-word addition.Why the real error is hidden (runner.py)
runner.py:749spawnssetup.pywithargv = [self.python, str(cat.src / "setup.py"), *self.setup_args()].runner.py:592-593forwards the launcher's--kvverbatim:if s.kv: args += ["--kv", s.kv]— so--kv fp16reachessetup.py.runner.py:800-815: on a non-zero exit the runner scans the output in reverse for aline beginning with
[X]. An argparse usage error is not an[X]line, soerrstays empty, and it raises
LaunchError("The model could not be installed." + ..., hint, 6).The
Checking the engine/Engine … is installed/Preparing … from your model fileslines in the output are the runner's own pre-setup emits (
runner.py:448,:454,:747), which is why a user sees "progress" and then an instant crash.Proposed fix
Add
fp16to the--kvchoices atsetup.py:7818:Note:
setup.py:8458only ever picks fp16 forctx <= 8192, so accepting an explicit--kv fp16above 8K may also need thectx > 8192branch to respect it.Related discussion
the same gap: "Today the choices there are
int8(default),k8v4andq4_0; fullprecision is used only up to 8K." It was closed by a maintainer on 2026-10-19 as
part of a bulk 0.2.0-beta tracker reset ("Closed here does not mean rejected"), not as
resolved; a commenter confirmed
--kv fp16already runs at long context on CUDA.Filed separately because this is a concrete reproducible bug (not a feature request);
happy to fold it into #2787 if the maintainers prefer one thread.
starting an installed model" (open). Related UX gap around
--kv, but a differentissue (silent flag-drop, not argparse rejection).
could not be installedreport (0.2.1, clean-install error); not this bug (no KVinvolvement).
Notes / workaround
prepare-step setting — but
setup.py's argparse still validates it, so an invalidvalue aborts the install.
KV: int8,KV: k8v4, orKV: q4_0, or omitKV(defaults toint8for context > 8192). Do not useKV: fp16until the choices list is fixed./datavolume (-v strata-data:/data) or the entrypoint warns the model/settings arelost; and if the model files are mounted
:ro, setup re-hashes the shards on everyrestart because it cannot write its
.donemarks.@github-actions[bot] commented on GitHub (Oct 23, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 23, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Oct 29, 2026):
Thank you. Fixed in 0.2.5: setup accepts
--kv fp16, as https://github.com/Niko1221/Strata/blob/main/docs/DOCKER.md says, andstrata launchnow shows setup's own error line instead of only "could not be installed". The0.2.2-cuda13image you used has the old setup; the 0.2.7 images (for example0.2.7-cuda13) have the fix.Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.5