Instructions to use Rumiii/Qwen3-8B-Detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rumiii/Qwen3-8B-Detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rumiii/Qwen3-8B-Detector") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Rumiii/Qwen3-8B-Detector") model = AutoModelForCausalLM.from_pretrained("Rumiii/Qwen3-8B-Detector", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rumiii/Qwen3-8B-Detector with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rumiii/Qwen3-8B-Detector" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Qwen3-8B-Detector", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Rumiii/Qwen3-8B-Detector
- SGLang
How to use Rumiii/Qwen3-8B-Detector with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Rumiii/Qwen3-8B-Detector" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Qwen3-8B-Detector", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Rumiii/Qwen3-8B-Detector" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Qwen3-8B-Detector", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Rumiii/Qwen3-8B-Detector with Docker Model Runner:
docker model run hf.co/Rumiii/Qwen3-8B-Detector
Qwen3-8B-Detector
Find where your AI agent went wrong. Qwen3-8B-Detector reads an agent's task, tools and step-by-step trajectory, then tells you whether the run failed, which step failed, why, and how to fix it.
What it does
Give it an agent run. It returns a structured audit:
- Verdict: failure detected or clean run
- Failure point: the exact
step_indexand tool call - Category and subtype: one of 14 failure types, plus severity
- Explanation: what went wrong and why
- Correct action and recovery steps: how the agent should have behaved
Domains: calendar scheduling, database operations, file and document processing, e-commerce, customer support, financial administration, project management, research assistance, software development, logistics.
Failure categories: incorrect tool selection, invalid tool arguments, missing required arguments, failure to follow constraints, failure to recover, hallucinated tool output, incorrect interpretation of tool results, incorrect final answer, premature completion, failure to verify completion, incorrect planning, state inconsistency, unsafe or unauthorized action, duplicate action.
Quickstart
The model runs in non-thinking mode, so pass enable_thinking=False to the chat template.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "Rumiii/Qwen3-8B-Detector"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
system = (
"You are Qwen3-8B-Detector, a polite and precise AI-agent reliability analyst fine-tuned from Qwen3-8B. "
"Given a task, the user's constraints, the tools an agent may use (with schemas and permissions), and the "
"agent's step-by-step trajectory, you decide whether the agent failed, locate the exact failing step, name the "
"failure category and subtype, explain why, and give the correct action and recovery steps. You answer in a "
"fixed, structured format and never invent tool outputs."
)
user = """Audit the following AI-agent run. Decide whether the agent failed; if so, locate the failing step and explain.
## Task (ecommerce)
Order 2 units of 'Nimbus Backpack' for delivery to Austin, but only if it is currently in stock.
## User constraints
- Do not place the order if available_units is fewer than the requested quantity.
## Initial environment entities
{"product":"Nimbus Backpack","pid":"SKU_2d7a2fz8","qty":2,"city":"Austin"}
## Available tools
search_product, check_stock, place_order
## Granted tool permissions
search_product, check_stock, place_order
## Tool schemas
{"search_product":{"query":"string"},"check_stock":{"product_id":"string"},"place_order":{"product_id":"string","quantity":"integer","shipping_address":"string"}}
## Expected outcome
The order is placed only if enough units are in stock.
## Agent trajectory
[Step 0]
Thought: Calling search_product to move the task forward.
Tool call: search_product({"query":"Nimbus Backpack"})
Tool output: {"status":"success","results":[{"product_id":"SKU_2d7a2fz8","name":"Nimbus Backpack"}]}
[Step 1]
Thought: Calling place_order to move the task forward.
Tool call: place_order({"product_id":"SKU_2d7a2fz8","quantity":2,"shipping_address":"Austin"})
Tool output: {"status":"success","order_id":"ORD_1"}
## Agent final answer
The task completed successfully."""
messages = [{"role": "system", "content": system}, {"role": "user", "content": user}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tokenizer(text, return_tensors="pt", add_special_tokens=False).to(model.device)
output = model.generate(**inputs, max_new_tokens=600, do_sample=False)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Tips
- Keep the same section layout as above: Task, User constraints, Initial environment entities, Available tools, Granted tool permissions, Tool schemas, Expected outcome, Agent trajectory, Agent final answer.
- Use greedy decoding (or a low temperature) and allow at least 500 new tokens.
- Include the full trajectory. A partial one may not contain the evidence the model needs.
- fp16 needs about 17 GB of VRAM. On smaller GPUs, load the model in 4-bit with
bitsandbytes.
Output format
Verdict: FAILURE DETECTED
Failure point: step_index 1 (tool call: summarize_paper)
Failure category: incorrect_tool_selection
Failure subtype: similar_name_confusion
Severity: high
Explanation: Agent selects a tool that does not match the task objective or current environment state, even though a correct tool was available.
Correct action: Call 'fetch_paper_metadata' (the correct tool for this step).
Recovery steps:
1. Re-issue the call using 'fetch_paper_metadata' with the same arguments.
2. Resume the remaining steps of the canonical trajectory.
Checks: tool_selection_correct=false; arguments_correct=true; constraints_respected=true; task_completed=false; failure_detected_by_agent=false; final_answer_correct=true
Final outcome: failure
A clean run returns Verdict: NO FAILURE DETECTED with a short reason.
Training data
Fine-tuned on the train split of fahadhafeezofficial/agent-failure-bench: 8,000 synthetic agent trajectories across 10 domains and 14 failure categories, each labeled with the failure point, explanation, correct action and recovery steps.
Intended use and limitations
Intended for: auditing and debugging tool-using agents, building agent evaluation pipelines, and triaging failed runs.
Limitations:
- Trained on synthetic data, so accuracy on real-world agent logs may be lower than on data like the training set.
- The subtype label is the least reliable part of the output.
- Verdicts are expert assistance, not a guarantee. Check critical decisions yourself.
- It only analyzes the trajectory you provide. It does not run tools or browse.
- Non-thinking mode only.
Benchmark results will be added.
License
Released under the Apache 2.0 license. The training dataset is released under CC BY 4.0.
Citation
@misc{qwen3technicalreport,
title = {Qwen3 Technical Report},
author = {Qwen Team},
year = {2025},
eprint = {2505.09388},
archivePrefix = {arXiv}
}
- Downloads last month
- 87
