#6451 [TUI] strata launch --model-path: name Swift's shard 1 as --ple-gguf, where its n-gram table is

open · @criskurtin · 0 Kommentare · Auf GitHub

Setup & installServer & APIModels & quantsDocumentationWindows

Beschreibung

## Problem and result

For a two-file Swift 1.5 set, `strata launch --model-path` (`terminal/strata_cli/launch/adopt.py`, `plan()`) wrote the last shard as `--ple-gguf`. Swift's n-gram table (`per_layer_token_embd.weight`) is in shard 1, as `setup.py` says ("shard 2 (original) or 1 (Swift)"). Served with those arguments, main 3142b66b9's engine stopped 4 s after it started:

```
strata generate: per_layer_token_embd.weight is not in <models>/Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf
```

With this PR Swift gets shard 1, as in `setup.py`'s own config; the same files then loaded in 45 s and answered. Qwen, Coder and Gyro keep the last shard.

## Related discussion

none: a focused fix, found while testing #6448. It touches the same flag as #6401 (`oomd_pacer` finds the table without `--ple-gguf`); naming the file keeps today's readers of the flag working (`oomd_pacer.ple_table_file`, the updater's RAM estimate under `--ple-io ram`). Independent of the other PRs linked there.

## Approach

One line in `plan()`: `shards[0] if family == "swift" else shards[-1]`. Leaving `--ple-gguf` out would also load (the engine finds the table by name), but `make_room` would then stop keeping the table's file cache, and the updater's RAM estimate would leave the table out.

## Validation

**Passed:**
- `tests/terminal/test_arc_feed_models.py`: a new test pins Swift's arguments. On main's `adopt.py`: 1 failed, 7 passed (shard 2 instead of shard 1); here: 8 passed.
- `uv run --python 3.12 --with-requirements terminal/requirements.txt --with-requirements terminal/requirements-dev.txt --with-requirements terminal/requirements-build.txt python tools/check --strict --only py-tests,py-tools,docs` at 32851a090 (Python 3.12.15, Fedora 44): py-tests 4232 passed, py-tools 1851 passed, docs 6 passed; 0 failed.
- Arc Pro B390 (Fedora 44, kernel 7.2.11, compute runtime 26.35.39758), main 3142b66b9's SYCL engine, the Swift IQ3_XXS files of `huihui-ai/Huihui-Qwen3.8-Flash-Next-abliterated-v2-GGUF` (Swift 1.5's layout; read with `terminal/tools/gguf_reader.py`, shard 1 holds the table and layers 0-12, shard 2 layers 12-47): the run config with `--ple-gguf <shard 2>` stopped with the line above; with `<shard 1>` it loaded and answered. Logs: https://github.com/xenonhr/Strata/tree/b390-evidence (`hw2-main.txt`, `server-ple*-main.log`, `engine-ple*-main.log`).
- Fork CI at the same head, run by hand: [Config snapshot](https://github.com/xenonhr/Strata/actions/runs/44840576805), [Portable monitor client](https://github.com/xenonhr/Strata/actions/runs/44840582597), and every job of [Checks](https://github.com/xenonhr/Strata/actions/runs/44840573279) and [Minimal serving runtime](https://github.com/xenonhr/Strata/actions/runs/44840579848) but the tests under Failed.

**Failed:**
- In CI, two tests that fail the same way on main 3142b66b9 ([Checks](https://github.com/Niko1221/Strata/actions/runs/44699739037), [Minimal serving runtime](https://github.com/Niko1221/Strata/actions/runs/44699738802)): `terminal.tools.test_strata_mcp.Install::test_a_start_that_came_in_before_a_cancel_does_not_launch_the_job` on Windows, and `test_abort_sync` in Minimal serving runtime (`from serve import server`: no module named `serve`). macOS `host-test` failed one UI test on the first run ("an approval the host no longer waits for (409) ends the card; it does not ask again") and passed when rerun; this PR changes no host file.

**Not run:**
- `strata launch --model-path` end to end; the arguments it writes were served as a run config instead.
- The original Swift 1.5 files.

## Limits

none known.

Prepared with an AI coding assistant (Claude Code); every result above was observed on the machine named in Validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Mehr auf der Site

Links zu Install, Modellen, Releases.