LoRA adapters for MiniCPM5-1B trained in the Luma Payroll Gym, a verifiable gym for one slice of payroll work under a fictional rule set. Given a payroll record, the model computes a monthly payslip with a calculate tool or asks for clarification when the records do not determine an answer. Training ran on one 6 GB RTX 3050.
rl-0.04-signal) took 40 steps of 6 payslips, balanced across half-years, and 1 trap at 5e-5.Both stages use LoRA rank 16, alpha 32, on every attention and MLP projection, with the base loaded in 4-bit NF4. No language model wrote a label or a training target; a GLM judge grades only the explanation of a correct clarification, at weight 0.10.
Test split: 192 tasks from generator seeds never used in training, 4 answers each, calculator mode with the gym's six worked examples in the prompt.
| Model | Exact payslips | Traps caught | Refuses a determinable payslip | Mean reward |
|---|---|---|---|---|
| MiniCPM5-1B, frozen | 0.0% | 19.5% | 61.2% | -35.4% |
| SFT | 45.3% | 100.0% | 19.0% | 59.4% |
SFT + GRPO, β 0.04, payslip-focused (rl-0.04-signal, recommended) |
96.6% | 98.4% | 0.0% | 96.3% |
SFT + GRPO, β 0.04 (rl-0.04) |
69.0% | 99.2% | 0.0% | 76.4% |
SFT + GRPO, β 0.001 (rl-0.001, 3 seeds) |
67.4% ± 0.5 | 99.3% | 0.5% | 75.4% |
SFT + GRPO, β 0.04, balanced half-years (rl-0.04-balanced) |
69.0% | 98.7% | 0.3% | 76.1% |
SFT + GRPO, β 10 (rl-10) |
47.4% | 100.0% | 20.1% | 60.8% |
SFT + GRPO, β 100 (rl-100) |
46.1% | 100.0% | 18.8% | 59.9% |
The calculator does the arithmetic. The first GRPO runs gained mainly by no longer refusing payslips the rules determine (+23.7 points of exact payslips over SFT at β 0.04, 95% interval 15.6 to 31.5) and barely improved the choice of rate row. The final run, with three times as many payslips per step and a five times larger learning rate, tied the row to the month (wrong-row answers 1.2% of attempts, against 25.9%) and added 27.6 points (20.6 to 35.2), at a cost of 1.6 points of trap accuracy against SFT. At β 10 and 100 the penalty holds the policy at the SFT model.
rl-0.04 solved no payslip with 96% of answers malformed, and rl-0.04-signal also solved none with 96% malformed.rl-0.04-signal solved 11 of 24 payslip answers and 11 of 36 trap answers (97% and 98% on the test set). With the same records and the one-line training instruction, payslips recover to 20 of 24 but traps stay at 15 of 36: the adapters answer "conflicting gross pay" whenever a record has an amendment, even when a missing gross pay or month should come first, because in the generated training data a contract or amendment only appears in conflict traps.rl-0.04, and rl-0.04-signal adapters solved 11%, 20%, and 30% of payslips.| Path | Contents |
|---|---|
sft/adapter/ |
SFT adapter on openbmb/MiniCPM5-1B, revision 87179e5c1f455ef22e6223592d2d61351b525bfc |
sft/logs/ |
SFT configuration and per-step loss |
rl/<run>/adapter/ |
GRPO adapter at the final step (60, or 40 for rl-0.04-signal), applied on the merged SFT model |
rl/<run>/checkpoints/step-20/, step-40/ |
earlier adapters of rl-0.04 and rl-10 |
rl/<run>/logs/ |
configuration; reward, KL, entropy, completion length, and per-tier pass rate at every step; every sampled answer with its reward; the judge transcript |
evals/ |
every evaluation behind the report: configuration, generations, per-answer scores, metrics |
reports/ |
the summaries behind the tables |
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "whoisdinanath/MiniCPM5-1B-Luma-Payroll-GRPO"
base_id, revision = "openbmb/MiniCPM5-1B", "87179e5c1f455ef22e6223592d2d61351b525bfc"
tokenizer = AutoTokenizer.from_pretrained(base_id, revision=revision)
base = AutoModelForCausalLM.from_pretrained(base_id, revision=revision, dtype=torch.bfloat16)
sft = PeftModel.from_pretrained(base, repo, subfolder="sft/adapter").merge_and_unload()
model = PeftModel.from_pretrained(sft, repo, subfolder="rl/rl-0.04-signal/adapter")
luma_gym.local in the code repository builds the prompt the adapters expect.
Apache-2.0, the license of the base model.
rl/rl-0.001-seed8/adapter/adapter_model.safetensors 43 MiBrl/rl-0.001-seed9/adapter/adapter_model.safetensors 43 MiBrl/rl-0.001/adapter/adapter_model.safetensors 43 MiBrl/rl-0.04-balanced/adapter/adapter_model.safetensors 43 MiBrl/rl-0.04-signal/adapter/adapter_model.safetensors 43 MiBrl/rl-0.04/adapter/adapter_model.safetensors 43 MiBrl/rl-0.04/checkpoints/step-20/adapter_model.safetensors 43 MiBrl/rl-0.04/checkpoints/step-40/adapter_model.safetensors 43 MiBrl/rl-10/adapter/adapter_model.safetensors 43 MiBrl/rl-10/checkpoints/step-20/adapter_model.safetensors 43 MiBrl/rl-10/checkpoints/step-40/adapter_model.safetensors 43 MiBrl/rl-100/adapter/adapter_model.safetensors 43 MiBsft/adapter/adapter_model.safetensors 43 MiBopenbmb/MiniCPM5-1B