Skip to content

Reference and packers: Model L rows (Model M's stage tables) - #100

Merged
phantoslayer21 merged 1 commit into
mainfrom
model-l/l-stage-rows
Nov 13, 2026
Merged

phantoslayer21 merged 1 commit into
mainfrom
model-l/l-stage-rows

Conversation

@phantoslayer21

Copy link
Copy Markdown
Owner

Model L's ten Swin stages (enc1 … dec1) are Model M's stages with Model L's own weights: same shapes, window offsets
and blobs. This adds Model L's rows to the model-keyed tables of #92 as Model M's rows, the same objects. Model L's
extra width-32 blocks stay in clean/l/reference/table.py. Nothing changes for Model M.

  • clean/reference/swin.py: MODEL_STAGES["L"] and WINDOW_OFFSETS["L"] are Model M's.
  • clean/runner/packing.py: MODEL_BNECK_STAGES["L"] and MODEL_MID_STAGES["L"] are Model M's lists.
  • clean/runner/pipeline.py: MODEL_SWIN_ORDER["L"] is Model M's order.
  • clean/runner/stage_runner.py needs no edit. Its MODELS comes from the reference stage table, so it is now
    ("M", "L", "K"), and Runner(..., model="L") runs these stages with Model M's kernels.

Refs #89

Tested

  • clean/tests/test_model_tables.py, new class ModelLRows:

    • Model L's rows are Model M's objects;
    • Model L's window offsets for every stage and parity equal Model M's rule;
    • pack_stage / stage_blob_size as Model L give Model M's bytes for every stage;
    • the two offset kinds equal the window_offsets entry of the Model L table (clean/l/reference/table.py).

    The existing checks are updated for the new model list (MODELS, the "known:" list of an unknown model).

  • clean.tests.test_model_tables, clean.l.tests.test_l_reference, clean.tests.test_reference: 36 tests, OK.

  • Model M identity: the 69-hash fingerprint of Reference and packers: model-keyed stage tables (Model M unchanged) #92 (tables, packed blobs in both layouts, reference outputs) is
    identical to the one recorded on main before Reference and packers: model-keyed stage tables (Model M unchanged) #92.

Not tested

  • No GPU run (no kernel or runtime change).

Model L's ten Swin stages are Model M's stages with its own weights, so its rows in the model-keyed
tables are Model M's rows, the same objects: the reference stage table and window offsets, the bneck
and mid stage lists, the pipeline's Swin order. The stage runner accepts model="L" for them. Model M
unchanged.

Refs #89

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21
phantoslayer21 marked this pull request as ready for review November 13, 2026 23:00
@phantoslayer21
phantoslayer21 merged commit 0c76b9e into main Nov 13, 2026
2 checks passed
@phantoslayer21
phantoslayer21 deleted the model-l/l-stage-rows branch November 13, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant