Run this model with HF Jobs

Run ianlyoo/Culprit-9B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/ianlyoo/Culprit-9B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/ianlyoo/Culprit-9B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/ianlyoo/Culprit-9B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/ianlyoo/Culprit-9B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
PEFT library
from peft import PeftModel
from transformers import AutoModelForCausalLM

base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B")
model = PeftModel.from_pretrained(base_model, "ianlyoo/Culprit-9B")

Culprit-9B: open-weight model for agent failure attribution

Which agent broke the run, and at which step?

Culprit-9B is an open-weight model for automated failure attribution in LLM agent systems: given the log of a failed single- or multi-agent run, it identifies the agent and the step responsible for the failure, plus the error type, as JSON. It is a LoRA adapter (PEFT) for Qwen3.5-9B under Apache-2.0, for developers and researchers who build, debug or evaluate agents. On held-out Who&When Pro (arXiv:2607.09996), in a 400-run subset balanced by length, it finds the decisive step in 81.2% of runs (95% CI 77.5–85.0), against 75.2% for Gemini 4 Neon, 57.0% for GPT-6.2 Sol and 56.0% for Claude Opus 5.5; on logs over 12k tokens it scores 74.0%, against 64.0% for Gemini 4 Neon and 36.0% for the other two. On 50 real τ²-bench failures labelled by replay, every model, Culprit included, scores 12–18%, within noise of each other.

Code, evaluation and every prediction file: github.com/ianlyoo/culprit. File paths on this card are relative to that repository.

Decisive-step accuracy by trace length: Culprit-9B against Qwen3.5-9B, Claude Opus 5.5, GPT-6.2 Sol and Gemini 4 Neon

{"agent": "coder", "step": 7, "error_type": "R.3"}

R.3 is the Who&When Pro code for a numerical error; culprit/render.py lists all 17 codes.

Quick start

Command line (vLLM by default, --backend hf for transformers):

git clone https://github.com/ianlyoo/culprit && cd culprit
pip install -r requirements.txt
hf download ianlyoo/Culprit-9B --local-dir culprit-9b
python attribute.py --traces runs.jsonl --out answers.jsonl --adapter culprit-9b

Each line of runs.jsonl is one failed run: {"id": ..., "task": "...", "steps": [{"agent": "...", "text": "..."}, ...], "final": "..."}. Steps are numbered from 1 in the order given.

Python with transformers and PEFT, run inside the cloned repository so that culprit.render builds the prompt Culprit was trained on. This is what attribute.py --backend hf does; to_prompt takes the numbered record that attribute.py builds from a runs.jsonl line (task_text, and steps with i from 1):

import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
from culprit.render import parse_answer, to_prompt

tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B")
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B", dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, "ianlyoo/Culprit-9B")

run = {"task_text": "Compute 17 * 23 and report the result.",
       "steps": [{"i": 1, "agent": "planner", "text": "Ask the calculator to multiply 17 by 23."},
                 {"i": 2, "agent": "calculator", "text": "17 * 23 = 381"},
                 {"i": 3, "agent": "reporter", "text": "The answer is 381."}],
       "final": "381"}
text = tok.apply_chat_template(to_prompt(run), tokenize=False, add_generation_prompt=True, enable_thinking=False)
ids = tok(text, return_tensors="pt", add_special_tokens=False)["input_ids"].to(model.device)
out = model.generate(ids, max_new_tokens=200, do_sample=False)
print(parse_answer(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)))
# prints a dict: {'agent': <agent name>, 'step': <step number>, 'error_type': <code>}

Culprit answers without a thinking phase, in a few dozen output tokens. Prompts of up to 32k tokens are supported; very long step texts are shortened in the middle. merge_to_bf16.py folds the adapter into the base weights.

Results

All models get the same prompt. The scores:

  • Step accuracy: the predicted step is the decisive one.
  • Agent accuracy: the predicted agent is right (counted on multi-agent logs only).
  • Error-type macro-F1: F1 over the error-type codes, averaged across codes.
  • Joint: agent, step and error type are all right.

Brackets are 95% bootstrap intervals over traces (2,000 resamples, seed 0). Lengths count the rendered prompt in Qwen3.5 tokens. "Always the last step" and "Always the first step" are fixed answers that show how much of a score a position guess alone gets: on short Who&When Pro logs the decisive step is often the last one.

Who&When Pro, 400-trace subset

Model n Step acc. Agent acc. Error-type macro-F1 Joint
Culprit-9B (ours) 400 81.2 [77.5, 85.0] 79.3 [73.5, 84.5] 27.9 [22.5, 34.9] 35.0 [30.5, 39.5]
Qwen3.5-9B 400 57.2 [52.5, 62.0] 66.0 [59.6, 72.3] 13.1 [10.5, 17.0] 18.8 [15.0, 22.5]
Claude Opus 5.5 400 56.0 [51.2, 60.8] 59.1 [52.2, 65.5] 22.7 [19.0, 28.5] 27.5 [23.2, 32.0]
GPT-6.2 Sol 400 57.0 [52.2, 61.8] 63.5 [56.9, 69.9] 19.8 [16.5, 25.1] 24.5 [20.5, 28.7]
Gemini 4 Neon 400 75.2 [71.0, 79.5] 75.9 [69.9, 81.7] 35.5 [30.8, 43.4] 41.0 [36.2, 45.8]
Always the last step 400 30.2 [25.8, 34.8] 49.3 [42.5, 56.1] 2.7 [2.3, 3.4] 2.5 [1.0, 4.0]
Always the first step 400 13.5 [10.2, 17.0] 40.4 [33.7, 47.2] 2.7 [2.3, 3.4] 4.8 [2.8, 6.8]

Step accuracy by trace length (tokens):

Model <3k 3k-6k 6k-12k >12k
Culprit-9B (ours) 97.0 [93.1, 100.0] (n=101) 78.8 [70.7, 86.9] (n=99) 75.0 [66.0, 83.0] (n=100) 74.0 [66.0, 82.0] (n=100)
Qwen3.5-9B 84.2 [76.2, 91.1] (n=101) 54.5 [44.4, 63.6] (n=99) 54.0 [44.0, 63.0] (n=100) 36.0 [26.0, 46.0] (n=100)
Claude Opus 5.5 85.1 [78.2, 92.1] (n=101) 56.6 [46.5, 66.7] (n=99) 46.0 [36.0, 56.0] (n=100) 36.0 [27.0, 46.0] (n=100)
GPT-6.2 Sol 87.1 [80.2, 93.1] (n=101) 54.5 [44.4, 64.6] (n=99) 50.0 [40.0, 60.0] (n=100) 36.0 [27.0, 46.0] (n=100)
Gemini 4 Neon 92.1 [86.1, 97.0] (n=101) 75.8 [67.7, 83.8] (n=99) 69.0 [60.0, 78.0] (n=100) 64.0 [54.0, 74.0] (n=100)
Always the last step 64.4 [54.5, 73.3] (n=101) 29.3 [20.2, 38.4] (n=99) 22.0 [14.0, 30.0] (n=100) 5.0 [1.0, 10.0] (n=100)
Always the first step 3.0 [0.0, 6.9] (n=101) 17.2 [10.1, 24.2] (n=99) 14.0 [8.0, 21.0] (n=100) 20.0 [13.0, 28.0] (n=100)

Paired differences on the same traces (Culprit minus each model, percentage points, 95% paired bootstrap):

Culprit minus Step, all 400 Joint, all 400 Step, >12k (n=100)
Qwen3.5-9B +24.0 [+19.2, +28.5] +16.2 [+11.8, +20.8] +38.0 [+29.0, +48.0]
Claude Opus 5.5 +25.2 [+20.0, +30.5] +7.5 [+2.8, +12.2] +38.0 [+26.0, +49.0]
GPT-6.2 Sol +24.2 [+19.0, +29.5] +10.5 [+5.8, +15.2] +38.0 [+26.0, +50.0]
Gemini 4 Neon +6.0 [+1.0, +11.2] -6.0 [-11.0, -0.8] +10.0 [-1.0, +21.0]
Always the last step +51.0 [+45.2, +56.5] +32.5 [+28.0, +37.5] +69.0 [+60.0, +78.0]
Always the first step +67.8 [+62.0, +73.5] +30.2 [+25.2, +35.5] +54.0 [+42.0, +66.0]

Who&When Pro, all text traces

Model n Step acc. Agent acc. Error-type macro-F1 Joint
Culprit-9B (ours) 6253 88.1 [87.3, 88.9] 88.4 [87.2, 89.6] 25.8 [24.3, 27.2] 30.5 [29.4, 31.6]
Qwen3.5-9B 6253 72.6 [71.5, 73.7] 76.2 [74.5, 77.8] 17.1 [15.8, 18.3] 21.8 [20.8, 22.9]
Always the last step 6253 50.1 [48.9, 51.4] 73.6 [71.9, 75.3] 2.2 [2.1, 2.3] 4.2 [3.7, 4.7]
Always the first step 6253 7.5 [6.9, 8.1] 40.3 [38.5, 42.1] 2.2 [2.1, 2.3] 3.0 [2.6, 3.5]

Step accuracy by trace length (tokens):

Model <3k 3k-6k 6k-12k >12k
Culprit-9B (ours) 93.0 [92.3, 93.8] (n=4159) 79.1 [76.7, 81.4] (n=1165) 78.6 [75.7, 81.6] (n=765) 70.7 [64.0, 77.4] (n=164)
Qwen3.5-9B 83.5 [82.4, 84.6] (n=4159) 54.0 [51.2, 56.8] (n=1165) 49.8 [46.1, 53.3] (n=765) 33.5 [26.2, 40.2] (n=164)
Always the last step 61.5 [60.0, 63.0] (n=4159) 32.2 [29.5, 34.8] (n=1165) 25.6 [22.6, 28.8] (n=765) 4.9 [1.8, 8.5] (n=164)
Always the first step 3.6 [3.0, 4.1] (n=4159) 16.4 [14.3, 18.5] (n=1165) 13.5 [11.0, 15.9] (n=765) 17.7 [12.2, 23.8] (n=164)

τ²-bench real failures

Model n Step acc. Agent acc. Error-type macro-F1 Joint
Culprit-9B (ours) 50 18.0 [8.0, 28.0] 64.0 [50.0, 76.0] 6.1 [2.6, 11.4] 10.0 [2.0, 20.0]
Qwen3.5-9B 50 18.0 [8.0, 30.0] 80.0 [68.0, 90.0] 6.5 [1.1, 12.9] 4.0 [0.0, 10.0]
Claude Opus 5.5 50 18.0 [8.0, 30.0] 52.0 [38.0, 66.0] 13.1 [5.9, 21.1] 6.0 [0.0, 14.0]
GPT-6.2 Sol 50 14.0 [6.0, 26.0] 64.0 [50.0, 78.0] 8.4 [3.3, 15.1] 4.0 [0.0, 10.0]
Gemini 4 Neon 50 12.0 [4.0, 22.0] 62.0 [48.0, 74.0] 5.9 [0.0, 11.7] 2.0 [0.0, 6.0]
Always the last step 50 0.0 [0.0, 0.0] 20.0 [10.0, 32.0] 1.5 [0.4, 3.1] 0.0 [0.0, 0.0]
Always the first step 50 0.0 [0.0, 0.0] 80.0 [68.0, 90.0] 1.5 [0.4, 3.1] 0.0 [0.0, 0.0]

Step accuracy by trace length (tokens):

Model 3k-6k 6k-12k >12k
Culprit-9B (ours) 9.1 [0.0, 27.3] (n=11) 21.9 [9.4, 37.5] (n=32) 14.3 [0.0, 42.9] (n=7)
Qwen3.5-9B 27.3 [0.0, 54.5] (n=11) 15.6 [3.1, 28.1] (n=32) 14.3 [0.0, 42.9] (n=7)
Claude Opus 5.5 9.1 [0.0, 27.3] (n=11) 25.0 [9.4, 40.6] (n=32) 0.0 [0.0, 0.0] (n=7)
GPT-6.2 Sol 0.0 [0.0, 0.0] (n=11) 21.9 [9.4, 37.5] (n=32) 0.0 [0.0, 0.0] (n=7)
Gemini 4 Neon 0.0 [0.0, 0.0] (n=11) 18.8 [6.2, 34.4] (n=32) 0.0 [0.0, 0.0] (n=7)
Always the last step 0.0 [0.0, 0.0] (n=11) 0.0 [0.0, 0.0] (n=32) 0.0 [0.0, 0.0] (n=7)
Always the first step 0.0 [0.0, 0.0] (n=11) 0.0 [0.0, 0.0] (n=32) 0.0 [0.0, 0.0] (n=7)

On the real failures, agent accuracy says little: the support agent made 40 of the 50 decisive mistakes, so naming the support agent every time already scores 80%.

What the results mean

  • Long logs are where a small tuned model helps most. The base model's step accuracy falls from 83.5% on logs under 3k tokens to 33.5% over 12k. Culprit's falls from 93.0% to 70.7%, measured on all 6,253 Who&When Pro traces.
  • Culprit never saw Who&When Pro. Its training errors were injected into other agent systems and benchmarks. It still learned the shape of the task: one decisive step, named exactly.
  • Injected errors are an easier test than real failures. Who&When Pro, like Culprit's training data, plants one error into a run that would otherwise succeed. In the τ²-bench conversations, agents failed by themselves, and the decisive turn is often a quiet policy slip that only replay reveals. No model we tested, small or frontier, finds those turns reliably.

