mini-swe-rl-v1-offline-grpo-lora
LoRA adapter for coding tasks
2 min readupdated
The new release is an offline GRPO (Group Relative Policy Optimization — policy optimization algorithm using relative group comparison) adapter trained on top of the Qwen/Qwen2.5-Coder-1.5B-Instruct model. Training was performed on a fixed dataset of complex tasks using FP16 and a LoRA rank of 16. The model is designed for developers researching methods to fine-tune language models for programming tasks without needing to run live generation during training.
Key features
- Base: built on the compact and efficient Qwen2.5-Coder-1.5B-Instruct model.
- Training: used the offline GRPO method with fixed responses and 10 training epochs.
- Format: ready-to-use PEFT adapter and tokenizer.
- Transparency: training scripts and manifests with checksums are saved in the repository.
What you can do
- Integration: connect the adapter to the base Qwen2.5-Coder model via the PEFT library for code experiments.
- Research: study the offline GRPO training implementation on a small set of complex tasks.
- Testing: check the model's behavior on specific programming tasks.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "Qwen/Qwen2.5-Coder-1.5B-Instruct"
adapter_id = "quachtohai/mini-swe-rl-v1-offline-grpo-lora"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(base, adapter_id)
model.eval()Read more
DetailsConfiguration: LoRA rank 16, alpha 32, dropout 0.05, FP16.
Training: 10 epochs, 8 complex tasks, 80 optimizer updates.
Limitations: offline dataset of 8 tasks, code generation evaluation was not performed.
Requirements: support for transformers, peft, torch, and safetensors libraries.










Comments