Crimson AI NewsA CrimsonLingua Network service
EN ع
← Back to news
Research paper Hugging Face

WHALE: A Simple Alternating Recipe for Joint Model-Harness Optimization in AI Agents

AI By Crimson AI Hugging Face Papers 3 September 2026 · 00:00 22 views
Share: X Telegram

Researchers propose WHALE, a method that alternates between updating model weights and searching for better harness code, improving agent performance across reasoning tasks by up to 24.38 percentage points over existing baselines.

WHALE: A Simple Alternating Recipe for Joint Model-Harness Optimization in AI Agents

Key points

A new research paper from Hugging Face introduces WHALE (Weight-Harness Alternating LEarning), a simple yet effective recipe for jointly optimizing AI agents. The core insight is that an agent's performance depends on both its model parameters and the executable harness code that manages context, tools, and control flow. Optimizing either in isolation can leave the system bottlenecked by the frozen component.

WHALE alternates between two phases: updating the model under the current harness, and then searching for a better harness under the updated model. The first phase uses online rejection-sampling fine-tuning, while the second leverages a method called Meta-Harness. A key design choice is when to switch between phases; WHALE uses either fixed phase durations or an adaptive patience rule based on training signals to avoid over-optimizing against a changing counterpart.

In experiments with Qwen3.5-2B and 4B agents across three domains—search question answering, mathematical reasoning, and chess puzzles—WHALE outperformed weight-only, harness-only, and Fast-Slow Training approaches by 4.15 to 24.38 percentage points in best mean@8 accuracy. The results highlight that bottlenecks are domain-dependent: harness search alone can match peak weight-only accuracy in SearchQA with far fewer rollouts, but in mathematics, it only becomes effective after a weight update.

The authors also found that small interleaved updates outperform stagewise weight-then-harness optimization, achieving higher accuracy with fewer rollouts. An adaptive version of WHALE removes the need for hand-tuned schedule hyperparameters by using a per-phase patience rule, matching or beating the best fixed schedule. The code is available on GitHub.

MethodSearchQAMathChess Puzzles
WHALE+4.15 to +24.38 pts (vs. baselines)+4.15 to +24.38 pts (vs. baselines)+4.15 to +24.38 pts (vs. baselines)
Weight-onlyBaselineBaselineBaseline
Harness-onlyBaselineBaselineBaseline
Fast-Slow TrainingBaselineBaselineBaseline
Source
Hugging Face · Hugging Face Papers
Related news
Research paper
Hugging Face 15 Oct 2026

New Survey Maps How Multimodal AI Agents Remember and Evolve

A Hugging Face survey proposes a two-axis framework for multimodal agent memory, separating how information is formed and represen...

8
Research paper
Hugging Face 15 Oct 2026

CriticOPD Fixes On-Policy Distillation by Letting Teachers Critique Student Errors

Hugging Face researchers introduce CriticOPD, a method that restores the teacher's ability to recover from student mistakes during...

8
Research paper
Hugging Face 15 Oct 2026

ActionOPD: Distilling Agent Decisions, Not Tokens

A new Hugging Face paper proposes ActionOPD, an action-level on-policy distillation method that aligns a student agent's decisions...

9