Skip to content
FireFlash: 64 B300s, 5 Days, Matches Fable 5/GPT-6 Sol at 30x Lower Cost

FireFlash: 64 B300s, 5 Days, Matches Fable 5/GPT-6 Sol at 30x Lower Cost

FireFlash, a 300B-parameter terminal and coding agent trained via full-parameter RL on 64 NVIDIA B300 GPUs in under five days, achieves Terminal-Bench 4.0 Pass@1 of 46.2%—matching Fable 5 and GPT-6 Sol—while reducing per-task cost by over 30x, with gains transferring to DeepSWE and SWE-Bench benchmarks.

Machine Learning Algorithms & Natural Language Processing
Machine Learning Algorithms & Natural Language Processing
Machine Learning Algorithms & Natural Language Processing

Researchers from UCLA and collaborating institutions present FireFlash , a 300B-parameter long-horizon agent for terminal and programming tasks obtained by full-parameter reinforcement learning (RL) starting from GLM-5.3-Flash (321B total, 17.4B active per token). Training used 64 NVIDIA B300 GPUs for under five days and the team has released the complete training recipe. On Terminal-Bench 4.0 FireFlash reaches 46.2% Pass@1 , on par with Fable 5 and GPT-6 Sol, while its per-task cost is over 30× lower than Fable 5 at maximum inference intensity. Improvements also transfer to DeepSWE v1.1 (+5.4 points) and SWE-Bench Pro Verified (+5.1 points).

Five Key Optimizations

1. Infrastructure: Fully Asynchronous RL

Core insight: idle GPUs cost more than stale rollouts—let sampling and training run at full speed independently.

Separate GPU pools: Half the GPUs train with the slime framework in BF16; the other half run the SGLang inference engine with weights and KV cache in FP8. After each training step, new weights are synced via NCCL to the rollout engine—training and sampling never block each other (Figure 2).

Stale rollouts: Because sampling runs continuously, a turn may be generated by weights up to six versions behind the trainer. Only rollouts older than six versions are discarded. Policy staleness introduces minimal shift: log-probability difference between trainer and rollout is 0.065 at one version behind and only 0.08 at 4–6 versions behind.

Fast, isolated rollouts: The model’s native multi-token prediction (MTP) head enables speculative decoding, speeding up decoding by 1.38× . Each rollout and scoring run inside an independent Firecracker microVM forked from a parent VM in <100 ms. Infrastructure-related rollout-group loss dropped from 12% to 0.5% .

Figure 2: Fully asynchronous RL. Rollout and training each occupy half the GPUs without waiting. Inference engine continuously samples; each attempt runs in an independent microVM forked from its task’s parent VM. Completed groups queue for the trainer. Groups with identical scores are dropped; turns sampled from weights >6 versions old produce no gradients. After each update the trainer pushes new weights to the inference engine.
Figure 2: Fully asynchronous RL. Rollout and training each occupy half the GPUs without waiting. Inference engine continuously samples; each attempt runs in an independent microVM forked from its task’s parent VM. Completed groups queue for the trainer. Groups with identical scores are dropped; turns sampled from weights >6 versions old produce no gradients. After each update the trainer pushes new weights to the inference engine.

2. Task Selection: Train Only Where the Model Is Uncertain

Core insight: spend rollouts only on tasks the model is unsure about, and measure that uncertainty under exactly the same conditions as training.

GRPO learns from relative differences among multiple attempts on the same task. Tasks that are always solved or never solved consume a full rollout group but yield zero learning signal .

The team probes every candidate task with at least four rollouts using the exact training configuration (same harness, inference intensity, context window, turn budget, sandbox). Only tasks with initial pass rates between 15% and 85% are kept.

This filtering reduces zero-signal rollout groups from 48% to 10.2% .

