MiniMind-Dense-64M-GSM8K-GRPO-Rule-v1.0
Full-parameter GRPO from caspar/MiniMind-Dense-64M-Mixed-SFT-v1.0 at 7597c22aa4d3e7b2ac824b4b4be01158cccf1b8d.
This is an experimental small language model, not a reliable arithmetic solver.
Training
Reward variant: rule. The rule and Skywork variants start independently from
exactly the same SFT checkpoint, with matched data order and hyperparameters.
Rule reward: strict final #### number equality, correct1/otherwise0.
Skywork reward: frozen Skywork/Skywork-Reward-V2-Qwen3-1.7B raw classification
logit, without any rule reward, length bonus or repetition penalty. Skywork
revision e51ea3e08fb81326c3b812a7ff0cb9cee83e59cc. Group-normalized advantages.
Dataset revision 542384d27d374d668413d8ade5b9973b7b063bee: all6,851 retained
GSM8K train conversations. One full epoch,215updates, batch32questions,
four generations/question, microbatch8, AdamW LR1e-6→1e-7 cosine,
KL beta0.04, clipping0.2, weight decay0.01, gradient clip1, seed42.
FP32 parameters, BF16 autocast on A40. Sampling temperature1/top-p1/top-k0.
Prompts≤768tokens, output≤256tokens. No question truncation. Base SFT used
340-token windows; this run extends context and is not a matched340-token comparison.
No test gold is used in policy/reward prompts or optimization. Training gold is
used only for rule reward and diagnostic correctness, never Skywork input.
Evaluation
All1,319 official GSM8K test questions, greedy, output≤256tokens, same strict rule scorer before/after. Baseline 14/1319 (1.06%); final 18/1319 (1.36%). Final format errors: 388. Output budget exhausted: 382. Full responses and gold in evaluation_after.json. This verifies final numbers, not reasoning validity. No independent human assessment is claimed. Training reward alone does not establish improved math. The final FP32 safetensors package was reloaded and exact weight/logit equality was checked, then the reloaded model was evaluated. No best-checkpoint selection.
Usage
Review model_minimind.py before enabling custom code.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "caspar/MiniMind-Dense-64M-GSM8K-GRPO-Rule-v1.0"
tok = AutoTokenizer.from_pretrained(repo, revision="v1.0")
model = AutoModelForCausalLM.from_pretrained(repo, revision="v1.0", trust_remote_code=True).eval()
question = "What is 2 + 2?\nSolve step by step. End your answer with #### followed by the final number."
prompt = tok.apply_chat_template([{"role":"user","content":question}], tokenize=False, add_generation_prompt=True, open_thinking=False).replace('<think>\n\n</think>\n\n', '')
x = tok(prompt, return_tensors="pt", add_special_tokens=False).input_ids
with torch.inference_mode():
y = model.generate(inputs=x, max_new_tokens=256, do_sample=False, temperature=1., top_p=1., top_k=0, logits_to_keep=1)
print(tok.decode(y[0,x.shape[1]:], skip_special_tokens=True))
Attribution
MiniMind code: https://github.com/jingyaogong/minimind (Apache-2.0). GSM8K is MIT licensed; upstream mixed-SFT dataset component terms remain applicable. Skywork reward model: https://huggingface.co/Skywork/Skywork-Reward-V2-Qwen3-1.7B (Apache-2.0); its weights are not redistributed in this repository.