Training

Data. The training traces come from systems we ran ourselves:

  1. Five small agent systems: a single code agent, a two-agent math chat, a three-agent debate, an orchestrator–coder–checker team, and an author–critic–rewriter chain. They solve tasks from GSM8K, AQuA-RAT, CommonsenseQA, FinQA, MBPP and generated table questions.
  2. Customer-service conversations from the τ²-bench train split (airline, retail, telecom).

The agents are Qwen/Qwen3.5-9B and Qwen/Qwen3.6-35B-A3B-FP8. A trace is made as follows:

  1. Start from a run that succeeded.
  2. Rewrite one step so that it holds one mistake of a chosen type.
  3. Let the system continue from that step.
  4. Keep the trace only if the run then fails.

The rewritten step is the label. This gave 913 training traces (745 from the five systems, 168 from τ²-bench) and 60 dev traces.

Splits and leakage. Train and dev are split by task. The receipt in receipts/dedupe_receipt.json compares every training trace with both test sets three ways: SHA-256 of the task id, of the normalised task text, and of the normalised trace. All overlaps are 0. receipts/hashes.csv lists every hash.

Recipe. LoRA rank 32, alpha 64, dropout 0.05, on every linear projection of the language model: attention (q_proj, k_proj, v_proj, o_proj), linear attention (in_proj_qkv, in_proj_z, in_proj_a, in_proj_b, out_proj) and MLP (gate_proj, up_proj, down_proj). 1,087 training examples (913 traces; those whose decisive step is 5 or later appear twice, because most generated failures happen early; 2 over 32,768 tokens skipped). 3 epochs, 204 optimizer steps of 16 examples, AdamW at learning rate 0.0001 with 3% warmup and cosine decay, bf16, loss on the answer tokens only, seed 0. One 96 GB GPU, 63 minutes. Checkpoints were saved every 40 steps and at each epoch; the one used (epoch 2) had the best step accuracy on our own dev split (95.0%, base model 80.0%). Who&When Pro played no part in choosing it.

Evaluation sets

  • Who&When Pro, text split (Leoxx/whowhen_pro, CC BY 4.0, revision 0bd196c): 6,253 failed runs from 8 agent frameworks on 16 benchmarks, with injected errors. All of it is held out. The frontier models answered a 400-trace subset: 100 traces drawn from each length bucket, stratified by framework, with a fixed seed (eval/subsets/wwp_frontier400.txt, tools/make_subset.py). The draw counted lengths with a system prompt 3 tokens longer than the released one, so one trace of 2,999 tokens is scored as under 3k, and the length tables show 101 and 99 traces in the first two buckets.
  • τ²-bench real failures (data/eval/tau2_real_failures.jsonl, CC BY 4.0, new): 50 conversations where an open-weight agent failed by itself, with nothing injected. Each is labelled by counterfactual replay: the label is the earliest turn whose corrected version makes the conversation succeed in at least 75% of replays, while letting the same speaker write that turn again, with no fix, does not. See data/eval/DATASHEET.md.

Settings. Qwen models run in vLLM 0.34 with greedy decoding. Culprit and the base model answer without thinking. The base model was not run with thinking on. Each frontier model received the same prompt text for every trace and answered once with the same JSON, with no retries:

Model Setting Who&When Pro subset Real failures
Claude Opus 5.5 (claude-opus-5-5) extended thinking, high 2026-12-02 2026-12-03
GPT-6.2 Sol (gpt-6.2-sol) reasoning effort xhigh 2026-12-02 2026-12-03
Gemini 4 Neon (gemini-4-neon) thinking, high 2026-12-02 2026-12-03

Reproduce every table. python3 tools/build_wwp.py renders Who&When Pro at the pinned revision. bash tools/eval_tables.sh then scores every saved prediction file in eval/preds/ (one command per table) and redraws the chart. vm/run_train_eval.sh regenerates the predictions of the Qwen models.

Limits

  • Small real-failure set. 50 conversations from two τ²-bench domains (retail 41, airline 9), so its intervals are wide.
  • Model-assigned error types on the real failures. The decisive step is established by replay, but its error type was assigned by Qwen/Qwen3.6-35B-A3B-FP8 and not checked by a person.
  • Error types are the weak part. On the 400-trace subset Culprit's error-type F1 is 27.9%: above the base model (13.1%), Claude Opus 5.5 (22.7%) and GPT-6.2 Sol (19.8%), but below Gemini 4 Neon (35.5%).
  • Narrow training sources, English only. The training logs come from five generated systems and τ²-bench. Logs from other frameworks, from GUI agents or in other languages may behave differently.
  • A decisive step is one definition of blame. Culprit names the earliest step whose fix would have saved the run. A run with several independent faults has no single answer.