Final training mix: ~52% long-horizon agent tasks (30% custom, 11% hard variants, 9% long-horizon coding skills, 1% MiMo-TB, 1% Tasksmith) and ~48% software-engineering tasks (18% MiMo-code, 18% custom Python-heavy, 12% multi-language covering TypeScript, Go, Python, JavaScript, Rust) (Figure 3).

Figure 3: Training data composition. Orange: long-horizon agent tasks (52%). Blue: software engineering tasks (48%).
Figure 3: Training data composition. Orange: long-horizon agent tasks (52%). Blue: software engineering tasks (48%).

3. Scorer & Reward: Verify Scorers First, Then Prevent Reward Hacking

Core insight: tasks the model never solves are often broken tasks—verify every scorer before the reward reaches the model.

Audit of never-solved tasks revealed nearly half were broken (flawed problem statements, brittle tests that misjudge correct solutions, hidden “protected file” traps, scorers that award partial credit for mere format compliance, or crash on real agent outputs).

Every new task must pass nine validation gates before entering the training pool (Figure 4):

Task (2): Reference solution passes in the training sandbox under the exact training pipeline; every scorer requirement is stated in the problem description.

Sandbox (3): Runs offline; reliably starts without hangs; no answer leakage.

Scorer (4): No-op/boilerplate attempts score 0; tests are not brittle (any correct solution passes); scorer handles arbitrarily malformed real outputs without crashing; identical outputs always receive identical scores.

Reward design: Each attempt receives a terminal score in [0,1] (1.0 for full solve; partial credit for passed verification checks or fixed failing tests). Solved attempts earn an additional length bonus up to 0.2 proportional to tokens saved relative to the longest solved attempt in the group. This shaping reduces tokens per solve to 0.84× the original count without lowering evaluation accuracy .

Figure 4: Nine validation gates a new task must pass before entering the training pool. Blue: task (2 gates). Green: sandbox (3 gates). Orange: scorer (4 gates).
Figure 4: Nine validation gates a new task must pass before entering the training pool. Blue: task (2 gates). Green: sandbox (3 gates). Orange: scorer (4 gates).

4. Harness: Built for Long-Horizon Attempts, Identical in Training and Evaluation

Core insight: the harness is part of the model—whatever harness you evaluate with, you must train with.

The harness follows Claude Code conventions: four tools (Bash, Read, Write, Edit), native tool calling, retained reasoning history, and context compression.

Training rollouts and evaluation trials are driven by the exact same harness , with automated unit tests guaranteeing code and prompt parity.

Before any RL, this harness alone lifts GLM-5.3-Flash 4.4 points above its official Claude Code score on Terminal-Bench 4.0 (Table 2).

Long-horizon affordability features:

Stateful context compression triggers at 85% context-window usage, preserving prefix cache by appending sectional summaries.

Commands write stdout to files, returning only a truncated preview with the filename.

Long-running commands execute asynchronously in the background instead of timing out.

These features cut per-trial cost by ~33% . An additional prompt specification encouraging efficient workflows (in-place edits, single-pass writes, no sleep polling) saves another 16% .

Table 2: GLM-5.3-Flash with Claude Code (official leaderboard) vs. team harness on Terminal-Bench 4.0. Standard time limit, per-trial cost and per-solve cost at public pricing.
Table 2: GLM-5.3-Flash with Claude Code (official leaderboard) vs. team harness on Terminal-Bench 4.0. Standard time limit, per-trial cost and per-solve cost at public pricing.

5. RL Objective: Learn from Stale, Low-Precision Samples Without Drift

Core insight: correct stale, low-precision samples instead of discarding them, and treat rising entropy as an early warning.

Rollouts are generated in FP8 on weights up to six versions stale; the trainer updates in BF16. Rather than discarding these trajectories, the team corrects them directly in the training objective .

Base algorithm: GRPO with 12 attempts per task, one optimizer step per batch.

