Instructions to use TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use TIGER-Lab/StopLoss-Qwen2.5-Coder-7B-Instruct with PEFT:
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") - Notebooks
- Google Colab
- Kaggle
File size: 1,671 Bytes
4527a70 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ---
license: mit
base_model: Qwen/Qwen2.5-Coder-7B-Instruct
library_name: peft
datasets:
- TIGER-Lab/StopLoss-Training-Data
language:
- en
tags:
- lora
- agents
- coding-agents
- early-stopping
---
# StopLoss-Qwen2.5-Coder-7B-Instruct
A LoRA adapter for [Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/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](https://arxiv.org/abs/2610.25525).
[🌐 Homepage](https://tiger-ai-lab.github.io/StopLoss/) | [📄 Paper](https://arxiv.org/abs/2610.25525) | [💻 Code](https://github.com/TIGER-AI-Lab/StopLoss) | [🤗 Training data](https://huggingface.co/datasets/TIGER-Lab/StopLoss-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
```bash
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.
|