Instructions to use ligaments-dev/autodata-policy-cs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ligaments-dev/autodata-policy-cs with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "ligaments-dev/autodata-policy-cs") - Notebooks
- Google Colab
- Kaggle
metadata
license: apache-2.0
base_model: Qwen/Qwen2.5-0.5B-Instruct
library_name: peft
tags:
- grpo
- trl
- autodata
- synthetic-data
datasets:
- ligaments-dev/autodata-grpo-cs
autodata-policy-cs
A Qwen2.5-0.5B-Instruct policy fine-tuned with GRPO (Group Relative Policy Optimization) on synthetic CS-reasoning data generated by Autodata Studio β an implementation of the agentic self-instruct loop from Autodata: An agentic data scientist to create high-quality synthetic data (arXiv:2606.25996v2).
This is a testing-phase / infrastructure-validation run, not a production model. Its purpose was to prove the full pipeline end to end on real hardware.
What this run proved
| Stage | Result |
|---|---|
| 72B challenger generates calibrated CS questions | β 5/8 source docs produced a real weak/strong gap (30β60 pts) |
| Curated data pushed to the Hub | β
ligaments-dev/autodata-grpo-cs |
| GRPO training on HF Jobs (A10G, 24GB) | β 100 steps, LoRA, programmatic reward, ~17 min |
| Trained adapter pushed to the Hub | β this repo |
Honest limitations of this run
- Reward did not improve. Mean reward oscillated around 0.47β0.55 across all 100 steps (no upward trend). The model was trained, but not measurably improved.
- Root cause:
completions/clipped_ratio = 1.0β every generation hit the 256-token cap and never emitted a stop token, so the token-overlap reward stayed ~constant and GRPO had no usable gradient. - Tiny dataset: only 5 prompts β 20 epochs of overfitting, no generalization signal.
What a real (improving) run needs
- More data β hundreds of accepted prompts, not 5.
- Fix completion termination β investigate why EOS is never emitted; raise
max_completion_lengthand/or correct the chat/generation config. - A richer reward β swap the lexical-overlap proxy for the paper's rubric/LLM-judge reward, or add a stop-token / brevity shaping term.
- Scale the GPU β move from
a10g-smalltoa100-largeonce the dataset and reward are sound.
Training configuration
- Base model:
Qwen/Qwen2.5-0.5B-Instruct - Method: GRPO + LoRA (r=16, alpha=32, q/k/v/o projections)
- Reward: token-F1 overlap vs. reference answer + length/format shaping (programmatic, no API)
- Steps: 100, lr 1e-5, num_generations 8, max_completion_length 256, bf16
- Hardware: 1Γ A10G (24 GB) via HF Jobs
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
model = PeftModel.from_pretrained(base, "ligaments-dev/autodata-policy-cs")
tok = AutoTokenizer.from_pretrained("ligaments-dev/autodata-policy-cs")