Repository navigation
Realtime: revalidate H3 source pins after the training speedup (#25) - #26
Merged
Merged
Conversation
#25 changed model.py, sgf_attention.py, sgf_rollout.py and distributed.py, which the standard realtime acceleration pins by sha256, so cpu-contracts failed on main. model._sgf_attention_forward now routes segment attention through fast_attention.attention (FA2 by default), so the realtime candidate's AST projection also no longer matched and installed_candidate would refuse to start. - candidate segment attention imports solar.backends.minimax_h3.fast_attention like the native function; the projection accepts that relocated import - update the four digests in compatibility.json - test that the candidate still projects the native SGF forward The pinned functions realtime replaces (_all_to_all_raw, sgf_attention, H3RawKVCache, h3_student_forward) behave as before with every SOLARWM_H3_* switch unset. Not yet re-qualified on SP8 GPUs. Co-Authored-By: Claude Opus 4.8 <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.
Why
#25 changed
model.py,sgf_attention.py,sgf_rollout.pyanddistributed.pyundersolar/backends/minimax_h3/. The standard realtime acceleration pins these files by sha256(
deploy/solar_wm/backends/standard/acceleration/compatibility.json), socpu-contractshasfailed at pytest since the merge (5 failures in
tests/realtime_interaction/test_compatibility.py),and the realtime engine would refuse to start a scene ("source changed").
Updating the digests alone is not enough:
_sgf_attention_forwardnow routes segment attentionthrough
fast_attention.attentioninstead offlash_attn_func, so the realtime candidate's ASTprojection (
projected_source_matches) no longer matched the native function andinstalled_candidatewould raise "candidate differs beyond video-only SDPA branch".Changes
segment_attentionimportssolar.backends.minimax_h3.fast_attentionlike the native function (FlashAttention-2 by default, unchanged behavior); the projection
accepts that relocated import alongside the existing
sgf_attentionrelocation.compatibility.json.digests are updated.
Verification
cpu-contractspasses on this branch (run 119, all jobs).ruff check,ruff format --check, the 28 example configs, and the full pytest suite(the only local failures are the pre-existing macOS
renameat2tests, identical to the pre-Training speedup on Hopper GPU for SolarWM-H3: 1.85× / 2.12× / 1.88× for Stage0.5 / Stage1 / Stage2 #25 base).SOLARWM_H3_*switch unset, the replaced functions (_all_to_all_raw,sgf_attention,H3RawKVCache,h3_student_forward) behave as before Training speedup on Hopper GPU for SolarWM-H3: 1.85× / 2.12× / 1.88× for Stage0.5 / Stage1 / Stage2 #25: CPU comparisons of SGF attention, rollout,replay gradients and a tiny H3 forward/backward are bitwise identical to 0193da0.
🤖 Generated with Claude Code