Downloads · 30 days
10
12% of all-time downloads
k-l-lambda/qwen3-30b-a3b-r2e-gym-sft
qwen3-30b-a3b-r2e-gym-sft is a machine learning model from k-l-lambda. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
This is a LoRA (Low-Rank Adaptation) fine-tuned version of Qwen/Qwen3-30B-A3B for automated bug fixing tasks in the R2E-Gym environment.
Downloads · 30 days
10
12% of all-time downloads
All-time downloads
82
Public
Repo size
988 MB
Likes
0
Public
Click a slice to open those files.
.safetensors988 MB · 100%
From the Hugging Face model README
This is a LoRA (Low-Rank Adaptation) fine-tuned version of Qwen/Qwen3-30B-A3B for automated bug fixing tasks in the R2E-Gym environment.
| Metric | Base Model (Qwen3-30B-A3B) | After SFT |
|---|---|---|
| Valid Format Rate | 73.3% | 100% (first attempt) |
| Has Thought Rate | 100% | 100% |
The base model already produces valid actions 73.3% of the time, but often fails on the first step (no "Action:" line found). After SFT training, the model produces correctly formatted actions from the very first step.
The model was fine-tuned on synthetic trajectories generated from gold patches in the R2E-Gym benchmark. Each training example consists of:
Training Data Stats:
This model is designed for:
The model produces outputs in the following format:
Thought: [reasoning about the problem]
Action: [action_type] [arguments]
Available actions:
bash <command>: Run shell commandread <file>: Read file contentsearch <pattern> [path]: Search for pattern (grep -rn)edit <file> <start> <end>\n<new_content>: Replace lines start-end with new_contentsubmit: Submit the solutionfrom peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3-30B-A3B",
trust_remote_code=True,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-30B-A3B", trust_remote_code=True)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "k-l-lambda/qwen3-30b-a3b-r2e-gym-sft")
# Generate
prompt = """You are an expert software engineer fixing bugs.
AVAILABLE ACTIONS:
- bash <command>: Run shell command
- read <file>: Read file content
- search <pattern>: Search for pattern
- edit <file> <start> <end>: Edit file
- submit: Submit solution
## Problem:
Fix a bug in the authentication module where users cannot log in with valid credentials.
## Your turn:
Thought:"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model is released under the Apache 2.0 license.
If you use this model, please cite the R2E-Gym benchmark and Qwen3 model.