---
id: harness-adapters/LFM2.5-24B-A2B
title: LFM2.5-24B-A2B harness adapters
type: recipe
project: harness-adapters
model_id: LiquidAI/LFM2.5-24B-A2B
trainers:
- AsyncGRPOTrainer
platforms:
- local
- hf_jobs
gpus:
- H200
verified:
  local: false
  hf_jobs: false
trl_source:
- TRL main
tags:
- lora
- agentic-rl
- harbor
- safeagents
- multi-harness
date_added: '2026-11-13'
url: https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/index.html
markdown_url: https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/index.md
json_url: https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/recipe.json
yaml_url: https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/recipe.yaml
hub_tree: https://huggingface.co/spaces/trl-lib/trl-recipes/tree/main/recipes/harness-adapters/LFM2.5-24B-A2B
released_collection: https://huggingface.co/collections/harness-hub/lfm25-24b-harness-adapters-6ae46b6cb6922b3fd7916d2a
blog: https://huggingface.co/spaces/harness-hub/harness-adapters
---

# LiquidAI/LFM2.5-24B-A2B — Harness adapters

One LoRA adapter per agent harness (pi, hermes, opencode), trained with async GRPO inside the unmodified harness on verifiable Harbor tasks, with safeagents checking every tool call.

## Summary & Links

- **Recipe ID:** `harness-adapters/LFM2.5-24B-A2B`
- **Model:** [LiquidAI/LFM2.5-24B-A2B](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B)
- **Project:** [Harness adapters](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/index.md)
- **Trainers:** `AsyncGRPOTrainer`
- **Harnesses:** `pi`, `hermes`, `opencode`
- **GPUs:** H200
- **Platforms:** Local machine, HF Jobs
- **Released models collection:** https://huggingface.co/collections/harness-hub/lfm25-24b-harness-adapters-6ae46b6cb6922b3fd7916d2a
- **Blog post:** https://huggingface.co/spaces/harness-hub/harness-adapters
- **Interactive command builder:** https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/index.html
- **Structured JSON:** https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/recipe.json
- **Recipe YAML:** https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/recipe.yaml
- **Space files:** https://huggingface.co/spaces/trl-lib/trl-recipes/tree/main/recipes/harness-adapters/LFM2.5-24B-A2B

## Quickstart Commands

### Train on HF Jobs (not run as written yet · h200x4)

```bash
hf download trl-lib/trl-recipes --repo-type space --include "recipes/harness-adapters/*" --local-dir trl-recipes
cd trl-recipes/recipes/harness-adapters/LFM2.5-24B-A2B
BUCKET="<your user>/<bucket>" bash train_hf_jobs.sh
```

### Train on Local machine (not run as written yet · 4 GPUs, H200 class (untested))

```bash
hf download trl-lib/trl-recipes --repo-type space --include "recipes/harness-adapters/*" --local-dir trl-recipes
cd trl-recipes/recipes/harness-adapters/LFM2.5-24B-A2B
bash train_local.sh
```

### Evaluate on HF Jobs (not run as written yet · h200x4)

```bash
hf download trl-lib/trl-recipes --repo-type space --include "recipes/harness-adapters/*" --local-dir trl-recipes
cd trl-recipes/recipes/harness-adapters/LFM2.5-24B-A2B
SPLIT=final-heldout \
BUCKET="<your user>/<bucket>" \
bash eval_hf_jobs.sh
```

### Evaluate on Local machine (not run as written yet · 4 GPUs, H200 class (untested))

```bash
hf download trl-lib/trl-recipes --repo-type space --include "recipes/harness-adapters/*" --local-dir trl-recipes
cd trl-recipes/recipes/harness-adapters/LFM2.5-24B-A2B
SPLIT=final-heldout bash eval_local.sh
```

## Guide