Advantage per attempt combines reward and length terms: A = (R′ − mean R′) / std R′ + (b − mean b) / 0.5 (mean/std computed over the 12 attempts). R′ = 1.5 if the attempt solves the task; otherwise R′ = 0.5 × R (R ∈ [0,1] terminal reward).

b = 0.2 × (1 − tokens / max tokens among solved attempts in group)

, computed only when ≥2 attempts solve; else 0.

Truncated Importance Sampling (TIS): Each token weighted by the ratio of BF16 trainer probability to FP8 rollout probability, clipped to [0.5, 2.0]. Only 1–3% of tokens hit the clipping boundaries .

Score Centering (SC): Rollout engine returns top-32 log-probs per token; trainer subtracts the sampler’s expected score over those candidates from each token’s policy-gradient score. This eliminates residual drift toward the stale FP8 sampler at a 7.6% per-step time overhead .

Success Offset: Full solves (R=1.0) enter advantage as 1.5; unsolved attempts contribute half their partial credit (best “near miss” R=0.5 → 0.25). Partial credit shapes learning but never equals a true solve.

Loss Normalization Floor: Per-attempt loss normalized by token count, denominator floored at 2,048 tokens to prevent degenerate short rollouts from dominating gradients.

With these corrections, training uses neither KL penalty nor entropy bonus . In healthy runs policy entropy slowly declines from ~0.46 to ~0.33; an entropy rise signals instability early .

Experiments: Across-the-Board Gains, On the Cost–Performance Pareto Frontier

FireFlash is evaluated in the same harness used for training, compared against GLM-5.3-Flash official scores and other models’ public results (Figure 5).

Terminal-Bench 4.0: +10.4 points over base, surpassing Fable 5 and full-size GLM-5.3 .

DeepSWE v1.1: +5.4 points, beating Fable 5.1 .

SWE-Bench Pro Verified: +5.1 points, exceeding Kimi K3 and GPT-5.6 Sol .

Figure 5: Pass@1 on three benchmarks. Orange: FireFlash. Blue: GLM-5.3-Flash official scores. Others: public scores of respective models.
Figure 5: Pass@1 on three benchmarks. Orange: FireFlash. Blue: GLM-5.3-Flash official scores. Others: public scores of respective models.

Cost vs. Performance

On Terminal-Bench 4.0 FireFlash lies on the cost–performance Pareto frontier (Figure 1). Among 40+ model/inference-intensity settings, only four have lower per-trial cost, and none of them exceed 35.8% Pass@1. At GLM-5.3-Flash public pricing, FireFlash costs $0.72 per trial versus $22.02 for Fable 5 at max inference intensity . The next frontier point, GPT-6.1 Terra, scores 55.6% at $1.49 per trial. Every model scoring higher than FireFlash costs at least 2× more per trial; full-size GLM-5.3 at max intensity costs $8.27 per trial yet scores only 41.8%.

Figure 1: Pass@1 vs. average per-trial cost (log scale) on Terminal-Bench 4.0. Dashed line is Pareto frontier; arrow shows FireFlash improvement over GLM-5.3-Flash. FireFlash costed at GLM-5.3-Flash public price.
Figure 1: Pass@1 vs. average per-trial cost (log scale) on Terminal-Bench 4.0. Dashed line is Pareto frontier; arrow shows FireFlash improvement over GLM-5.3-Flash. FireFlash costed at GLM-5.3-Flash public price.

Conclusion

FireFlash demonstrates that targeted post-training can turn an open-weight model into a strong domain-specific agent achieving frontier performance at a fraction of the inference cost . The authors argue that joint optimization of model, training environment, harness, and inference system is a viable path to powerful, efficient agents beyond pure scaling. FireFlash is a first step; the team plans to extend this methodology to more complex, longer-horizon, repeatedly executed workflows .

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Reinforcement LearningGRPOSWE-Benchcost-efficient trainingagentic RLlong-horizon agentsTerminal-BenchFireFlash
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.