Repository navigation
feat: ASTRA conjugate-gradient solver; leaderboard rows for paper, consistent and CG ASTRA - #544
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018bMcJTgvvdNptVguk887JW
…ian scaling, and with CG Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018bMcJTgvvdNptVguk887JW
…cation settings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
luciaquirke
force-pushed
the
feat/astra-cg
branch
from
October 21, 2026 02:46
c39881a to
198fbe5
Compare
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.
Adds a conjugate-gradient solver to ASTRA (
astra.solver: cg) and replaces the leaderboard's EK-FAC + ASTRA row with three runs on current main.The old row (LDS 0.643) used Kronecker factors fit before #495, a sum over the 4,608 training documents. With the document-averaged factors the published config (relative damping 0.1, lr 0.1) reaches NaN by step 50 on every query.
Leaderboard (GPT-2 / WikiText, 50 test queries, 100-subset bank)
ekfac_astra_paper.yaml): the settings ofexamples/replicate_bae_approx_unrolling_source/wikitext_gpt2_astra.yaml(absolute damping 0.011,astra.loss_reduction: mean, lr 0.011, momentum 0.9, batch 16, 300 steps, lr x0.9 every 100). The factors use the per-document summed loss and the Hessian-vector products the per-token mean, so ASTRA's Hessian is 1/511 of the factors' scale.ekfac_astra_consistent.yaml): the same settings without theloss_reductionoverride. The step size follows the paper's rule, the lowest final objective overtest[0:2]from 1e-2 to 1e-8: 1e-2, 1e-3 and 1e-4 diverge, 1e-5 is lowest. Queries 2, 15 and 44 diverge at 1e-5.ekfac_astra_cg.yaml): relative damping 10, 20 conjugate-gradient iterations on one batch of 256 documents.CG is the README row; the leaderboard lists all three. The
leaderboard.rstASTRA note gives each variant's Hessian scale. The per-token README row and paired differences are recomputed for CG (MAGIC − CG 0.361 [0.342, 0.379], CG − EK-FAC 0.151 [0.138, 0.165], each 50/50).Eigenvalue-corrected Shampoo + ASTRA (0.625) was produced the same way as the old EK-FAC row and is unchanged here.
Paper replication
examples/replicate_bae_approx_unrolling_source/wikitext_gpt2_astra.yamlon main (e741b8c), unmodified, all 481 validation queries, 5-seed retrain banks; the consistent row dropsloss_reduction: meanand uses lr 1e-5.Tests
test_cg_reaches_the_damped_solution: on the full batch with an identity preconditioner, CG matches(H + D)^-1 qto 1e-6.🤖 Generated with Claude Code
https://claude.ai/code/session_018bMcJTgvvdNptVguk887JW