Explore the research collection
243 entries · showing 49–72 · Follow this search
- Code
slime v0.4.0: A First Step Toward Greater Scale
slime (THUDM) is an LLM post-training framework for RL scaling that connects Megatron training with SGLang rollout through a shared training/rollout/Data Buffer path; it is the RL framework behind the GLM-4.5 through GLM-5.3 model releases and supports Qwen, DeepSeek, and Llama 3 models (repo ~8.6K stars, Apache-2.0). Release v0.4.0, 'A First Step Toward Greater Scale', was motivated by OpenAI's Navier-Stokes research effort (~10,000 concurrent agents, ~130B output tokens), which prompted a rethink of RL infrastructure scale. Four architectural changes: (1) Focus — two training modes share one train.py lifecycle: synchronous training for algorithmic exploration and correctness, fully async training for throughput at scale (legacy train_async.py removed; PR #2391). (2) Distributed rollout — with the new straw backend, fully async rollout runs one rollout worker per Ray node on CPU resources, each with its own generation pool and asyncio event loop, so orchestration spreads across cluster CPUs instead of a single process bottleneck; training batches collect completed groups without waiting for every worker (PR #2410). (3) Persistent storage — straw (github.com/zhuzilin/straw) provides durable queues and shared tensor storage on a filesystem (JuiceFS currently supported): rollout workers publish payloads to shared storage and training ranks read by reference, moving bulk data off Ray's object-store transport; prompt tasks, partial rollouts, completed samples, and converted training batches persist as large append-only files to reduce small-file/filesystem metadata overhead, with checkpoint rollback support (PRs #2410, #2427). Select via --rollout-data-transport straw. (4) Independent recovery — Megatron training lifetime separated from the SGLang serving cluster: healthy engines/routers keep running after a training failure, and resubmitted training restores the last committed checkpoint and replays retained batches, reusing accepted samples and conversion results (PR #2444). Other improvements: score centering (REINFORCE objective with top-p replay and importance-sampling corrections, --use-score-centering, for training-inference mismatch); PipelineRL --flush-cache-interval letting unfinished requests and KV caches survive selected weight updates; streaming and agent rollouts (cumulative/incremental generation streams, partial-prefix retention, per-request cancellation); Biren SUPA and Ascend NPU accelerator backends; correctness fixes (linear-attention gradients under context parallelism, full-vocabulary reference logprobs in actor top-p replay, checkpoint shard selection in disk-delta sync); stack updated to Megatron Core 0.19.2, Transformer Engine 2.18.0, Flash Linear Attention 0.5.2, NCCL 2.30.7.
- Paper
Periodic Weak Spots: Phase Sensitivity from Chunked KV-Cache Compression
Chunked KV-cache compression groups consecutive tokens into fixed-size windows and compresses each window into fewer cache entries at a fixed stride S, cutting long-context memory and attention cost. The paper shows this creates a new positional coordinate — the token's phase, its position modulo S — and a systematic failure mode called phase sensitivity: the same information can be easy to retrieve at one phase and difficult at another. In the DeepSeek-V4 family (which uses compressed sparse attention, CSA, with stride S=4), single-token needle-in-a-haystack retrieval at 128K context differs by up to 40.2 percentage points across phases, and a code-completion top-1 prediction flips periodically with period 4 matching the CSA stride. To isolate the cause, the authors pretrained a family of Qwen3-0.6B-derived transformers from scratch with chunked KV compression as the only substantial architectural change: every compressed variant shows periodicity matching the compression stride — even plain within-window averaging — while full-attention baselines show none. Window boundaries (key-value pairs split across windows) do not fully explain it: accuracy varies widely across phases that keep the pair inside one window. Mechanistic analysis (KV-head/layer knockouts in their models and attention-readout interventions) reveals phase specialization: different heads contribute asymmetrically to retrieval at different phases, also in DeepSeek-V4 itself. Compression gates that can learn separate positional preferences develop persistent per-head phase preferences during pretraining, and an idealized bigram-retrieval analysis shows gradient flow drives gates toward sharp static phase concentration. The practical takeaway: evaluating chunked-KV models requires measuring across compression phases (e.g., shifting the input by a few tokens while keeping the queried information fixed) — high average accuracy can coexist with systematic periodic positional failures.
- Post
Post-training infrastructure at Proximal
Proximal's engineering post on their internal post-training stack for agentic RL. Training and inference run on Modal GPUs (an internal fork of Miles, the OSS RL framework based on Slime); rollouts run in gVisor/microVM sandboxes on their own Kubernetes cluster, coordinated via a lightweight command daemon (pxd). Key design choices: async training where each rollout keeps the adapter it started on while new groups start on the newest published weights (rollouts >3 versions stale are never trained on; 128 finished groups per step; mean staleness 1.7 at 4:1 inference-to-trainer ratio); inference capture moved inside the replica after cross-region (Sweden vs US West) network waits cost minutes per rollout; single-replica on-demand GPU containers instead of 8-GPU nodes, growing inference 3:1 to 4:1 mid-run; a custom KV-cache-headroom router hitting 99.6% cache hit rate; fault tolerance via a durable rollout store on Modal Volumes (a run survived losing 40% of inference capacity mid-step, fully recovering in 19 minutes); LoRA weight sync over HTTPS sharded across ranks (delta sync tried, not worth it for small adapters); custom attention recomputation keeping only FlashAttention outputs + log-sum-exp, cutting step time 7.3% at long context. Sandbox fleet: tasks declare 1-8 vCPUs (mean 2.3); pods request 25% CPU / 40% memory of hard limits, packing 26 sandboxes per 16-vCPU node; image-aware scheduling raised cache hits 1% to 37% (2s cold starts); zstd over gzip sped image unpack 15-25%; their sandboxes beat a SOTA provider ~5x median / 7x+ p90 on command latency. Case study: Qwen3.8-27B with rank-32 LoRA, 128 envs/step, group size 8, vanilla GRPO on internal agentic coding tasks — DeepSWE pass@1 37.2% (+8.4 over base in 44 steps), pass@8 67.7% to 86.6%; gains survive dropping tasks flagged flawed by Epoch AI/Scrim/internal review. Built on OSS Miles and SGLang, with contributions back upstream (SGLang #43047, Miles #3977).
- Dataset
TermGrade: 1,004 graded RL environments for terminal agents (environments + 36k trajectories)
TermGrade is a fully open-source release of high-quality RL environments for terminal agents from ai& (HF org ai-and), covering the environments, their grades, the trajectories behind the grades, and the RL recipe used to train with them. The core release is ai-and/termgrade-environments: 1,004 executable Linux tasks, each a container plus an instruction plus a pytest verifier, with every task executed and shipped with a measured per-model pass rate graded against 6 models. ai-and/termgrade-trajectories adds all 36,000 agent episodes behind those grades, failures included, with raw terminal output and per-test results for every trial. A curated band-central split, ai-and/termgrade-bandcentral-gemma4-31b-bash (271 executable environments, 151 train / 120 validation), selects tasks by their measured base-model pass rate and ships the exact RL split plus the verl config used for training. Training google/gemma-4-31B-it on the tasks it solved about half the time with GRPO++ (GRPO + DAPO modifications + Dr.GRPO advantage handling: no KL term, asymmetric clip-higher 0.2/0.28, token-mean loss aggregation, mean-centred advantages without std normalisation, dynamic sampling dropping zero-variance groups, fully on-policy 16 rollouts at temperature 0.6, LoRA rank 32 / alpha 64, lr 1e-5 constant, binary reward, ~5 updates per epoch) for 7 hours on one 8xH200 node produced ai-and/termgrade-gemma4-31b-lora, scoring 46.1 on Terminal-Bench 2.1, +3.1 over the 43.0 base (mean of 7 eval runs, 21 attempts per task); the same recipe replicated 5x averaged +2.1 (t=3.8, p~0.025). The gains land on long-horizon tasks where the base model used to run out of turns and are flat where it already finished; notably, a 5x larger training set with identical hyperparameters landed within noise, matching the p(1-p) gradient-weight curve. Trained in a bash tool-calling scaffold but evaluated under Terminus-2, so the result demonstrates transfer across scaffolds. All artifacts are Apache-2.0: environments, trajectories, band-central split, LoRA adapter, and merged weights (ai-and/termgrade-gemma4-31b-merged).
- Code
RSIGym: A Flexible Environment for Recursive Self-Improvement
RSIGym is an agent-native recursive self-improvement environment built on Everything as a Service: training (Tinker-backed LoRA), inference (OpenAI-compatible, Tinker), rollout (frontier-model gateway), evaluation (Harbor + E2B), sandbox (E2B SDK), and authorization (run keys, budget accounting) are reusable platform services, while the research agent works in a lightweight CPU-only container and spends its budget on improving the target system. Three improvement tracks are supported: Data (change training data), Harness (change execution harness, weights fixed), and Joint (data + training settings + harness together). RSI-Index measures how well frontier agents jointly improve a target model's weights and harness, defined as the mean fraction of the remaining performance gap closed across five benchmarks: RSI-Index = mean((final - initial) / (1 - initial)) over SWE-bench Verified (100 tasks), Terminal-Bench 2.0 (89), AIME 2024/2025 (60), GPQA Diamond (100), and SkillsBench (37, science/office/finance). In the main Joint-track study (six research agents improving Qwen3.5-35B-A3B-Base with a minimal harness, $500 platform-service budget per benchmark run), Opus 5 leads at RSI-Index 0.4809, followed by Opus 5.5 (0.4528), DeepSeek V4.1 Flash (0.4343), Astra (0.4093), Sol 6.1 (0.3321), and Sol 6 (0.2079). Opus 5's selected systems improve all five benchmarks: SWE-bench Verified 17.67% to 50.33% and AIME 31.67% to 97.78% (Terminal-Bench 10.49% to 26.97%, GPQA 51.33% to 83.33%, SkillsBench 1.65% to 21.21%). 29 of 30 Joint runs improve; four different researchers lead at least one benchmark. Two additional experiments: Opus 5 iterating the DSH harness with Qwen3.6-35B-A3B-Instruct weights fixed raises Terminal-Bench from 30.34% to 40.82% (tasks solved on all three attempts increase 15 to 26); and Qwen3.8-27B acting as its own researcher completes training, candidate comparison, and submission but scores 56.26% vs 56.66% initially on SkillsBench - its six-task development gain does not translate into an overall improvement.
- Paper
Scaling Trajectories for Complex Tasks through Recursive Self-Rewrite
RSR: use one base model (Qwen-3.8-27B) to discover successes under diverse harnesses, then reconstruct them as training trajectories under a general harness - planner extracts runbooks, critic screens for verifier/solution leakage and guides recursive revision, executor follows qualified runbooks in fresh sandboxes.
- Paper
Self-Supervised Scaling of Terminal Environments for Scientific Domains
SWR (software-in-the-loop reconstruction): turn existing scientific software workflows into self-supervised, verifiable terminal-agent training environments - run workflows, reveal some input-output examples, hide others; the agent reconstructs the behavior and the original software supplies reference outputs for checking via a hierarchical verifier (domain-specific semantic comparison, structural validity, anti-shortcut checks).
- Paper
AECP: Artifact-Exclusive Communication Protocol for Multi-Agent Code Generation
AWS AI Labs (first author Jiaqi Xue, UCF, during an AWS internship). In free-form multi-agent coding teams, shared findings are just context — agents can ignore them, and deviations from agreed module interfaces go undetected. AECP requires agents to communicate exclusively through structured artifacts, and specifies how the harness processes them: the harness supplies recorded findings when an agent accesses relevant code, screens implementations against recorded interface commitments, and requires affected agents to revisit an agreement when it changes. These coordination steps become part of harness execution rather than actions agents must initiate from prior messages. Across Doc2Repo, NL2Repo, and CodeProjectEval, with closed- and open-source models including Opus-4.8 and DeepSeek-V4-Flash, AECP improves average test pass rate by 28.2% and reduces average wall time by 16.5% relative to a team using free-form inter-agent messages. Artifact-exclusive communication also blocks relay of malicious instructions between agents: they reach other agents 0% of the time (vs 95%) and are acted on 0% of the time (vs 40%). CC BY 4.0.
- Paper
VERA: Scaling Verifiable Environments for Agentic co-Evolution
VERA (NVIDIA) addresses agent training's environment bottleneck by converting benchmark trajectories into 9,000+ restartable, rubric-scored sandboxes, then co-evolving the LLM and its harness on them. Auto-Rubric turns trajectories into sandboxes: a coding agent writes binary rubric items (scored {0,1} from observable evidence) over action arguments, execution effects, artifacts, and output quality; executable checks and an Agent Judge verify each sandbox, and a failed executable check overrides any judge score. Trajectories are segmented into five stages (plan, setup, verify, execute, submit), each restorable and scored independently. The co-evolution loop alternates two updates with the other component frozen: model rounds run full-parameter GRPO with rubric rewards (a Reward Verifier checks the rollout evidence behind each reward; a checkpoint is accepted if its dev-benchmark score drops no more than 20% relative to the previous accepted checkpoint), and harness rounds add/merge/remove skills (accepted only if a paired frozen-model rerun shows target-stage improvement, no end-to-end regression, safety checks pass, and self-tests pass with at least +5 Overall points on the dev set; at most three edits per round). At 9B (Qwen3.5-9B), the co-evolved agent beats the strongest single-axis baseline by 10.3 points on AutoCoWorkBench and 13.0 on AutoMedBench, leading SWE-Bench Verified and MedXpertQA under their official protocols. At 27B (Qwen3.8-27B), VERA reaches 71.6 on AutoCoWorkBench (above Claude Opus 4.8, 1.0 point below GPT-5.6-Sol) and 80.7 on AutoMedBench (within 1.2 of Claude Opus 4.8, highest Agentic score 94.1), and transfers out of domain to Automation-Bench (43.8%) and AgentClinic (76.4%). Only at 27B are general capabilities retained/improved (AIME 2026 +10.0, ALFWorld +3.8, GPQA-Diamond +7.7, IF-Bench +1.8 for the CoWork agent); 4B/9B agents lose heavily on AIME.
- Paper
Scaling Verifiable Environments for Long-horizon Work Agents
WorkForge is a scalable synthesis framework for building verifiable long-horizon work-agent environments from real-world resources. From expert-authored 'Scene Blueprints' (workflow, deliverable, source requirements, domain decisions), an acquisition agent iteratively searches, downloads, and previews real files to instantiate a workspace; profiling then extracts observable factual anchors (file roles, dependencies, verifiable facts). Task generation derives each task's instruction, hidden solution plan, and complementary verifiers from those anchors: programmatic verifiers check deterministic requirements on final artifacts (mean pass rate over rubric items), while semantic verifiers score open-ended deliverables via an LLM judge with criterion-specific scoring guides (scores 0-10, normalized). The corpus is 16,665 environments across 40 professional domains (top 4 = 31.9% of tasks), workspaces covering 60 file types, avg 42.3 files / 279KB, avg 21.9 rubrics per task; solver rollouts (GLM 5.3 with Claude Code and OpenClaw harnesses) average 31.8 steps, 33.8 tool calls, 76.5K tokens. Full-parameter SFT of Qwen3.5-35B-A3B-Base on the 16,665 trajectories lifts GDPval 45.5 to 73.6 (+28.1) and APEX Score 5.0 to 21.3 (+16.3), with similar gains on WildClaw, ClawEval, and Agents' Last Exam; the 73.6 GDPval beats the prior sub-100B specialized SOTA (ClawGym-30A3, 35.0) by 38.6 points. Applied to the post-trained Qwen3.5-27B, WorkForge-27B reaches GDPval 82.4, beating Qwen3.5-397B-A17B (79.7) with ~15x fewer parameters. Scaling holds across data volume (1K to 16K trajectories: ALE +13.0, WildClaw +8.4) and interaction horizon (41-60-turn training trajectories vs 0-20: ALE +4.2, WildClaw +5.0). Hybrid verification-based trajectory selection beats programmatic-only or LLM-only selection; real-workspace environments have 5.4x more files and 2.4x more file types than synthetic ones.
- Paper
Bellman Policy Optimization
BPO is a critic-free RLVR method derived from Policy Mirror Descent (PMD): for autoregressive generation with terminal rewards it uses the Bellman equations to reformulate PMD as a trajectory-level objective, avoiding estimation of state values at intermediate states, and it is proved to have the same unique optimal solution as the original PMD objective on states reachable under the rollout policy. The practical token-level loss approximates this objective with a smoothed mismatch-correction weight — a smoothed ratio of complementary token probabilities — replacing the importance-sampling ratio. On Qwen3-30B-A3B-Base it reaches 50.5% average accuracy across AIME 2024-2026, vs 39.5% GRPO-ClipHigher, 43.5% GSPO, 47.4% CISPO, 46.4% DPPO (strongest baseline gaps 3.1-11.0 points); after 400 training steps 49.4% vs 45.5% for DPPO. Ablations on Qwen3-4B-Base show similar performance across a range of smoothing and truncation settings.
- Paper
ALoDLM: Adaptively Looped Diffusion Language Models
Amazon AGI introduces ALoDLM, a diffusion language model that replaces uniform denoising depth with token-adaptive latent recurrence, attacking the computation-difficulty mismatch: within one denoising step, easy masked tokens need little compute while hard ones need a lot, yet standard DLMs apply the same fixed-depth denoiser to every position. ALoDLM partitions a Qwen3 backbone into a Prelude, a shared Recurrent Core, and a Coda; at each denoising step the core runs up to K=4 recurrent passes. After each pass, an LM head predicts token distributions and an exit gate gives per-token halting probabilities: positions with predictive entropy <= tau are sampled and committed (their embeddings fed back as context for the next pass), while unresolved positions carry their latent states forward for further refinement. The inner loop ends when the mean cumulative halting probability reaches q, no unresolved positions remain, or K is reached. Training treats token-wise exit schedules as latent variables and derives a conditional negative ELBO; a single-trajectory gradient estimator is provably unbiased for the objective (Prop. 1), with a truncated-geometric prior (c=0.4) favoring shallow exits and a practical recipe relaxing the KL term and adding variance reduction (intermediate supervision, first-pass control variate). ALoDLM-1.7B and 8B are trained from Qwen3 by direct SFT on a 5B-token corpus (no continued pretraining; largest looped DLM to date at 8B). On eleven reasoning/knowledge/math/code benchmarks via the OpenCompass protocol, ALoDLM beats all evaluated DLMs (LLaDA-8B, Dream-7B, Fast-dLLM-v2, SDAR-8B, WeDLM-8B) and its Qwen3 AR counterparts in average score at both scales: 65.5 vs 63.8 at 1.7B, 80.3 vs 78.5 at 8B. It keeps fast parallel decoding: on GSM8K, ALoDLM-8B delivers ~2.7x the throughput of vLLM-served Qwen3-8B (93.25% at 612.4 tok/s on one NVIDIA B200) at comparable or higher accuracy, and 13.6% fewer GFLOPs per token than WeDLM at the same accuracy threshold. Recurrent depth is an effective test-time scaling axis, and the model learns token-dependent refinement preferences without difficulty labels (e.g., numerical tokens refine longer). Caveats: longer time-to-first-token than AR models and input-dependent throughput; the speed advantage can shrink on difficult or out-of-distribution inputs. Code: github.com/amazon-science/ALoDLM (optimized CUDA-graph inference engine included); weights: huggingface.co/amazon/ALoDLM-8B and amazon/ALoDLM-1.7B; project page: alo-dlm.github.io. Joins the looped-models cluster (670, 952, 1545, 1548, 1549, 1551, 1563, 1566, 1579). Directly relevant to the user: a practical recipe for adaptive per-token compute and the strongest current DLM quality-efficiency tradeoff.
- Paper
Sentry: Learning to Recover from LLM Agent Failures at Test Time
Test-time framework for recovering LLM agents from failures, from Stanford's ACE (Agentic Context Engineering) team. Core finding: failure knowledge is conditional — how it reaches the agent matters as much as what it contains. Failure lessons kept in context misfire when their failure is absent: ACE-style memory that keeps past failure lessons in context for every task distracts the agent (e.g., on WebShop the agent found the right product then kept comparing alternatives and never acted); simply removing failure lessons improves ACE by +17% on WebShop and +14% on Mind2Web Replay. Conversely, runtime-intervention methods (AgentGuard) act only on failure but learn nothing — fixed rules can fire at the wrong time (a 'no progress' warning made the agent abandon correctly picked product options). Sentry combines both: it learns from experience like ACE, but keeps failure knowledge in a separate playbook outside the agent's main context; a failure detector watches for failures, retrieves failure-specific guidance (hard repair for invalid actions, soft repair with hints), and a verifier checks recovery without access to task rewards — the playbook is updated only if recovery succeeded. Results on WebShop, AppWorld, SWE-bench Lite, Mind2Web Replay: +37% over the best runtime-intervention baseline on average (up to +77% on WebShop), +39% over ACE; ACE+Sentry combined performs best overall, with task-level and failure-level learning as complementary. Learned lessons transfer to held-out tasks; controlled experiments confirm exposing the full playbook hurts even when relevant lessons remain available on demand. CC BY 4.0 license. Directly relevant to the user's agent app (memory design: storing knowledge is easy, deciding when the agent sees it is what matters) and to Launch Helm's intervention/control angle.
- Paper
Continual Graph Memory for Mathematical Research Agents
Ansatz, a mathematical research agent built around Continual Graph Memory — a graph-based, evolvable, cross-problem memory system for long-horizon proof search. Motivation: solving frontier math problems may need massive parallel agents running for long periods, generating enormous volumes of intermediate proof results that must be organized and reused. Components: a unified graph memory representing all intermediate exploration results (facts, plans, counterexamples) with edges for their relationships; dependency-aware retrieval for targeted local context; an evidence-sensitive curator that updates the research frontier and distills lessons from prior attempts; scoped recall that surfaces earlier statements and negative findings for local re-proving rather than uncritical reuse. Experiments across all ten 'First Proof Second Batch' research tasks plus four component studies: Ansatz reports closure on all ten tasks and sustains/resumes long-horizon mathematical search. Beyond that, it autonomously solved the Jamison caterpillar conjecture and Erdos Problems 289, 348, and 488 with no human intervention, and made partial progress on several other open problems.
- Paper
Attribution-Guided and Coverage-Maximized Pruning for Structural MoE Compression (MoE-Slimming)
Structural pruning framework for MoE LLMs built on the observation that MoE expert information is concentrated in a small fraction of channels — expert-level importance is too coarse to capture internal redundancy, and even 'high-importance' experts may not need large capacity. Three components: (1) Attribution-guided Loss Approximation (ALA) estimates expert importance layerwise via first-order Taylor approximations over calibration data, without exhaustive ablation (20x fewer GPU hours); (2) Coverage-maximized Budget Allocation (CBA) reformulates prune-ratio allocation as channel-score coverage maximization under a global budget, retaining high-contribution channels and pruning low-score tails; (3) Alignment-Aware Redistribution (AAR) adjusts dimensions to satisfy low-bit kernel constraints for quantized storage and efficient inference. On DeepSeek and Qwen MoEs, retains accuracy under 50% or 25% structured pruning jointly with 4-bit quantization: Qwen3-30B-A3B memory footprint reduced 5.27x, at most 1% average accuracy drop on general knowledge, 94.5 on MATH500, and outperforming SOTA baselines across diverse benchmarks. Pipeline: score -> mask generation + LoRA fine-tuning (fake pruning during training, masks anneal) -> physical slimming into a smaller dense checkpoint + lm-eval-harness benchmarks.
- Paper
Looping Beyond Twice: A Scalable Recipe for Looped Mixture-of-Experts
Diagnoses why looped MoE benefits fade after ~2 loops (extra FLOPs yield little): (1) the curse of depth is inherited and amplified — hidden-state variance grows each iteration as residual updates accumulate, destabilizing deep recurrence and drifting representations; (2) expert selection collapse — routers repeatedly select the same experts across loops, so iterations add compute without computational diversity. LOOM is built on one principle: each loop should contribute new computation while keeping the recurrent state stable. It stabilizes recurrence by scaling residual updates to bound variance growth and re-injecting the input embedding at every loop, and diversifies it through per-loop routers that engage different experts plus a Looping Residual carrying earlier outputs forward. Stable scaling to 9-12 loops across 100M-1.7B models. Near-iso-FLOP: the 700M model peaks at 5 loops, perplexity 18.36 -> 16.54, avg zero-shot 38.84% -> 39.53% over the non-looped baseline. Without FLOP matching: 1.7B model trained on 60B tokens peaks at 9 loops, perplexity 9.62 -> 7.77, avg zero-shot 42.4% -> 47.7%.
- Paper
A Unified View of Attention and Residual Sinks: Outlier-Driven Rescaling is Essential for Transformer Training
Unifies the two emergent outlier phenomena in LLMs — attention sinks (a few tokens receiving large attention logits) and residual sinks (fixed dimensions with persistently large activations) — under 'outlier-driven rescaling': the outliers work jointly with normalization (softmax attention, RMSNorm) to rescale non-outlier components, and this mechanism is validated across architectures and training token counts. Main conclusions: (1) outliers function jointly with normalization — removing normalization eliminates the outliers but degrades training stability and performance; clipping outliers while keeping normalization also degrades, so outlier-driven rescaling contributes to training stability; (2) outliers act as rescale factors, not contributors — their post-norm contributions are far smaller than non-outliers'; (3) outliers can be absorbed into learnable parameters or replaced by explicit gated rescaling (GatedNorm), improving training performance by an average of 2 points and drastically improving quantization robustness (only 1.2 points degradation under W4A4). Since outliers' post-norm contribution is tiny, relying on them is what makes LLM quantization a nightmare (huge dynamic ranges).
- Paper
Attention Residuals
Replaces standard PreNorm residual accumulation (fixed unit weights over all layer outputs, which causes uncontrolled hidden-state growth with depth and dilutes each layer's contribution) with Attention Residuals (AttnRes): each layer selectively aggregates earlier representations via learned, input-dependent softmax attention over preceding layer outputs. Block AttnRes makes this practical at scale: partitions layers into blocks and attends over block-level representations, cutting memory from O(Ld) to O(Nd) while preserving most gains; cache-based pipeline communication and a two-phase computation strategy make it a drop-in replacement for standard residuals with minimal overhead. Scaling-law experiments show consistent improvement across sizes; ablations validate content-dependent depth-wise selection. Integrated into the Kimi Linear architecture (48B total / 3B activated) pre-trained on 1.4T tokens, AttnRes yields more uniform output magnitudes and gradient distribution across depth and improves downstream performance on all evaluated tasks (reasoning, math, coding).
- Paper
Native Hybrid Attention for Efficient Sequence Modeling
Native Hybrid Attention (NHA) unifies linear and full attention into a single softmax operation within one uniform layer design. Long-term history is compressed into fixed-size key-value memory slots updated by a linear RNN; short-term context comes from exact sliding-window tokens; one softmax over all keys and values learns per-token, per-head balancing dynamically with no extra fusion parameters. A single hyperparameter — the sliding window size — shifts each layer smoothly between pure linear attention (w=0), intra-layer hybrid, and full attention (w=N), with no structural changes; all layers share the same architecture. NHA beats Transformers and other hybrid baselines on recall-intensive and commonsense reasoning tasks, and pretrained LLMs (Llama-3, Qwen) can be structurally hybridized with NHA via lightweight finetuning (e.g., NHA-Qwen2.5-7B / NHA-Llama-3-8B trained on 10B tokens, NHA-Qwen3-30BA3B) to match accuracy with drastically lower GPU memory and inference latency.
- Paper
Looped Diffusion Transformer
Looped-DiT: instead of scaling text-to-image models by size or denoising steps, it repeatedly runs shared Transformer blocks within each denoising step, increasing computational depth with fixed parameters (17 unique MMDiT blocks split 6/5/6; the 5 middle blocks shared over 4 loops = 32 effective block applications per step at ~260M params). Naive looping fails (weak supervision across intermediate loops, unregulated attention updates erode local information); two fixes: deep supervision across intermediate loops + self-modulating attention to stabilize looped feature updates. A 260M-parameter looped model beats a 6.5x larger model across text-to-image benchmarks at 4.9x lower inference compute. Increasing loop depth yields larger gains than adding denoising steps under a fixed inference budget, and deeper loops progressively correct mistakes from earlier loops — behavior suggestive of latent reasoning. Related catalog entry: 523 'Looped Diffusion Language Models' (LoopMDM, a different paper — that one is masked-diffusion LMs; Looped-DiT is text-to-image generation).
- Paper
Write Back the Δ: Revisiting the Same Tokens with Fresh Representations
Inference-time feedback that recycles endogenously produced computation: feeding a Transformer's full deep state back into shallow layers saturates fast (deep states are collinear copies of early residuals), but routing the depth increment Δ = z_deep − z_shallow isolates the newly accumulated computation and scales cleanly up to 6 edges. ReFlux frames depth feedback as a learnable directed-acyclic graph over layer pairs, with a tiny 2.2M-param router MLP predicting sparse gates and amplitudes over a frozen backbone — beating a 2.9M rank-8 LoRA adapter on C4 perplexity. Post-write norm projection avoids 'norm shock' on Pre-LN models like Qwen 3 (flipped Qwen3-4B from negative to +6.15% gain). Two execution flavors: sync (2 passes, 1.9x latency) and streaming (single pass, injects cached Δ(t−1) into token t — 0 extra backbone FLOPs, same KV cache, 1.02–1.08x decode latency, >80% of sync gains). Streaming serializes prefill (510x slowdown on 1,107-token prompts), so serving needs parallel prefill. Downstream: +2.1–2.3 accuracy points overall, +4.7 on multi-hop reasoning (2WikiMultiHopQA 24.6→29.7, HotpotQA 42.3→47.0); with CoT on GSM8K hits 92.0 while cutting output length 31% (1,002→691 tokens). Gemma3-4B C4 PPL 23.69→21.85 (full state only 22.79). Relevant to the user's LLM training-run and agent-harness work; related cluster: looped/recurrent models (670, 952).
- Paper
Let the Neurons Die: Exploiting ReLU-Induced Model Degradation
Turns the dying-ReLU failure mode into a training-time availability attack vector. ReLU units with persistently negative pre-activations output zeros and block gradient flow — three attacks exploit this: (1) dynamic data-ordering attack (DOA), which greedily builds a training prefix by selecting the next example that minimizes the target layer's post-update weight sum, pushing ReLU units toward negative pre-activations without modifying any samples or labels; (2)-(3) poisoning variants IG-DOA and IG-SKA, which use gradient inversion to synthesize class-conditioned samples by matching reference gradients in adverse model states constructed through data ordering or 'soft knockout' (rearranging weights across adjacent layers to concentrate negative contributions). On a fully-connected ReLU network on MNIST: ordering just 100 of 60,000 training examples drops test accuracy from 96% to 95% after five epochs; adding 200 poisoned samples from a single class drops it to ~86-88% vs ~96% clean. Demonstrates ReLU-targeted ordering and poisoning can impair learning without directly modifying the victim model's parameters.
- Paper
From Samples to Scenarios: A New Paradigm for Probabilistic Forecasting
Reframes probabilistic forecasting away from sampling: instead of drawing samples from a predictive distribution (which suffers probability absence, inadequate coverage, and high inference cost), the new paradigm emits a finite set of {Scenario, Probability} pairs directly — avoiding Monte Carlo-like approximation. The learning objective changes from modeling an entire continuous probability space to learning a set of plausible scenarios plus corresponding probabilities. Validation model TimePrism: a simple model of only three parallel linear layers, yet it achieves 9 of 10 state-of-the-art results across five benchmark datasets on two metrics. Core idea overlaps the current decision-model trend (generate futures in parallel, assign explicit probabilities, build for decision-making rather than text generation) — but was formalized a full year earlier. The post frames TimePrism's judgments ('keep this information?', 'which action next?', 'is the task complete?') as exactly the decision-oriented outputs now in vogue. Same family as the catalog's System One / JEV cluster: entries 1363 (TypeSafe AI System One/JEV), 1434 (CLM), 1541 (Gero-4B).
- Paper
Broken Symmetry in BF16 Attention: Why FlashAttention Gradients Blow Up Late in Training
Diagnoses a late-training blow-up training a 450M transformer on 50B tokens with FlashAttention-3 in BF16: healthy for 25B tokens, then gradient norm grows 1000x and loss ends 0.2 nats above FP32 attention — with no NaNs at all. Recomputing just two layers' attention backward in FP32 removes almost all excess gradient. Part of the cause is known (a fused multiply-add in the forward softmax, never fixed in FA3); repairing it stops the blow-up but leaves the query gradient wrong by more than its own size (219% median error). The deeper cause is a broken conservation law: the softmax score gradient dS sums to zero along every row, making dQ blind to where the keys sit as a group; rounding dS to BF16 leaves a small nonzero sum that leaks the mean key into dQ — and the leak grows exactly as late training makes keys large and attention sharp. Fix: GProj (gauge projection), which restores the zero row sum after the cast with two rank-one corrections per row — cuts median dQ/dK errors from 219%/13% to 0.34%/0.37% (FP32-attention level) for 4.7% more step time; in matched from-scratch runs it reaches the same loss as FP32 attention while FA3 and key smoothing destabilize. KohakuBlueleaf replied on the thread reporting the same class of precision bug in FA4/cuDNN/flex attention and their KohakuFA fix. If a BF16 run blows up late with no NaNs, check the attention backward. Directly relevant to the user's LLM training-run debugging work.