Your AI Agent Can Now Train on 2M-Token Contexts. Here’s the Catch.

Your AI Agent Can Now Train on 2M-Token Contexts. Here’s the Catch.

Inference systems are already running million-token contexts. RL training has been stuck at 256K. That gap doesn’t just hurt researchers — it means every agent you’re deploying was trained blind to the kind of long, messy, tool-heavy trajectories it actually encounters in production. A new paper claims to close that gap on eight consumer-grade H20 GPUs. Read the fine print.

What happened

A team at (apparently) a Chinese AI lab published LongStraw, an execution stack designed to run reinforcement learning post-training on sequences exceeding 2 million tokens without scaling up hardware. The core trick: evaluate the shared prompt without autograd (no gradient tracking on the long prefix), keep only the model-specific state needed for later tokens, then replay short response branches one at a time — trading extra compute time for a dramatically smaller live training graph. On just 8 H20 GPUs, they ran grouped GRPO scoring and backward passes at 2.1M positions with groups of 2 and 8, where scaling the group size from 2 to 8 added only 0.21 GB of peak allocated memory. A stress test pushed to 4.46M positions. On 32 H20s, they validated the full execution path across all 78 layers of GLM-5.2 at 2.1M tokens. The system was implemented on two architectures: Qwen3.6-27B (hybrid recurrent + full attention) and GLM-5.2 (compressed-attention MoE), suggesting the approach isn’t tied to one model family. For AI agents whose context windows accumulate observations, tool outputs, and decision histories across long trajectories, this is directly relevant infrastructure.

Cold read

The authors themselves are admirably honest about what this is not: they explicitly call these results “execution capacity rather than complete training correctness.” The captured prompt state is detached — meaning gradients don’t flow back through the full 2M-token prompt — and some distributed forward and gradient composition paths remain incomplete. In plain English: they proved the thing doesn’t OOM; they did not prove it trains correctly or that the resulting model improves on any benchmark. There are no downstream task results, no accuracy curves, no comparison to a baseline trained at shorter context. The agentic workflow framing in the motivation is compelling, but the paper is a systems paper about memory arithmetic, not a training recipe you can run next week. Twenty authors and two proprietary model architectures also raise questions about reproducibility outside this specific lab’s stack.

What it means for you

  • Signal maturity: 2/5 — Execution feasibility shown; training correctness and downstream gains unproven
  • Who gets hurt: Startups selling “long-context fine-tuning” as a managed service — this raises the bar for what “long” means, and the hyperscalers will absorb this faster than you
  • What breaks if this is true: The current moat of labs with 512K–1M token RL-trained agents evaporates; the training constraint that justified expensive proprietary pipelines disappears
  • Why it might not land: Detached prompt gradients is a real limitation — if the model can’t learn from what happened in the first 1.5M tokens, you’ve solved the memory problem but not the learning problem; gradient correctness has to be demonstrated before this is a training method
  • Watch for: A follow-up paper or blog post showing benchmark improvements (e.g., HELMET, RULER, or agent task success rates) on models actually trained end-to-end with LongStraw at 1M+ tokens — that’s the proof of concept that matters

Forecast as of 2026-07-18

By Q2 2027, at least one major open-weight model will ship with documented RL post-training above 512K tokens using a method closely resembling LongStraw’s detached-prompt approach — but the full-gradient version (no detachment) will still be limited to 256K–512K on commodity hardware due to unresolved gradient composition complexity.


Source: LongStraw: Long-Context RL Beyond 2M Tokens under a Fixed GPU Budget — Changhai Zhou, Kieran Liu, Yuhua Zhou, Qian Qiao, Jun Gao, Harry Zhang, Irvine Lu, Nolan Ho, Lucian Li, Andrew Lei, Cleon Cheng, Steven Chiang, Yihang Zeng, Di Zhang, Rio Yang, Kaijie Chen, Andrew Chen, Pony Ma, Weizhong Zhang, Cheng Jin. https://arxiv.org/abs/2607.14952v1

Similar Posts