PEFT
Safetensors
English
lora
agents
coding-agents
early-stopping
How to use from the
Use from the
PEFT library
from peft import PeftModel
from transformers import AutoModelForCausalLM

base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct")
model = PeftModel.from_pretrained(base_model, "TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct")

StopLoss-Qwen2.5-Coder-7B-Instruct

A LoRA adapter for Qwen/Qwen2.5-Coder-7B-Instruct that predicts whether a coding agent's run will fail. It is the Qwen2.5-Coder-7B-Instruct StopLoss monitor from StopLoss: Teaching Agents to Predict Failure and Stop Early.

🌐 Homepage | 📄 Paper | 💻 Code | 🤗 Training data

What it does

At tool steps 5, 8, 11, ..., the monitor reads the step count and the three most recent action–observation pairs of a run. Its failure score is the probability of ABORT among the labels CONTINUE, DELIVER and ABORT, read from the next-token logits in one forward pass. A run is stopped once the score reaches a threshold calibrated on successful runs.

Usage

git clone https://github.com/TIGER-AI-Lab/StopLoss.git && cd StopLoss
pip install -e ".[model]"
python scripts/build_windows.py --runs my_runs.jsonl --out windows.jsonl --ks checkpoints
python scripts/score_windows.py --base Qwen/Qwen2.5-Coder-7B-Instruct \
    --adapter TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct \
    --windows windows.jsonl --out scores.jsonl

This adapter is seed 0 of its backbone; the results in the paper use an ensemble of four seeds.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct

Base model

Qwen/Qwen2.5-7B
Adapter
(823)
this model

Dataset used to train TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct

Collection including TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct

Paper for TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct