Qwen3-4B SWE-Gym Moto KL02 Adapter
This is a PEFT LoRA adapter for unsloth/Qwen3-4B-Instruct-2507, trained for agentic code repair on the SWE-Gym moto split using a search/replace patch format and honest anchored retrieval.
This checkpoint is the best KL-GRPO continuation of the visible16k SFT adapter, selected at step 50 with beta 0.02 and learning rate 2e-6.
Checkpoint
Local source checkpoint:
/mnt/disks/unslothai/datta0/cache/qwen3-grpo-patch/20260604_115126_swegym_q4b-sftbest-kl02-lr2e6_787ca07/checkpoints/best_holdout
Training run:
20260604_115126_swegym_q4b-sftbest-kl02-lr2e6_787ca07
Training Summary
- Base model:
unsloth/Qwen3-4B-Instruct-2507
- Initial adapter: visible16k SFT checkpoint
- RL method: KL-GRPO continuation
- Beta: 0.02
- Learning rate: 2e-6
- Max steps: 50
- Best step: 50
- Held-out greedy at selection: 8/35
- Held-out mean reward at selection: 0.4169
Evaluation
Held-out SWE-Gym moto eval, honest anchored retrieval, search/replace patch format:
| Run | greedy | pass@8 | single pass@8 | multi pass@8 |
|---|
| original retriever sample 1 | 8/35 | 11/35 | 8/18 | 3/17 |
| original retriever sample 2 | 8/35 | 12/35 | 8/18 | 4/17 |
| original retriever sample 3 | 8/35 | 12/35 | 9/18 | 3/17 |
| opsnake retriever sample | 8/35 | 12/35 | 10/18 | 2/17 |
The default pass@8 decoding used for the positive samples was temperature=0.8, top_p=0.95. A higher-diversity probe at temperature=1.0, top_p=1.0 was negative: 10/35 overall pass@8 and 1/17 multi-file pass@8.
Intended Use
This is the strongest Qwen3-4B adapter artifact from the local investigation so far. It is intended for research on SWE-Gym style code repair with the same search/replace prompt contract and sandbox scoring pipeline.
Loading
Use this as a PEFT adapter on top of unsloth/Qwen3-4B-Instruct-2507.
1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = "unsloth/Qwen3-4B-Instruct-2507"
5adapter = "imdatta0/qwen3-4b-swegym-moto-kl02-adapter"
6
7tokenizer = AutoTokenizer.from_pretrained(adapter)
8model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto", device_map="auto")
9model = PeftModel.from_pretrained(model, adapter)
Limitations
- Evaluated only on the local SWE-Gym moto held-out split used in this investigation.
- Overall pass@8 is repeated at 11-12/35, but multi-file repair remains weak at 2-4/17 depending on retrieval/sample.
- Metrics depend on the repository's retrieval, prompt, search/replace extraction, patch application, and sandbox scoring code.
- This adapter requires the base model and is not a merged full model.