Repository navigation
Model L: structure table and NumPy oracle (CPU reference, step 1) - #91
Merged
Merged
Conversation
clean/l/reference/table.py holds Model L's structure as data: the input encoder's op list, the decoder's channel segments and block, window offsets, block constants and map names, plus parameter shapes and the matrix work per frame derived from it. Entries listed in PROVISIONAL are pending confirmation and change only there. clean/l/reference/oracle.py interprets the table: encode, decode and the whole network chain in float64 with only the prescribed FP8 / FP16 roundings. The shared Swin stages call Model M's oracle. The output reconstruction is a stub that refuses until it is written. Tests (synthetic data) reduce Model L to Model M through the table and require Model M's oracle results byte for byte: the block with M's constants, the encoder with M's op list, the decoder without a block, and the whole chain. Refs #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.
First step of Model L's CPU reference. Refs #89
clean/l/reference/table.py: Model L's structure as data (the encoder's op list, the decoder's channel segments and block, window offsets, block constants, map names), parameter shapes derived from it, and the matrix work per frame (computed, not measured). Entries listed inPROVISIONALare pending confirmation and are changed only in the table.clean/l/reference/oracle.py: a NumPy oracle that interprets the table (encode,decode,network), float64 with only the prescribed FP8 / FP16 roundings. The shared Swin stages call Model M's oracle. The output reconstruction is a stub that refuses until it is written.clean/l/tests/test_l_reference.py: synthetic data only.Nothing in the runtime, front end or launcher uses this yet; Model M is unchanged (no existing file touched).
Tested
python -m unittest discover -s clean/l/tests -t .: 17 tests pass. The main ones reduce Model L to Model M through the table and require Model M's oracle results byte for byte: the block with Model M's constants (three widths, odd sizes, five offsets), the encoder with Model M's op list, the decoder without a block, and the whole chain from the encoder to the decoder. Others: a per-window slow-loop version of the block, the encoder's parts recomputed by hand, table edits (other op orders, other levels, other quantisation), refusal of bad op lists.python -m unittest discover -s clean/tests -t . -p test_reference.py: unchanged, passes.python tools/ci/check_line_endings.py: 0 problems.Not tested