{
  "id": 1287,
  "kind": "post",
  "title": "Cutting Pretraining Costs by 62% — Hyperstition (ANVIL III optimizer)",
  "summary": "ANVIL III is a Muon-family optimizer presented as the biggest optimizer breakthrough since Muon (2024). It beats a fully tuned Muon by 20-28 millinats of final validation loss at matched token budget, holding across 124M, 350M, 774M and 1.2B parameters and across overtraining depths; the gap typically grows from 30% to 80% of training (up to ~50 mnat in some configs), with Muon partially catching up during annealing. At a fixed 8x-Chinchilla budget, fitted scaling curves imply optimizer-only compute savings of 32%/39%/39%/50% at the four sizes; combined with an architecture variant (≈25% near-Chinchilla compute saving) the headline is ~62% less pretraining compute at frontier scale, plus ~30% lower inference cost from faster decode. Mechanistically, an 'Adam SNR' probe (descent inequality = Gini of |u_i^T G v_i| over singular directions, scored on held-out batches) shows ANVIL III's update directions have persistently higher signal-to-noise across the whole singular spectrum; 90% of its singular directions go downhill on held-out data vs 67% for Muon (random = 50%), and it is far less sensitive to truncating the weakest singular vectors (removing weakest 20%: Muon +6.9 mnat, ANVIL III +1.8 mnat). The team also released Feather 1.7B (1.68B params, 200B training tokens), which beats Qwen3-1.7B-Base (~36T tokens) on math with ~180x fewer training tokens (MATH500 63.0 vs 53.0; GSM8K 83.4 vs 76.6; GSM8K Platinum 85.7 vs 74.4; GSM-Symbolic main 81.1 vs 62.7), with three rounds of benchmark decontamination documented. A deprecated ANVIL II set the public NanoGPT speedrun record (73.889s -> 39.914s, 1.851x speedup, 46.0% training-time reduction — a larger percentage leap than the previous 45 records combined) and is public as part of the submission; no license stated for the code.",
  "body": "",
  "notes": "Discovery: @DevenPzak (Deven Pietrzak, MIT math / hyperstition) X thread 2026-10-06 ~3:35 PM ET (~8.2K views, 118 likes, 71 bookmarks). Thread notes hyperparameter consistency: ~7 tuning runs for ANVIL III vs ~51 for Muon at 1.2B (appendix run-audit table on the page confirms the Muon-heavy tuning burden). Technical differences from Muon called out on the page: ANVIL III uses fused QKV (vs Muon's split QKV, which is 3-4 mnat better for Muon, so the comparison is conservative) and 'twin rail momentum'; full recipe not disclosed in the post. Companion hyperstition posts worth reading: 'The Signal and the Noise' (https://hyperstition.cc/the-signal-and-the-noise) — basis-free optimizer theory showing Adam has a privileged basis, and that averaging SNR over all rank-one directions collapses to scaled momentum under certain conditions; constructs a direction whose projection onto every stored gradient is identical, achieving SNR=1 with zero stabilizer, plus a variant that matches AdamW — likely the theory behind ANVIL; and 'Stuck in a Loop' (https://hyperstition.cc/stuck-in-a-loop) — attention weights act as a strong backprop filter creating a positive feedback loop that locks in early differences; attention Jacobian empirically low-rank (>=99% of tokens have squared-spectrum effective rank <10 in Qwen2.5-1.5B); a natural-gradient 'democratized' backward pass broadens attention but worsens validation loss, suggesting winner-take-all concentration dynamics also support learning. Directly relevant to the user's pretraining work: ANVIL III is a drop-in Muon replacement with 20-28 mnat gains and fitted 32-50% compute savings at 8x Chinchilla across 124M-1.2B; the tuning appendix suggests it needs far fewer tuning runs than Muon. Caveats: fitted savings at 8x Chinchilla require extrapolation beyond the measured 40B-token budgets at larger sizes; no code for ANVIL III itself was found (only the deprecated ANVIL II via the speedrun submission, license not stated).",
  "url": "https://hyperstition.cc/cutting-pretraining-costs-by-62-percent",
  "links": [],
  "authors": [
    "Deven Pietrzak",
    "Zafar Mamat",
    "AJ",
    "Mason Eyler",
    "Nahom Seyoum",
    "Max Misterka",
    "Adit Srivastava"
  ],
  "tags": [],
  "topics": "",
  "venue": "",
  "publisher": "",
  "source": "x",
  "language": "",
  "access": "",
  "license": "",
  "published_year": null,
  "added_at": "2026-10-07T00:00:00.000Z",
  "verified_at": "2026-10-07T00:00:00.000Z",
  "attrs": {},
  "enrichment": {},
  "enriched_at": null,
  "license_class": "unknown",
  "langs": [],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "legacy_paper_id": "1595"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-10-07T05:17:49.242Z",
  "updated_at": "2026-10-07T05:17:49.242Z",
  "page": "https://papers.projxon.ai/entries/1287",
  "markdown": "https://papers.projxon.ai/entries/1287.md",
  "api": "https://papers.projxon.ai/api/entries/1287",
  "relations": [],
  "duplicates": [],
  "similar": [
    {
      "id": 1337,
      "kind": "paper",
      "title": "The Best Optimizer Depends on Batch Size",
      "summary": "Adaptive optimizers are benchmarked at one batch size, while hyperparameter scaling rules promise that the best optimizer at one batch size stays the best at another. This paper challenges both practices. (1) No principled scaling rule for Muon works consistently across settings: the authors derive and test three competing rules against Muon - linear LR from SDE-matching, square-root LR from minimizing a convergence bound, and fixed LR with scaled weight decay from Power Lines - tuning at a reference batch size for LM and image classification, then growing batch size at fixed token budget across hundreds of rule variants; the best rule depends on task and target batch size. (2) The best optimizer for LM pretraining changes with batch size even after extensive retuning: Adam, Lion, Muon, SOAP, and Shampoo were each retuned at every batch size from 128K to 2M tokens at fixed total budget under both weight decay and HyperBall (fixed hidden-matrix norms). Under HyperBall, Muon beats Shampoo at 128K tokens/update while Shampoo beats Muon at 2M. Theory on a noisy quadratic explains why: Newton's method divides gradients by curvature, cutting bias (remaining initialization error) at the cost of higher variance from noisy gradients; larger batches shrink variance, so rankings can reverse even with optimally tuned learning rates. A SignSGD toy model shows LR scaling shifts from square-root toward linear as the curvature-to-noise ratio (CNR = h^2/c) increases - the right rule depends on landscape and noise, not just the optimizer. A sharp-subspace intervention pins down where the batch-size penalty lives: checkpoint-branching from 128K to 2M with small-batch updates kept only in the sharpest 768 directions (~0.001% of matrix-parameter space) removes up to 59.5% of the local batch-size penalty (a random same-size subspace removes at most 3%); the benefit largely fades late in training.",
      "url": "https://arxiv.org/abs/2610.08975",
      "authors": [
        "Xingyu Dang",
        "Kaiyue Wen",
        "Sadhika Malladi"
      ],
      "tags": [
        "optimizer",
        "batch-size",
        "scaling-rules",
        "muon",
        "shampoo",
        "lm-pretraining",
        "curvature",
        "gradient-noise",
        "sharp-subspace"
      ],
      "venue": "arXiv 2610.08975 (cs.LG/stat.ML), submitted 6 Oct 2026, CC BY 4.0; interactive explainer at batch-size-scaling.com",
      "source": "web",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-09T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1337",
      "markdown": "https://papers.projxon.ai/entries/1337.md",
      "api": "https://papers.projxon.ai/api/entries/1337"
    },
    {
      "id": 1219,
      "kind": "paper",
      "title": "Why Adaptive Optimizers Underestimate Rare Tokens",
      "summary": "In the softmax output layer, a rare token gets a small positive logit gradient on most steps and a much larger negative gradient on the few steps when it is the target. SGD simply adds these contributions; coordinate-wise adaptive methods (Adam, RMSProp, sign descent) divide each update by a running magnitude estimate that is largest immediately after the token appears. Two effects: (i) whole output layer — characterizes which optimizers preserve the mean output embedding: every method linear in past gradients does, as do Kronecker-factored/orthogonalized methods (Shampoo, Muon); Adam, Adafactor, Lion, sign descent do not (exact step-by-step expressions given); (ii) individual rare tokens — the normalization shifts the training fixed point below the token's true data frequency. Closed forms: sign descent lowers the logit of every token occurring in fewer than half of minibatches at a constant expected rate; for RMSProp with periodic arrivals, if a token is absent for at least two consecutive minibatches its equilibrium probability is strictly below data frequency for every learning rate, ratio tending to k/(2(e^(k/2)-1)). SGD and AMSGrad retain the unbiased fixed point. Tested in a unigram model and a small LM trained from a known generating distribution: with random arrivals the bias exceeds the periodic formula, and biased-fixed-point optimizers fit the generating distribution worse. Directly relevant to the user's LLM pretraining work — rare-token underestimation from Adam is an optimizer choice, not a data problem.",
      "url": "https://arxiv.org/abs/2609.37535",
      "authors": [
        "Sangsidhya Kar"
      ],
      "tags": [
        "adam",
        "adaptive-optimizers",
        "rare-tokens",
        "softmax",
        "fixed-point",
        "shampoo",
        "muon",
        "rmsprop",
        "lion",
        "pretraining"
      ],
      "venue": "arXiv:2609.37535 (cs.LG), submitted 29 Sep 2026",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-04T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1219",
      "markdown": "https://papers.projxon.ai/entries/1219.md",
      "api": "https://papers.projxon.ai/api/entries/1219"
    },
    {
      "id": 848,
      "kind": "paper",
      "title": "Synthetic Pre-pretraining Survives Scale, but Not as a Grammatical Prior",
      "summary": "Tests whether pre-pretraining (PPT) on synthetic non-natural language data — previously shown to improve token efficiency in pretraining (PT), and attributed to a learned grammatical prior — survives at realistic scale. Across five PPT tasks, four PT data mixtures, four parameter scales (500M to 7B), and PT budgets up to 100B tokens, the downstream performance and token-efficiency gains persist at scale, saving at least 21B PT tokens at the 3B scale. But there is no consistent evidence the gains come from a grammatical prior: downstream performance does not consistently align with grammatical acceptability across model sizes, and instead the gains arise from PPT tasks that improve long-range retrieval. Gains are robust to PT mixture composition and diminish only when web text is absent, making PPT a low-cost addition to PT — with future task design aimed at long-range retrieval rather than grammar.",
      "url": "https://arxiv.org/abs/2609.39827",
      "authors": [
        "Atsuki Yamaguchi",
        "Tatsuro Inaba",
        "Joel Niklaus",
        "Michal Štefánik",
        "Aline Villavicencio",
        "Nikolaos Aletras"
      ],
      "tags": [
        "pre-pretraining",
        "ppt",
        "synthetic-data",
        "token-efficiency",
        "grammatical-prior",
        "inductive-bias",
        "long-range-retrieval",
        "pretraining-data-mixtures"
      ],
      "venue": "arXiv:2609.39827 (cs.CL), submitted 30 Sep 2026",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-01T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/848",
      "markdown": "https://papers.projxon.ai/entries/848.md",
      "api": "https://papers.projxon.ai/api/entries/848"
    },
    {
      "id": 1579,
      "kind": "paper",
      "title": "System Optimizations for Cost-Efficient Agent Harnesses",
      "summary": "Park, Yu, Zhou, Hong, Kim, Afifi, Wong, Stoica & Cheung (UC Berkeley; arXiv 2611.12122, Nov 9 2026, CC BY 4.0) split agent performance into its two levers and find they live in different places: task-execution ACCURACY depends mostly on the LLM, with harness-side variance (system prompts, tools) having minimal impact - but the same harness-side variance moves execution COST by up to 2.6x on the same model and task. So for cheaper agents you change the harness and keep the model. Analyzing cost-accumulation patterns across agent traces, they identify system-level opportunities to cut token use and LLM-call count without touching the model or accuracy - each technique reduces how much context a call re-reads or how many calls a task needs. To make the optimizations portable they built Agency, a harness INTERPOSITION platform: a layer between existing off-the-shelf harnesses (Claude Code, OpenAI Codex) and the model, exposing a unified abstraction so an optimization written once works across harnesses. Five proof-of-concept techniques implemented in Agency cut cost by up to 35% across real-world benchmarks on existing harnesses without compromising accuracy. Flags, as entered: abstract-level record at cataloging time - the 'up to 35%' is the best technique/benchmark combination, not an average; the five techniques' identities and per-technique costs live in the full text; results are on coding-agent harnesses and may not transfer to other agent shapes. Cross-references: the harness-design thread in the catalog and the harness throughline digest - this paper is the cost-side complement to the digest's behavior/monitorability operators: where the digest asks what a harness makes the model DO, this asks what the harness makes each step COST, and its answer (repeated context reads and extra calls dominate) is a systems checklist for any agent deployment, including the user's own agent app.",
      "url": "https://arxiv.org/abs/2611.12122",
      "authors": [
        "Jongseok Park",
        "Jiaxiang Yu",
        "Eric Zhou",
        "Tony Hong",
        "Sunga Kim",
        "Yusuf Afifi",
        "Ian Wong",
        "Ion Stoica",
        "Alvin Cheung"
      ],
      "tags": [],
      "venue": "arXiv preprint",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-11-10T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1579",
      "markdown": "https://papers.projxon.ai/entries/1579.md",
      "api": "https://papers.projxon.ai/api/entries/1579"
    },
    {
      "id": 779,
      "kind": "paper",
      "title": "Reinforcement Learning for Code Optimization",
      "summary": "Makes execution time learnable for RL on code optimization via three stages: (1) DMC-Optim benchmark with large optimization tests and a calibrated timing sandbox; (2) composing correctness and speed into the reward using an offline simulator to pick configurations; (3) adapting GRPO and evaluation to the sparser, noisier timed-execution setting. Strongest configurations improve strict top-50% pass@1 from 18.0% to 31.3% on Qwen 2.5 7B and 30.7% to 50.4% on CWM 32B, with further gains at stricter percentiles (125% relative improvement for CWM 32B at top-30%) while preserving pure-correctness scores.",
      "url": "https://arxiv.org/abs/2607.25970",
      "authors": [
        "Pierre Chambon",
        "Kunhao Zheng",
        "Juliette Decugis",
        "Benoit Sagot",
        "Gabriel Synnaeve"
      ],
      "tags": [
        "rl",
        "code-optimization",
        "grpo",
        "dmc-optim",
        "execution-time-reward"
      ],
      "venue": "arXiv",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-09-29T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/779",
      "markdown": "https://papers.projxon.ai/entries/779.md",
      "api": "https://papers.projxon.ai/api/entries/779"
    },
    {
      "id": 1431,
      "kind": "post",
      "title": "Reactive Optimizers — OPAL (OPtimizer with an Agent in the Loop)",
      "summary": "Thesis: optimizers are static — hand-crafted or discovered offline, then run unchanged. A reactive optimizer instead puts a zero-shot LLM agent (Claude Opus 5.5 in all blog experiments; nothing learned or retained across runs) inside a single training run and gives it code as the entire interface. The agent iteratively rewrites two programs: `updater.py`, the optimizer itself, executed every step — the whole algorithm is up for rewriting, not just hyperparameters — and `analysis.py`, self-written probes that extract the training-dynamics statistics the agent chooses to watch (per-parameter-group gradient norms, update size relative to weights, cosine between consecutive gradients, per-tensor spike detection). One agent conversation spans the run, so it remembers what it tried and why. In the released package, checks run every 50 steps, decisions are capped (default ≤50, front-loaded into the first 5% of the run), and the agent's remit is bounded: it cannot touch model, data, loss, batch size, step count, or evaluation, and until its first edit the wrapped run is bit-for-bit identical to the plain run. Guardrails in the package: a new updater takes over on all ranks at once and runs a 20-step trial — an error reverts to the previous program; a first-step failure is undone exactly when a snapshot of parameters + optimizer state fits in `snapshot_limit_gb` (default 2 GB); a later failure is NOT undone and the agent is only told; an `eval_integrity` check flags a program that moves parameters away for an evaluation and back. Training can run asynchronously while the agent thinks (blocking=False), edits landing a median of 65 updates later on Goldfish. Headline claim (authors'): where no recipe has been tuned for the setting, OPAL — always INITIALIZED from an existing recipe — matches or beats the best recipe one could pick off the shelf one-shot. Baselines, precisely: for settings derived from modded-nanogpt Track 3 (162M GPT on FineWeb), five leaderboard records transplanted with natural adjustments (#46, #30, #21 Shampoo, #36 tuned Muon, #2 AdamW; at quarter batch, all LRs ×¼) — OPAL initialized from #36 ranked first in every new setting (quarter batch; Chinese, Thai, Kyrgyz from 1 GB Goldfish sets; Chinese/Thai bars are means of 3 runs). Goldfish Amharic (125M GPT, 1 GB, 10 epochs; metric bits/sentence on held-out FLORES-200): official recipe 83.48 → OPAL from that recipe 81.11; an LR sweep found a static recipe at 80.89 — ahead of OPAL-from-official — but OPAL initialized from the swept recipe ended ahead again at 80.73 (Swahili similar: 79.37 → 77.60). Image generation: LightningDiT-XL/1 on ImageNet, FID-50K 1.83 vs official recipe's 2.18 with guidance (4.33 vs 5.15 without); RAEv2-B (official recipe already a Muon variant, GMuon) 3.19 vs 3.39 in the blog — the repo table shows prompt sensitivity: 3.10 with an efficiency-asking prompt, 3.46 with the neutral prompt. SiT-B/2 (repo table): FID-50K 35.7 → 23.6. On the original, heavily tuned modded-nanogpt setting the gain is small (validation loss 3.2749 vs record #36's 3.2781), and the README documents a run that ended WORSE (3.2878 on OPAL 0.2.0). What the agent actually does, from the decision logs: builds intricate per-parameter-group multi-stage LR schedules (including mid-run LR increases; A/B/A tests alternating two LRs for a few hundred updates each and keeping the winner; re-planned earlier cooldowns from loss trends); migrates tensors from AdamW to Muon module-by-module (attention/MLP first, then adaLN split into chunks, timestep embedder last); on modded-nanogpt it measured that token-embedding entries are ~15 in size where adjacent bf16 values are 0.0625 apart, so as the LR decayed, rounding would discard a growing share of each update — from update 1,040 it kept that one matrix's Adam moments in float32 with compensated rounding on writeback and left everything else alone. Loss-spike defense: in a SiT run it traced 17 of 18 logged gradient spikes to the timestep embedder and wrote per-tensor clipping thresholds set from each tensor's own recent gradient norm (global threshold kept as backstop); in a controlled ResNet-18/CIFAR-10 experiment with four inserted stretches of random images and labels (agent not told), the first two stretches cost it −50.0 and −66.3 accuracy points (≈ the static baselines), but between stretches it added loss damping, replaced it with clipping, then wrote a gate that holds back batches whose loss is far above recent clean ones — the third stretch cost −12.1 and the fourth +0.7, while Muon+clip, AdamW+clip and Stable-SPAM still lost 28.5–76 points per stretch. Overfitting: ResNet-18 on CIFAR-10 with 10% wrong labels, no augmentation, agent sees train + dev metrics but is never told about the label noise — AdamW ends at test loss 2.49 / 73.5% accuracy (early-stopped 1.01 / 72.9%; weight-averaged 0.83 / 77.5%) and predicts the wrong trained label on 100% of the 4,500 mislabeled training images; OPAL ends at 0.69 / 78.6%, predicts the wrong label on only 4% (true label on 78%), via progressively higher learning rates plus a self-chosen weight average (\"extended SWA\") selected on the dev set. Toy control check (2D landscapes, OPAL restricted to heavy-ball with momentum resets/return-to-best): mean log10(f − f*) −11.6 vs −2.2 for the best of 12 common static recipes and −7.4 for the best of 382,080 swept recipes. Cost: ≈100 decisions on LightningDiT cost $6.42 at Opus 5.5 list price on top of ~74 H100-hours (~$510 AWS on-demand); asynchronous mode adds 1.01–1.14× wall-clock vs the static run (blocking at every decision: 1.30–4.39×). Authors' stated limits: gains shrink when a run is short AND its recipe is already fine-tuned (the two conditions coincide in the original modded-nanogpt setting; other settings train 8–120× more updates); reactive behavior is another source of nondeterminism and makes training less reproducible; most experiments run once, a few three times; the current implementation does not support sharded training or optimizer compilation. Repo README adds: v0.3.4, single GPU / single-node DDP only (no multi-node, FSDP, DeepSpeed); \"the agent can make a run worse: it cannot restart or roll back training, it can only fix its programs at the next decision\"; results vary run to run because the agent chooses differently. Repo ships a one-line `opal.wrap()` wrapper around any torch.optim optimizer, `opal doctor` / `opal estimate` / `opal show` / `opal report` tooling, examples, a CPU test suite, and an experimental Codex backend (gpt-6.1-sol); 34 stars, created the day of the thread.",
      "url": "https://xingjianbai.com/reactive-optimizers/",
      "authors": [
        "Xingjian Bai",
        "Jia-Hao Liang",
        "Jayden Teoh",
        "Vincent Sitzmann — MIT EECS (Bai is a PhD student working with Phillip Isola and Vincent Sitzmann",
        "previously RA at Oxford VGG)"
      ],
      "tags": [],
      "venue": "author's blog (no paper — no arXiv/OpenReview version exists; the citation block in both blog and repo is @misc, note \"Blog post\")",
      "source": "blog",
      "license": "",
      "published_year": null,
      "added_at": "2026-10-21T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1431",
      "markdown": "https://papers.projxon.ai/entries/1431.md",
      "api": "https://papers.projxon.ai/api/entries/1431"
    }
  ]
}
