---
id: harness-adapters/LFM3-1.7B
title: LFM3-1.7B harness adapters
type: recipe
project: harness-adapters
model_id: LiquidAI/LFM3-1.7B
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/LFM3-1.7B/index.html
markdown_url: https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/index.md
json_url: https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/recipe.json
yaml_url: https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/recipe.yaml
hub_tree: https://huggingface.co/spaces/trl-lib/trl-recipes/tree/main/recipes/harness-adapters/LFM3-1.7B
released_collection: https://huggingface.co/collections/harness-hub/lfm3-17b-harness-adapters-6af17c12ba04ccf2dcab301f
blog: https://huggingface.co/spaces/harness-hub/harness-adapters
---

# LiquidAI/LFM3-1.7B — 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/LFM3-1.7B`
- **Model:** [LiquidAI/LFM3-1.7B](https://huggingface.co/LiquidAI/LFM3-1.7B)
- **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/lfm3-17b-harness-adapters-6af17c12ba04ccf2dcab301f
- **Blog post:** https://huggingface.co/spaces/harness-hub/harness-adapters
- **Interactive command builder:** https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/index.html
- **Structured JSON:** https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/recipe.json
- **Recipe YAML:** https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/recipe.yaml
- **Space files:** https://huggingface.co/spaces/trl-lib/trl-recipes/tree/main/recipes/harness-adapters/LFM3-1.7B

## Quickstart Commands

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

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

### Train on Local machine (not run as written yet · 2 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/LFM3-1.7B
bash train_local.sh
```

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

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

### Evaluate on Local machine (not run as written yet · 2 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/LFM3-1.7B
SPLIT=final-heldout bash eval_local.sh
```

## Guide

LoRA adapters for pi, hermes and opencode on [`LiquidAI/LFM3-1.7B`](https://huggingface.co/LiquidAI/LFM3-1.7B),
trained for 400 steps on 550 SmolDataEnvs tasks (300 medium, 250 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/LFM3-1.7B/recipe.yaml).

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

Model-specific flags:
- LFM3 is not in released vLLM yet. The launcher builds vLLM at commit `fac2ce2e`
  (`--vllm-commit`) and overlays three model files from
  [atmikshetty/vllm@5f67fbcb](https://github.com/atmikshetty/vllm/tree/5f67fbcbb2336b0e551c0df2b4c0eb51b030c553)
  (`--vllm-overlay`).
- `--trust-remote-code` for both the trainer and vLLM.
- `--tool-call-parser qwen3_coder --reasoning-parser qwen3`, `--token-budget 65536`
- The model is small, so the three trainers share GPU 1 (`--train-device 1,1,1`).

Released checkpoints (job `6aedb4820e0338d1bb8107eb`):

| Harness | Step | Repo |
|---|--:|---|
| pi | 400 | `harness-hub/LFM3-1.7B-pi` |
| hermes | 400 | `harness-hub/LFM3-1.7B-hermes` |
| opencode | 400 | `harness-hub/LFM3-1.7B-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` |
| `token_budget` | `65,536` |
| `agent_step_limit` | `17` |
| `agent_timeout_s` | `600` |
| `max_inflight` | `48` |
| `tool_efficiency_weight` | `0.1` |
| `max_steps` | `400` |
| `save_steps` | `10` |

### Serving (vLLM)

| Setting | Value |
|---|---|
| `tool_call_parser` | `qwen3_coder` |
| `reasoning_parser` | `qwen3` |
| `trust_remote_code` | `true` |
| `commit` | `fac2ce2eb3633c44a104a66dbb30d0e6c7f4493e` |
| `overlays_from` | `https://github.com/atmikshetty/vllm/tree/5f67fbcbb2336b0e551c0df2b4c0eb51b030c553` |

### Hardware

- **HF Jobs:** h200x2 (untested)
- **Local machine:** 2 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/LFM3-1.7B/train_local.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM3-1.7B/train_local.sh))
- [`train_hf_jobs.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/train_hf_jobs.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM3-1.7B/train_hf_jobs.sh))
- [`eval_local.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/eval_local.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM3-1.7B/eval_local.sh))
- [`eval_hf_jobs.sh`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/eval_hf_jobs.sh) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM3-1.7B/eval_hf_jobs.sh))
- [`recipe.yaml`](https://trl-lib-trl-recipes.static.hf.space/recipes/harness-adapters/LFM3-1.7B/recipe.yaml) ([Hub raw](https://huggingface.co/spaces/trl-lib/trl-recipes/raw/main/recipes/harness-adapters/LFM3-1.7B/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))
