Views
No views yet
| Metric | Base Model (Qwen3-30B-A3B) | After SFT |
|---|---|---|
| Valid Format Rate | 73.3% | 100% (first attempt) |
| Has Thought Rate | 100% | 100% |
Thought: [reasoning about the problem]
Action: [action_type] [arguments]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 solution1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4# Load base model
5base_model = AutoModelForCausalLM.from_pretrained(
6 "Qwen/Qwen3-30B-A3B",
7 trust_remote_code=True,
8 device_map="auto"
9)
10tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-30B-A3B", trust_remote_code=True)
11
12# Load LoRA adapter
13model = PeftModel.from_pretrained(base_model, "k-l-lambda/qwen3-30b-a3b-r2e-gym-sft")
14
15# Generate
16prompt = """You are an expert software engineer fixing bugs.
17
18AVAILABLE ACTIONS:
19- bash <command>: Run shell command
20- read <file>: Read file content
21- search <pattern>: Search for pattern
22- edit <file> <start> <end>: Edit file
23- submit: Submit solution
24
25## Problem:
26Fix a bug in the authentication module where users cannot log in with valid credentials.
27
28## Your turn:
29Thought:"""
30
31inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
32outputs = model.generate(**inputs, max_new_tokens=256)
33print(tokenizer.decode(outputs[0], skip_special_tokens=True))