AIAny
Icon for item

LoopCoder-v2: Only Loop Once for Efficient Test-Time Computation Scaling

Uses Parallel Looped Transformers (PLT) to make loop count a practical knob for code models, finding two loops give the best test-time gains. Trains 7B models on 18T tokens and attributes saturation beyond two loops to a gain–cost tradeoff from positional mismatch.

Introduction

Looped Transformer designs promise extra iterative computation without adding unique parameters, but sequential looping raises latency and KV-cache memory. Parallel Looped Transformers (PLT) sidestep those deployment costs by executing loops in parallel with cross-loop position offsets (CLP) and shared-KV gated sliding-window attention. That makes loop count a real design choice at inference time—but it also introduces a boundary-induced positional mismatch whose cost can outweigh later refinement gains.

Key Findings
  • Two-loop PLT yields the bulk of productive refinement: a family of 7B LoopCoder-v2 models trained on 18T tokens shows consistent improvements on code generation, code reasoning, agentic software-engineering and tool-use benchmarks (notably large gains on SWE-bench and Multi-SWE).
  • Non-monotonic loop-count effect: adding a third or more loops often degrades performance. Diagnostics show early loops provide diverse, useful updates while later loops produce smaller, oscillatory refinements.
  • Gain–cost explanation: CLP gives a roughly fixed positional-offset cost per loop boundary while refinement gains shrink with later iterations; once cost exceeds marginal benefit, additional loops hurt overall quality.
  • Practical implication: for PLT-style coders, selecting a small loop count (two in these experiments) is a Pareto win for test-time compute, latency and accuracy.
Who this helps and trade-offs

Great fit if you need configurable test-time compute for code models and want to avoid the sequential-latency and growing KV memory of recurrent looping. LoopCoder-v2-style PLT is attractive when you can accept a modest architectural offset (CLP) in exchange for parallel inference and lower memory. Look elsewhere if your workload requires many small, guaranteed monotonic iterative refinements per token or if absolute parity with fully sequential looped transformers (without positional offsets) is mandatory.

Where it fits

This work sits between fully sequential looped transformers (which can offer more per-loop fidelity but incur latency/memory costs) and single-pass depth‑matched Transformers. It shows a practical middle ground: parallelize iterations to reclaim latency/memory while tuning loop count empirically to avoid CLP-induced regressions.

Methods & diagnostics (brief)

The paper trains matched 7B PLT code models with differing loop counts and applies instruction tuning before evaluation. Empirical analysis inspects per-loop representational diversity and update dynamics, linking oscillatory late-loop behavior and decreasing marginal gains to the observed performance drop beyond two loops. The study frames loop selection as an explicit gain–cost optimization for PLT design.

Information

  • Websitearxiv.org
  • AuthorsJian Yang, Shawn Guo, Wei Zhang, Tianyu Zheng, Yaxin Du, Haau-Sing Li, Jiajun Wu, Yue Song, Yan Xing, Qingsong Cai
  • Published date2026/06/16

More Items

Presents an open 7B dense foundation model for mathematical reasoning and tool-assisted web search, supporting 256K-token context. Key features: hybrid gated sliding-window + global attention for efficient long-context training, FP8 Muon optimizer, progressive 16K→64K→256K curriculum, and open-source weights, data, and recipes.

Presents Atria Dawn Preview, an agentic foundation LLM trained with a Verifiable Experience Pipeline to connect tool-mediated interactions to executable environments; evaluated across 16 real-world research and engineering benchmarks with top scores on five, and a human–AI collaboration analysis of 769 task records.

Progressively prunes and distills audio encoders for speech LLMs to cut inference cost while preserving decoder-facing embeddings, using behavioral probes, representation alignment, cross-scale distillation and LoRA finetuning; reports reduced macro-error on Chinese–English benchmarks.