Subtractive scratchpad · NVIDIA/hyperflare-inference #229

Raw Markdown for agents: https://autobot.eidonix.com/p/d033fe51-5a1b-49f2-9c3e-3a57884c0293.md

#1 [high] Blocking: main extracted all recipes; ~73% of this PR's added lines belong in hyperflare-recipes

Main has moved past the PR's base (66b473c3). Verified on main at PR HEAD ref:

So these PR files must be removed from this repo (~4,018 added lines):

Blocking severity: the change should not be merged at its size because most of it is in the wrong repository, which the project's own boundary test would fail.

#2 [high] Should fix: shared-code additions become dead once the recipes leave this repo (~246 lines + reverts)

After removing the recipe-owned files (see the blocking note), these PR additions have no in-repo consumer:

  1. ignition/preparation/quantization.py +36 lines (PR diff, new matches_pattern and modelopt_nvfp4_layers). Only callers are ignition/recipes/gemma4/config.py (extracted) and ignition/recipes/muse_glimmer_nvfp4/config.py (extracted). Main's quantization.py keeps only quantized_layers, linear_format, projection_group_format, expert_format (read at main). Remove both functions → −36.
  2. ignition/recipes/gemma4/config.py +4/−25 in the PR diff becomes a revert of an extracted file. Also ignition/recipes/__init__.py +2/−1 (the recipes() tuple entry) — the file does not exist on main (read_file → "is not a file at that commit"). Remove.
  3. tests/preparation/test_quantization.py +127 (new file). It imports ignition.recipes.gemma4.config and tests.recipes.test_gemma4 — both removed by 17bb3c4a, and main asserts not (ROOT/"ignition"/"recipes").exists() (tests/preparation/test_core_boundary.py:42). Its shared-parser coverage duplicates main's tests/preparation/test_checkpoint_quantization.py (92 lines, already covers quantized_layers/projection_group_format). Remove → −127.
  4. tests/preparation/test_frontend_metadata.py +7/−3 — the file does not exist on main (list_files "No files match"). Remove.
  5. docs/model-preparation.md +68 (the "## Muse Glimmer 30B" section). Main's docs/model-preparation.md has a "## Official model recipes" section at line 310 and no per-model sections (grep '^## ' on main lists Runtime cores, Environment setup, GPU selection, Preparation resources, Exporting runtime cores, Official model recipes, Storage and graph capacities, Serving runtime cores, DGX Spark, Core and development serving). The section documents an alias whose recipe now lives in hyperflare-recipes, and it names recipe paths (ignition/recipes/muse_glimmer_nvfp4/assets/chat_template.patch.json) that main does not contain → −68.
  6. docs/TODO.txt +8 — the entry says "Fold Muse Glimmer's attention back onto Muse Spark's. ignition/recipes/muse_glimmer_nvfp4/attention.py ... ignition/recipes/muse_spark/attention.py"; neither path exists on main. The follow-up belongs in the recipes repo → −8.

Total ≈ 246 lines plus the two extracted-file hunks (+6/−26).

#3 [high] Should fix: duplicate profile tables and variant enumerations in helios images (~55 lines)

Verified in helios/src/frontend/images/conditioned.rs (PR head):

(a) The patch-width table is written twice, in the same file, with the same arms. valid_processed (lines 188-194): let pixel_width = match self.processor.profile { Profile::Qwen() | Profile::MiMo() => 1536, Profile::Radio => 768, Profile::Glm | Profile::PatchMerge() | Profile::MuseGlimmer() => 1176, Profile::PaddedGrid => super::padded_grid::FEATURES, Profile::DeepSeek4 | Profile::DeepseekRowMajor() | Profile::Moonvit | Profile::Step => 588, }; and the new test every_image_settings_variant_materializes_through_the_cache_path (lines 580-587) repeats it verbatim over ImageSettings instead of Profile: ImageSettings::Qwen() | ImageSettings::Mimo() => 1536, ImageSettings::Radio {} => 768, ImageSettings::Glm {} | ImageSettings::PatchMerge() | ImageSettings::MuseGlimmer() => 1176, ImageSettings::PaddedGrid {} => super::super::padded_grid::FEATURES, ImageSettings::Deepseek4 {} | ImageSettings::DeepseekRowMajor() | ImageSettings::Moonvit {} | ImageSettings::Step {} => 588,

The test's copy proves nothing valid_processed does not: the assertion is first.pixel_values.len() == prepared.geometry.patches * width, i.e. it restates the production predicate against a hand-copied constant, and a wrong width in both places would still pass. The test's stated purpose ("a wildcard arm in valid_processed once sized PatchMerge at 588 and rejected every materialization") is already covered by the preceding test driven by settings() that compares actual to expected (lines 545-553). Replace the whole added test with nothing: −36 lines (the #[cfg(feature = "server")] #[test] fn every_image_settings_variant_materializes_through_the_cache_path body). Smaller replacement for the width restatement, if a check is wanted: assert_eq!(first.pixel_values.len(), expected.pixel_values.len()), which needs no table.

(b) The settings() coverage array (lines 399-415) is a third enumeration of the same 11 variants. ImageSettings derives Debug and the existing test already iterates settings() comparing actual to expected; the covered array plus its 11-arm match (17 lines) exists only to fail when a variant is added, which the match in pixel_width already does (no default arm). Remove lines 399-415: −17.

(c) bracketed_extent (packing.rs:480-494) returns a 4-tuple whose 4th element is the last capacity; bracketed discards it with _ (packing.rs:497-498). Return 3 values and let muse_glimmer read capacities.last() itself, or pass the capacity directly. −2 lines. Small saving.

Total for this file's additions: ≈55 of the ≈107 added lines in conditioned.rs have a shorter equivalent. Source: PR diff of helios/src/frontend/images/{conditioned.rs,packing.rs}, read at PR head.