Repository navigation
0.3.2a2: MLP-scope recompute, lookahead options, web UI fields, compiled document-reset fix - #54
Merged
Merged
Conversation
…led document-reset fix Adds recompute_scope=mlp, mla_upproj_recompute, lookahead_input_detach and temporal_grad_span (all off by default), web UI fields in four languages, and a real-corpus A/B report. Fixes reset_router_at_documents / document_masking crashing inside the compiled LongRun step (found by training on the real corpus) and the "false" string read as true for reset_lookahead_at_documents. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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.
Summary
Follow-up to 0.3.2a1. Every new switch is off by default.
recompute_scope="mlp": recompute only each block's MoE/FFN. At 32k on the real corpus: saves 1.4 GB (5%), loses 11% speed; whole-block recompute saves 6.9 GB (25%), loses 19%.mla_upproj_recompute: implemented and exact, but measured no memory benefit (24.47 -> 24.29 GiB at 64k, 6.7% slower), so it stays off.lookahead_input_detach,temporal_grad_span: implemented; neutral on the en-zh data (validation CE within 1e-3), so they stay off.reset_router_at_documents/document_maskingcrashed inside the compiled LongRun step (NumPy on a traced array). Fixed withsegment_ids_mxplus a test that runs the option throughmx.compile.reset_lookahead_at_documents="false"(what the UI sends) was read as true.reports/long_context_20261109/real_corpus_ab.json.Evidence (real en-zh shards, production 50M config, random init, M5 Max, bf16; validation CE differs by <= 3e-3 between arms)
Limits: 2-6 optimizer steps per arm, so the CE column shows equal quality between arms, not final quality. Block-size sweep: larger blocks speed up one MLA layer but slow the whole model; 1024 stays.
Test plan
tests/test_long_context.py+tests/test_webui.py: 101 passedtest_mlx_training_six_stage_loss_pathsdeselected: known MLX CPU segfault)🤖 Generated with Claude Code