Qwen2.5-Coder-7B Code-Plan SFT LoRA

LoRA adapter trained on four-step planning followed by Python code generation. The adapter is a recovered artifact from the Agent Code RL project; it is the SFT starting point used before the later PRM/GRPO work.

This is an adapter, not a standalone model. Load it with Qwen/Qwen2.5-Coder-7B.

Usage

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base_id = "Qwen/Qwen2.5-Coder-7B"
adapter_id = "keryszhan/qwen2.5-coder-7b-code-plan-sft"

tokenizer = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    base_id,
    device_map="auto",
    torch_dtype="auto",
    trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter_id)

The training examples use an instruction/response format. Responses contain four explicit reasoning steps and one Python code block; callers should preserve that protocol when constructing prompts.

Training

  • Base model: Qwen/Qwen2.5-Coder-7B
  • Method: LoRA SFT via LLaMA-Factory
  • Rank / alpha / dropout: 16 / 16 / 0.05
  • Target modules: attention and MLP projection layers
  • Learning rate: 2e-4
  • Effective batch size: 16
  • Epochs: 3
  • Seed: 42
  • Final step: 177
  • Recorded training loss: 0.3711

Recorded framework versions: PEFT 0.15.1, Transformers 4.51.3, PyTorch 2.5.1+cu121, Datasets 3.5.0, and Tokenizers 0.21.1.

Evaluation evidence

Recovered project records report approximately 44.8% for the base model and 61.29% for an SFT evaluation. A separate 122-item prm_val evaluation records 70 passes (57.38%). These historical measurements were not reconstructed from scratch during repository cleanup, so treat them as project evidence rather than a standardized leaderboard result.

The later GRPO evaluation files must not be attributed to this adapter: the final GRPO adapter is no longer available, and one candidate result has no checkpoint identity.

Limitations

  • Generates and may execute Python code; use an actual sandbox for untrusted output.
  • Trained on HumanEval/MBPP-derived tasks and should not be used to claim an uncontaminated benchmark result on those task families.
  • The model may emit incorrect reasoning, insecure code, or non-terminating code.
  • Training examples include AI-generated plans and augmentations. Recovered project notes identify DeepSeek API generation and limited ChatGPT/Codex-assisted correction, but provider/model-version metadata was not preserved per sample.
  • Training-data redistribution and mixed upstream terms are documented separately in the related dataset card and its ATTRIBUTION.md.

The related process dataset is maintained at keryszhan/agent-code-rl-artifacts.

License

The base model is distributed under Apache-2.0. This adapter is released under Apache-2.0 for the adapter artifact itself, subject to the base-model terms and applicable training-data licenses. The adapter license does not relicense the HumanEval-, MBPP-, or AI-generated training records.

Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for keryszhan/qwen2.5-coder-7b-code-plan-sft

Base model

Qwen/Qwen2.5-7B
Adapter
(54)
this model

Dataset used to train keryszhan/qwen2.5-coder-7b-code-plan-sft

Space using keryszhan/qwen2.5-coder-7b-code-plan-sft 1