Repository navigation
Runtime: raw model loading for any stage list; Model L's tensor list and loader - #110
Merged
Merged
Conversation
…and loader load_raw_stages loads <stage>/<name>.bin for a given list of stages; load_raw_model is Model M's list through it (unchanged behaviour). clean/l/runtime/l_model.cpp: Model L's stages and tensors (the default table's logical names) and its raw loader, checked against the table and Model M's raw tensors. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
phantoslayer21
marked this pull request as ready for review
November 13, 2026 23:31
phantoslayer21
added a commit
that referenced
this pull request
Nov 13, 2026
…e_load on main #110 merged after #109 changed the structure table: the runtime's Model L tensor list still had the earlier layout and its test called table.encoder_shapes, which #109 removed. Now the map's stages (enc0, enc0_block, the ten shared stages, dec0_block, dec0, post), names and shapes; the test checks them against data/preset-L.v1.map.json and table.param_shapes. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
j0nsh1n
pushed a commit
to j0nsh1n/wronggpu
that referenced
this pull request
Nov 14, 2026
… test_l_runtime_load on main phantoslayer21#110 merged after phantoslayer21#109 changed the structure table: the runtime's Model L tensor list still had the earlier layout and its test called table.encoder_shapes, which phantoslayer21#109 removed. Now the map's stages (enc0, enc0_block, the ten shared stages, dec0_block, dec0, post), names and shapes; the test checks them against data/preset-L.v1.map.json and table.param_shapes. Refs phantoslayer21#89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The runtime can now load Model L's model data in the raw layout. This is the second piece of the Model L runtime
frame (P13), after #108 (CPU frame trace). Nothing changes for Model M: the same tensors load from the same files,
with the same checks and messages.
What changes
clean/runtime/model.h/.cpp:TensorSpecandstage_specs(Model M's tensors of one stage) are now public;load_raw_stages(model_dir, stages, out, err)loads<root>/<stage>/<name>.binfor any list of stages. Ituses the same root rule (
model_dir/rawwhen that holds the first tensor of the first stage), the same size,finite-value and T checks, and the same optional group
filter;load_raw_modelis Model M's list through it.clean/l/runtime/l_model.h/.cpp(new), namespacewgrt::l:stage_specs()returns Model L's stages: enc0 (Model M's W, b, T, sigma1, sigma2, with W the 64 x 128projection; the linears
Wa/ba32 x 20 andWb/bb32 x 32; the width-32 blockblk.*), Model M's ten Swinstages, dec0 (Model M's W, b, S, T plus
blk.*), and post;load_raw_model()loads them.The names are the logical names of
clean/l/reference/table.py. The translation from the preset-L map's names(separate block stages, other linear names) comes when that map and the table agree; that is noted on the Model L
coordination page.
clean/l/runtime/tests/l_load_dump.cppandtest_l_runtime_load.py(CI runs them; host C++ compiler or MSVC).Refs #89
Tested
test_l_runtime_load.py: 4 tests, OK:table.encoder_shapes()/decoder_shapes()(names, number of values, uint8 only forenc0 T);
(
synthetic_model.synthetic_tensors);oracle.random_params) written in the raw layout loads with every tensor's SHA-256unchanged, from the model folder and from
raw/itself;clean.tests.test_model_filterandclean.tests.test_model_select: 20 tests, OK (the raw and model.wgcmloaders, the optional group);
before and after this change (107 lines);
build.py --runtime-only --no-embed), 0 warnings.Not tested