Explore the research collection
4 entries · Follow this search
- Post
Reactive Optimizers — OPAL (OPtimizer with an Agent in the Loop)
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.
- Post
vime × RL-Kernel × AMD: Bitwise Train–Rollout Consistency on ROCm (RL-Kernel v0.1.0)
vLLM Blog (2026-09-14) on RL-Kernel v0.1.0 with vime and AMD: Megatron training and vLLM rollout often disagree on logprobs for the same weights/tokens because kernels, Split-K/KV, reduction order, and intermediate precision differ, which pollutes importance ratios and KL/clipping. RL-Kernel aligns the numerical execution contract (RMSNorm, Attention, GEMM/SwiGLU, linear logprob, collectives) while vime aligns the timeline and weight sync. On ROCm they added deterministic MFMA GEMM, vocabulary reduction, HIP IPC, AITER/CK Attention schedule fixes, math/fusion last-bit fixes, and paged-KV/HIP-Graph state fixes. End-to-end Qwen3-8B BF16 GRPO on 8× MI300X (Megatron TP4/CP2; 2× vLLM TP4 colocated; 200 steps; dapo-math-17k) reports mismatch_count=0 and max_abs_diff=0 throughout on the strict path vs native mismatches every step. Apache-2.0 at github.com/RL-Align/RL-Kernel (pyproject 0.1.0; torch>=2.4.1; transformers==5.13.1; optional cuda/rocm/vllm extras). Docs https://rl-align.github.io/RL-Kernel/. Scope today: Qwen3-8B Dense + vime + CUDA/ROCm; MoE/multimodal next.
- Post
EvaByte: Efficient Byte-level Language Models at Scale
HKU NLP + SambaNova blog (2025) for EvaByte, a 6.5B byte-level model (vocab 320: 256 bytes + 64 specials) with 8 multibyte prediction heads and EVA (chunked linearized attention). Trained on 1.5T bytes of text/math/code mainly from Dolma v1.7, The Stack v2, FineWeb-Edu, and DCLM-Baseline, batch 8M bytes, 32K context, 256 SambaNova SN30-2 RDUs. After 1.2T bytes (EvaByte-Phase1), two annealing runs (100B and 200B bytes) are souped into EvaByte, then SFT (EvaByte-SFT) on a Tulu 3 / OpenHermes 2.5 / OpenCoder mix. Claims competitive open 7B tokenizer LMs with ~5x less training data (bytes vs Llama-3 tokens) and up to 2x faster decoding than tokenizer LMs via self-speculative multibyte generation. Hub cards Apache-2.0. Paper listed as coming soon; cite the blog.
- Post
Training-Free Looped Transformers (WisPaper blog summary)
WisPaper user-blog walkthrough of Training-Free Looped Transformers (arXiv:2605.23872, already papers_local id 529): wrap contiguous mid layers of a frozen LLM in a numerical-integration loop (block- vs layer-mode); naive reapplication fails, ODE/Euler sub-stepping keeps states in-distribution; reported e.g. +2.64 pp MMLU-Pro on Qwen3-4B-Instruct across seven model families; depth-fraction ~45–60%. Blog restates paper claims; does not add new experiments.