From b059f1ca5df57890e508dad3e42002cb88300607 Mon Sep 17 00:00:00 2001 From: Alpamys Date: Wed, 5 Aug 2026 00:09:56 +0500 Subject: [PATCH] fix(streaming): panel was titled after a flag that does not exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The layer-streaming pre-flight printed a Rich panel titled `soup train --stream-layers`. There is no such flag — `soup train --help` contains zero occurrences of "stream" — and streaming is enabled only by `training.stream_layers` in soup.yaml. The panel is the first thing a streaming run prints, so it was the feature's most-read line of documentation, and it pointed at a `No such option`. Wording left over from the original design note, which proposed a CLI flag; the feature shipped as a config key and the title never followed. Nothing asserted on it, so nothing caught the drift. Retitled to `training.stream_layers`. The body already opens with "Layer streaming BETA", so the title does not repeat it. Same string fixed in the three module docstrings and in one test docstring that quoted it. Cosmetic only — no behaviour change. Verified by rendering the panel, and by tests/test_v07200-04.py: 440 passed, 2 skipped. ruff clean. benchmarks/gate-v0.72.*.md carry the phrase too and are deliberately untouched: they are published verbatim gate records, kept as written. Closes #329 --- src/soup_cli/utils/layer_shard.py | 2 +- src/soup_cli/utils/layer_stream.py | 4 ++-- src/soup_cli/utils/layer_stream_runtime.py | 2 +- tests/test_v07202.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/soup_cli/utils/layer_shard.py b/src/soup_cli/utils/layer_shard.py index c3faa07..3d3cea7 100644 --- a/src/soup_cli/utils/layer_shard.py +++ b/src/soup_cli/utils/layer_shard.py @@ -1,4 +1,4 @@ -"""soup train --stream-layers — checkpoint sharder (v0.72.0 BETA). +"""training.stream_layers — checkpoint sharder (v0.72.0 BETA). Rewrites an HF checkpoint into one ``layer_NNN.safetensors`` per decoder layer plus a single ``extras.safetensors`` (embeddings / final norm / untied head), diff --git a/src/soup_cli/utils/layer_stream.py b/src/soup_cli/utils/layer_stream.py index e78f7c8..8f5acab 100644 --- a/src/soup_cli/utils/layer_stream.py +++ b/src/soup_cli/utils/layer_stream.py @@ -1,4 +1,4 @@ -"""soup train --stream-layers — layer streaming planner (v0.72.0 BETA). +"""training.stream_layers — layer streaming planner (v0.72.0 BETA). The pure half: tier choice, pinned-vs-pageable decision, the architecture allowlist, and the VRAM / throughput arithmetic. **No top-level torch** — this @@ -856,4 +856,4 @@ def render_stream_panel(plan: StreamPlan, extra_lines: Sequence[str] = ()) -> Pa lines.extend(extra_lines) for note in plan.notes: lines.append(f" [yellow]![/] {note}") - return Panel("\n".join(lines), title="soup train --stream-layers", border_style="cyan") + return Panel("\n".join(lines), title="training.stream_layers", border_style="cyan") diff --git a/src/soup_cli/utils/layer_stream_runtime.py b/src/soup_cli/utils/layer_stream_runtime.py index 4e56d3c..dc89782 100644 --- a/src/soup_cli/utils/layer_stream_runtime.py +++ b/src/soup_cli/utils/layer_stream_runtime.py @@ -1,4 +1,4 @@ -"""soup train --stream-layers — streaming runtime (v0.72.0 BETA). +"""training.stream_layers — streaming runtime (v0.72.0 BETA). The torch half: pre-allocated VRAM buffer pool, the CPU-RAM weight source, the prefetch scheduler, the layer wrapper, and the meta-device model build. diff --git a/tests/test_v07202.py b/tests/test_v07202.py index bbe69db..917f03a 100644 --- a/tests/test_v07202.py +++ b/tests/test_v07202.py @@ -1501,7 +1501,7 @@ training: class TestReportedParameterCount: """Found by the step-6 smoke, not by any unit test: a real - ``soup train --stream-layers`` with ``quantization: 4bit`` printed + ``training.stream_layers`` run with ``quantization: 4bit`` printed "878,154,048 total" for SmolLM2-135M (true count 134,515,008), while the RESIDENT NF4 path printed 134,975,808. PEFT special-cases ``Params4bit`` as ``numel * 2 * quant_storage.itemsize`` — correct for a resident one, whose