LoRA adapters for pi, hermes and opencode on [`LiquidAI/LFM2.5-24B-A2B`](https://huggingface.co/LiquidAI/LFM2.5-24B-A2B),
trained for 200 steps on 300 SmolDataEnvs tasks (100 medium, 200 hard) and 230 traj2envs tasks. Setup and shared
settings: [../README.md](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/README.md). Full hyperparameters: [recipe.yaml](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/recipe.yaml).

| | HF Jobs | Local (untested) |
|---|---|---|
| Train | `bash train_hf_jobs.sh` (h200x4, ~36h) | `bash train_local.sh` (4 GPUs) |
| Eval | `bash eval_hf_jobs.sh` (h200) | `bash eval_local.sh` (1 GPU) |

Model-specific flags:
- `--tool-call-parser lfm2 --reasoning-parser qwen3`
- vLLM on GPU 0 and one trainer per harness on GPUs 1, 2 and 3 (`--train-device 1,2,3`)

Released checkpoints (job `6aedb47a0e0338d1bb8107e8`):

| Harness | Step | Repo |
|---|--:|---|
| pi | 170 | `harness-hub/LFM2.5-24B-A2B-pi-v2` |
| hermes | 50 | `harness-hub/LFM2.5-24B-A2B-hermes-v2` |
| opencode | 160 | `harness-hub/LFM2.5-24B-A2B-opencode` |

## Hyperparameters

| Parameter | Value |
|---|---|
| `lora_r` | `32` |
| `lora_target_modules` | `all-linear` |
| `learning_rate` | `1e-5` |
| `num_generations` | `8` |
| `gradient_accumulation_steps` | `4` |
| `max_staleness` | `4` |
| `temperature` | `0.8` |
| `max_completion_length` | `16,384` |
| `max_output_tokens` | `32,768` |
| `max_model_len` | `131,072` |
| `agent_step_limit` | `17` |
| `agent_timeout_s` | `600` |
| `max_inflight` | `48` |
| `tool_efficiency_weight` | `0.1` |
| `max_steps` | `200` |
| `save_steps` | `10` |

### Serving (vLLM)

| Setting | Value |
|---|---|
| `tool_call_parser` | `lfm2` |
| `reasoning_parser` | `qwen3` |

### Hardware

- **HF Jobs:** h200x4 (untested)
- **Local machine:** 4 GPUs, H200 class (untested) (untested)

## Datasets

### Training

- [`FineEnvs/SmolDataEnvs-harbor-train`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-train)
- [`harness-hub/traj2envs-rl@191a751bda511eada76f6a9a76513d143321a64a`](https://huggingface.co/datasets/harness-hub/traj2envs-rl)

### Evaluation

| Benchmark | Details |
|---|---|
| `final-heldout` | FineEnvs/SmolDataEnvs-harbor-train, 150 easy/medium tasks from index 1000 |
| `traj2envs-heldout` | harness-hub/traj2envs-rl, the 40 tasks from index 230 |

## TRL Version

Runs on `huggingface/trl` main at [`9f8725f7`](https://github.com/huggingface/trl/commit/9f8725f7ac8e840f1304c10c4521fc3c38de8ca5) (PR [#7966](https://github.com/huggingface/trl/pull/7966)).

```bash
pip install "trl @ git+https://github.com/huggingface/trl.git@9f8725f7ac8e840f1304c10c4521fc3c38de8ca5"
```

## Files

- [`train_local.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/train_local.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM2.5-24B-A2B/train_local.sh))
- [`train_hf_jobs.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/train_hf_jobs.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM2.5-24B-A2B/train_hf_jobs.sh))
- [`eval_local.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/eval_local.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM2.5-24B-A2B/eval_local.sh))
- [`eval_hf_jobs.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/eval_hf_jobs.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM2.5-24B-A2B/eval_hf_jobs.sh))
- [`recipe.yaml`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM2.5-24B-A2B/recipe.yaml) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM2.5-24B-A2B/recipe.yaml))

### Shared by project

- [`scripts/async_grpo_harbor.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/async_grpo_harbor.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/async_grpo_harbor.py))
- [`scripts/atif_harbor.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/atif_harbor.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/atif_harbor.py))
- [`scripts/atif_smoldataenvs.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/atif_smoldataenvs.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/atif_smoldataenvs.py))
- [`scripts/atif_traj2envs.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/atif_traj2envs.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/atif_traj2envs.py))
- [`scripts/deepseek_harness.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/deepseek_harness.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/deepseek_harness.py))
- [`scripts/eval_sweep.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/eval_sweep.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/eval_sweep.py))
- [`scripts/evaluate_harbor.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/evaluate_harbor.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/evaluate_harbor.py))
- [`scripts/launcher_eval.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/launcher_eval.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/launcher_eval.py))
- [`scripts/launcher_train.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/launcher_train.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/launcher_train.py))
- [`scripts/release_adapters.py`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/release_adapters.py) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/release_adapters.py))
- [`scripts/slurm_setup.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/scripts/slurm_setup.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/scripts/slurm_setup.sh))
