Instructions to use code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt") model = AutoModelForCausalLM.from_pretrained("code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt
- SGLang
How to use code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt 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 "code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt" \ --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": "code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt", "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 "code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt" \ --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": "code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt with Docker Model Runner:
docker model run hf.co/code-critic-model/Qwen3-8B-Critic-SFT-Detailed-Prompt
Qwen3-8B-Critic-SFT-Detailed-Prompt
An 8B critic from Steer, Don't Solve: Training Small Critic Models for Large Code Agents, trained on teacher critiques collected with the detailed prompt instead of the high-level one. It is the comparison arm of the prompt ablation (Table 4). The critic trained on high-level critiques is Qwen3-8B-Critic-SFT.
The two prompts differ in what the teacher is allowed to say. The high-level prompt asks for error detection plus short guidance and forbids full solutions. The detailed prompt lets the teacher propose concrete code-level fixes, so its critiques are longer and often contain code. The paper shows that agents copy this code (Table 5), and that a small critic trained on detailed critiques ends up weaker than one trained on high-level critiques.
All released models and datasets are listed on the organization page. Code and configs are in the critic-training repository.
Where it appears in the paper
| Paper location | Row label |
|---|---|
| Table 4, prompt ablation | + SFT (Detailed-Prompt) |
Original run name: qwen3-8b-full-sft-prm-r2egym-swebench-k5-opus-distill-32k-lr5e6-multiturn. In the repository the detailed prompt is the prm_issue_res config family and the high-level prompt is prm_issue_res_instructions.
Training data
code-critic-model/critic-sft-cwm-only-detailed-prompt, 3,135 examples.
- Tasks: 500 R2E-Gym instances from matplotlib, moto, and sympy, disjoint from SWE-bench Verified.
- Agent that produced the trajectories: CWM-32B, 500 trajectories.
- Teacher: Claude Opus 4.6, queried every 5 agent steps with the detailed prompt.
The same 500 tasks and agent as critic-sft-cwm-only; only the teacher prompt differs. Fewer examples survive the 32K token limit because detailed critiques are longer.
Training setup
Identical to Qwen3-8B-Critic-SFT apart from the data. Full-parameter SFT with LLaMA-Factory, config finetuning/qwen3_8b_critic_full_sft_l40s_train_multiturn_resumable.yaml.
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen3-8B |
| Chat template | qwen3_nothink |
| Sequence length | 32,768 tokens |
| Loss | final critique turn only (mask_history: true) |
| Hardware | 8 x L40S, effective batch 8 |
| Optimizer | AdamW, lr 5e-6, cosine, warmup ratio 0.1 |
| Epochs | 3 |
| Precision | bf16 |
Results
Resolve rate on SWE-bench Verified, from Table 4 of the paper. Both critics were run with the same high-level, step-aware inference prompt; only the training critiques differ.
| Coding agent | No critic | + this critic (detailed training critiques) | + Qwen3-8B-Critic-SFT (high-level training critiques) |
|---|---|---|---|
| Qwen3-Next-80B-A3B | 20.0 | 24.6 | 25.2 |
| Qwen3-32B | 8.8 | 12.6 | 13.8 |
Note that the high-level critic was trained on the larger CWM plus Qwen3-Next corpus, so this comparison also reflects the corpus difference.
How to use
Same serving and launch procedure as Qwen3-8B-Critic-SFT: serve with vLLM in bf16 and pass the served name to scripts/run_critic_max150.sh with --prm. The served name must have an entry in mini-swe-agent/configs/litellm_model_registry.json; add one for this model if you use a new name.
Citation
@misc{gandhi2026steerdontsolvetraining,
title={Steer, Don't Solve: Training Small Critic Models for Large Code Agents},
author={Shubham Gandhi and Yiqing Xie and Atharva Naik and Ruichen Zhu and Carolyn Rose},
year={2026},
eprint={2606.21811},
archivePrefix={arXiv},
primaryClass={cs.SE},
url={https://arxiv.org/abs/2606.21811}
}
- Downloads last month
- 320