A ~351M parameter decoder-only transformer, supervised-fine-tuned from
Rune-R1 Base to follow a chain-of-thought math answer format. This is stage 2 of the Rune-R1 pipeline (
Pretrain → SFT → GRPO); it teaches the
format (
<think>...</think> + final answer) that the subsequent GRPO stage then optimizes for
correctness. See
Rune-R1 for the final, RL-tuned reasoning model.
1import torch
2import tiktoken
3from rune.model import CONFIG_350M, RuneModel
4
5ckpt = torch.load("pytorch_model.bin", map_location="cpu")
6model = RuneModel(CONFIG_350M)
7model.load_state_dict(ckpt)
8model.eval()
9
10enc = tiktoken.get_encoding("gpt2")
11prompt = "What is 12 * 15?"
12tokens = torch.tensor([enc.encode(prompt)], dtype=torch.long)
13
14# Model responds in "<think>...reasoning...</think>\n\n{final answer}" format.
15# See rune/generate.py in the source repo for full sampling / KV-cache generation code.
The
rune package (model definition + generation utilities) is available at the
Rune-R1 GitHub repository.
Validation loss is next-token cross-entropy on the held-out 200-example split; it measures how well the model reproduces the distilled CoT format and answers, not mathematical correctness (see the GRPO model's MATH-500 accuracy for that).
1@misc{RuneR1SFT2026,
2 author = {Samuel Jayasingh},
3 title = {Rune-R1 SFT: Chain-of-Thought Fine-Tuning of a 351M Transformer on Distilled Math Solutions},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/samueljayasingh/Rune-R1-sft}}
7}