FAQ

Which agent caused my multi-agent run to fail, and at which step? Write the run as one line of runs.jsonl (the task, then each step with its agent name and text) and run attribute.py. Culprit returns the agent, the step number and an error-type code for the decisive step: the earliest step whose fix would have let the run succeed.

What is automated failure attribution for LLM agents? It is identifying the agent and the step responsible for the failure of an LLM agent run, from its log. Who&When (Zhang et al., ICML 2025) introduced the task for multi-agent systems; Who&When Pro and TraceElephant are later benchmarks for it.

How accurate is Culprit-9B compared with GPT, Claude and Gemini used as judges? On the Who&When Pro subset (n=400), Culprit finds the decisive step in 81.2% of failed runs, against 75.2% for Gemini 4 Neon, 57.0% for GPT-6.2 Sol and 56.0% for Claude Opus 5.5, each given the same prompt. Gemini 4 Neon is better at naming the error type (macro-F1 35.5 against 27.9).

Does it work on real agent failures, or only on injected errors? Real failures are much harder, for every model. On 50 τ²-bench conversations where agents failed on their own, labelled by replay, every model scores 12–18% step accuracy and no difference between models is statistically clear.

What log format does it take? Does it work with LangGraph, AutoGen or CrewAI traces? Culprit reads a plain ordered list of steps, each with an agent name and its text, plus the task and, optionally, the final output. A trace from any framework works once written in that form; exports from specific frameworks or tracing tools have not been tested. Training logs came from five small agent systems and τ²-bench; Who&When Pro, used for evaluation, spans 8 agent frameworks.

Was it trained on Who&When or Who&When Pro? No. All of Who&When Pro was held out, and the checkpoint was chosen on a separate 60-trace dev split. receipts/dedupe_receipt.json in the GitHub repository shows zero overlap with both test sets.

Can I run it locally, and on what GPU? Yes, on anything that serves Qwen3.5-9B, with vLLM (the default in attribute.py) or transformers with PEFT. The adapter file is 346 MB, and answers take a few dozen tokens with no thinking phase.

How is it different from AgenTracer, an LLM judge, or tracing tools like LangSmith and Langfuse? AgenTracer also trains a failure tracer (8B), but its weights are not released. A frontier LLM prompted as a judge is what the results table compares against. Tracing tools record and display runs; Culprit reads a recorded run and names the decisive step.

Can I use it commercially? The adapter and code are Apache-2.0, like the Qwen3.5-9B base model. The real-failure set is CC BY 4.0. Third-party sources and their licences are listed in NOTICE and data/SOURCES.md.

Citation

@misc{culprit2026,
  title        = {Culprit-9B: Open-Weight Failure Attribution for LLM Multi-Agent Systems},
  author       = {{Culprit authors}},
  year         = {2026},
  howpublished = {\url{https://github.com/ianlyoo/culprit}},
  note         = {Model: \url{https://huggingface.co/ianlyoo/Culprit-9B}}
}

Licence

The adapter and code are released under Apache-2.0. The real-failure set is released under CC BY 4.0. Third-party sources and their licences are listed in NOTICE and data/SOURCES.md.

Related work

  • Who&When Pro (arXiv:2607.09996), the benchmark used here for evaluation, and its error taxonomy.
  • Who&When (Zhang et al., ICML 2025, arXiv:2505.00212), which introduced automated failure attribution for multi-agent systems.
  • Causal Agent Replay (Shah, arXiv:2606.08275), the fix-versus-resample replay that labels the real-failure set.
  • AgenTracer (ICLR 2026), which trains an 8B failure tracer with counterfactual replay; its weights are not released.
  • TraceElephant (ACL 2026, github.com/TraceElephant/TraceElephant), a benchmark for failure attribution in LLM-based multi-agent systems.
  • τ²-bench (Sierra Research, github.com/sierra-research/tau2-bench), whose tasks and evaluator produce the real failures.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ianlyoo/Culprit-9B

Finetuned
Qwen/Qwen3.5-9B
Adapter
(1,202)
this model

Datasets used to train ianlyoo/Culprit-9B

Papers for ianlyoo/Culprit-9B

Evaluation results