Views
No views yet
| Checkpoint Path | Phase | Description & Details |
|---|---|---|
checkpoints/sft/sft_ckpt_best.pt | Phase II (SFT) | Full-parameter SFT model trained on 14,068 instruction-response pairs across 8 epochs. Teaches ChatML interface <|im_start|>/<|im_end|>, response termination, and step-by-step <think> reasoning formatting. |
checkpoints/grpo/grpo_ckpt_step_100.pt | Phase III (GRPO RL) | Selected RL Model (Step 100). Fine-tuned using Group-Relative Policy Optimization with programmatic verifiers (FormatVerifier, NumericalVerifier, EchoVerifier). Achieves 97.8% <think> compliance. |
checkpoints/grpo/grpo_ckpt_step_200.pt | Phase III (GRPO RL) | Final RL step (Step 200) checkpoint. Used for training dynamics analysis and over-training audit checks. |
| Spec | Value |
|---|---|
| Total Parameters | 113.3M total (100.7M non-embedding, weight-tied) |
| Attention Mechanism | Grouped-Query Attention (12 Query heads : 4 KV heads) |
| Position Embeddings | Rotary Position Embeddings (RoPE) |
| Activation & Norm | SwiGLU (2048 hidden width), pre-RMSNorm |
| Context Length | 4,096 tokens |
| Vocabulary Size | 16,388 (16,384 base BPE + 4 special tokens) |
| Metric | Phase II (SFT) | Phase III (GRPO @100) | Phase III + RAG Context Grounding |
|---|---|---|---|
<think> Compliance | 73.1% | 97.8% | 97.8% |
| Closed-Book Numerical Accuracy (@5%) | 10.6% | 11.4% | — |
| Open-Book RAG Grounded Accuracy (@5%) | — | — | 44.4% |
| Echo / Contamination Rate | 0.0% | 0.0% | 0.0% |
Key Finding: Verifier RL (GRPO) decisively enforces format structure and response termination (<think>compliance: 73.1% $\rightarrow$ 97.8%). When paired with open-book RAG context retrieval over seismology literature, numerical calculation accuracy increases to 44.4%.
1git clone https://github.com/jiazhe868/nanogpt-seis-posttrain.git
2cd nanogpt-seis-posttrain
3pip install -r requirements.txt
4
5# Run interactive CLI chat with the GRPO RL model
6python -m src.sft.chat --ckpt checkpoints/grpo/grpo_ckpt_step_100.pt
7
8# Run interactive chat with RAG context grounding enabled
9python -m src.sft.chat --ckpt checkpoints/grpo/grpo_ckpt_step_100.pt --rag1import torch
2from src.model.model import GPT, GPTConfig
3
4# Initialize 113M model configuration
5config = GPTConfig(
6 block_size=4096,
7 vocab_size=16388,
8 n_layer=16,
9 n_head=12,
10 n_kv_head=4,
11 n_embd=768,
12)
13model = GPT(config)
14
15# Load state dict from downloaded checkpoint
16checkpoint = torch.load("checkpoints/grpo/grpo_ckpt_step_100.pt", map_location="cpu")
17model.load_state_dict(checkpoint["model"])
18model.eval()1@software{nanogpt_seis_posttrain_2026,
2 author = {jiazhe868},
3 title = {nanoGPT-Seis-Posttrain: SFT and verifier RL on a 113M seismology model},
4 url = {https://github.com/jiazhe868/nanogpt-seis-posttrain},
5 year = {2026}
6}