nano-mistral-o1-dpo-arm-b
Mistral-7B-v0.3, supervised fine-tuned on PRM800K solutions
(viai957/nano-mistral-o1-sft),
then trained with step-level, shared-prefix DPO (sigmoid loss, β = 0.1) on
11,317 human-labelled PRM800K step pairs. This repository holds the
primary sigmoid run of the project's pre-registered "DPO Arm B".
Corrected labelling. An earlier version of this card called these weights the "original DPOP run". That was wrong. The training log records
variant: 'sigmoid',nll_coeff: 0.0forruns/dpo_arm_b, the run these weights came from. The dpop + NLL rerun is a separate repository,viai957/nano-mistral-o1-dpo-arm-b-response.receipts/arm_result.jsonin this repo describes that rerun, because the rerun wrote its manifest into the arm directory. Section 5 explains the details.
1. TL;DR product sheet
| What it is | A research checkpoint: a 7.25B-parameter Mistral decoder after SFT plus step-level DPO for math reasoning. It is not a chat or general-purpose model. |
| Lineage | mistralai/Mistral-7B-v0.3 → SFT (nano-mistral-o1-sft, ckpt micro_00002250) → this model (DPO, ckpt micro_00002910) |
| Method | Sigmoid DPO on (chosen = +1-rated step, rejected = −1-rated sibling of the same step), with a shared solution prefix. β = 0.1, reference log-probs precomputed from the frozen SFT policy. |
| Training data | PRM800K phase-1 and phase-2 train: 11,317 train pairs and 594 held-out pairs over 9,379 distinct problems. Decontaminated against all 1,819 eval problems (0 hits). |
| Compute | 4 GPUs (the run log records "NVIDIA A10G"), FSDP2, bf16, 2 epochs = 727 optimizer steps (2,910 micro-steps), about 32 h wall-clock (about 128 GPU-h) |
| Headline: GSM8K-full (n = 1,319, greedy, zero-shot) | 0.2108 [0.1896, 0.2336] vs SFT parent 0.2047 [0.1838, 0.2273]. Paired exact McNemar p = 0.631, so the result is null |
| Headline: held-out pair accuracy (n = 594) | 0.690 [0.652, 0.726] |
| MATH-500 | not measured for this checkpoint (SFT parent: 0.084, n = 500) |
| Status | Diagnostic. This is not the pre-registered arm result (that was the rerun, GSM8K 0.0091). The post-hoc evaluation was declared before it ran. |
| Weights | model.safetensors, bf16, 14,496,081,136 bytes. sha256 6eeaffc3…2d01a24. fp16 is not supported. |
In one sentence: vanilla step-DPO on off-policy PRM800K step pairs did not hurt the SFT policy, and it did not help it either (+0.6 pp, not significant; 212 discordant problems with no net gain).
2. Model details and mechanism
| Field | Value |
|---|---|
| Architecture | MistralForCausalLM: 32 layers, hidden 4096, 32 query heads / 8 KV heads (GQA), head_dim 128, FFN 14,336 (SiLU), RMSNorm ε 1e-5, RoPE θ = 1e6, vocab 32,768, untied embeddings |
| Context | trained with max length 2,048 (right truncation); config allows 32,768 |
| Precision | bf16 weights. Training used bf16 (fp16 is not supported). |
| Attention kernel (training) | in-repo Triton FlashAttention-2 (triton_fa2), parity-gated on 2026-08-18 |
| Developer | nano-mistral-o1 project (viai957) |
| Licence | Apache-2.0 (inherits from Mistral-7B-v0.3) |
Where this checkpoint sits
flowchart LR
B[mistralai/Mistral-7B-v0.3<br/>GSM8K 0.05 under same protocol] --> S[SFT on 12,397 PRM800K solutions<br/>nano-mistral-o1-sft<br/>GSM8K 0.2047 · MATH-500 0.084]
S -->|frozen reference π_ref| R[(precomputed ref log-probs<br/>arm_b-train / arm_b-held)]
S --> P[Arm B PRIMARY: sigmoid DPO β=0.1<br/>THIS REPO<br/>held-out 0.690 · GSM8K 0.2108]
R --> P
P -. tripwire v1 fired at step 43<br/>later shown to be a false alarm .-> Q[Arm B RERUN: dpop λ=50 + NLL 0.1<br/>nano-mistral-o1-dpo-arm-b-response<br/>held-out 0.542 · GSM8K 0.0091]
S --> A[Arm A: argilla whole-solution DPO<br/>nano-mistral-o1-dpo-arm-a<br/>held-out 0.556]
S --> G[Stage-b GRPO, verifier reward<br/>nano-mistral-o1-grpo-stageb-step48]
How a step pair is built and scored
flowchart TB
X["PRM800K solution trace<br/>problem → step 1 … step k-1 (all rated) → step k candidates"] --> C["chosen: step k rated +1"]
X --> J["rejected: sibling step k rated −1<br/>(0-rated siblings excluded)"]
C --> SEQc["[INST] prompt [/INST] + shared prefix (steps 1..k-1) + chosen step"]
J --> SEQr["[INST] prompt [/INST] + shared prefix (steps 1..k-1) + rejected step"]
SEQc --> LP["Σ log π_θ over scored tokens<br/>(prefix terms cancel in the sigmoid margin)"]
SEQr --> LP
LP --> L["L = −log σ(β·[(log π_θ − log π_ref)_c − (log π_θ − log π_ref)_r])"]
On average the contested step is step 7.66 (median 7, max 52). The shared prefix including the prompt averages 400 tokens (train split), so each pair differs only in the last step.
3. Training data
| Source | Pinned revision | Licence (upstream) | Use |
|---|---|---|---|
tasksource/PRM800K (phase1_train + phase2_train, 98,731 annotation records) | 547b1950…ddd4 | MIT (openai/prm800k). This licence is not re-verified in a local file. | pair source |
EleutherAI/hendrycks_math | 21a56338…f4a3 | MIT (upstream). This licence is not re-verified in a local file. | subject join only (PRM800K has no subject field) |
HuggingFaceH4/MATH-500 | 6e4ed1a2…d4be | MIT (upstream). This licence is not re-verified in a local file. | decontamination set and eval |
openai/gsm8k (test, 1,319) | 740312ad…9866 | MIT (upstream). This licence is not re-verified in a local file. | decontamination set and eval |
Construction funnel (from data/manifest.json and data/arm_b.receipt.json):
| Stage | Count |
|---|---|
| Pair sites (a step with ≥1 +1 and ≥1 −1 sibling) | 54,786 |
| Raw pairs (one per negative sibling) | 122,409 |
| After caps (≤2 per step, ≤8 per problem) | 46,759 over 9,379 problems |
| Decontaminated (problem hash vs 1,819 MATH-500 + GSM8K problems) | 0 removed |
| Curated (prefer later steps, then higher rating confidence, subject-interleaved rounds) | 12,000 |
| Exact-duplicate re-adds removed (87 train + 2 held-out, a curation defect caught by the ref-cache build) | 11,911 = 11,317 train + 594 held-out |
Remainder kept as arm_b_extra (unused, for a scale ablation) | 34,752 |
The split is by problem: train covers 8,911 problems and held-out covers 468, with zero overlap. The chosen step is longer than the rejected step in 0.438 of pairs. That fraction is the baseline for the length-drift tripwire.
Subject mix (train / held-out): Algebra 2,479 / 140; Intermediate Algebra 2,160 / 118; Prealgebra 1,531 / 66; Number Theory 1,494 / 74; Precalculus 1,317 / 84; Counting & Probability 1,284 / 59; Geometry 1,034 / 53; unknown 18 / 0.
Figure 10. Position of the contested step, shared-prefix length, and subject mix. Source: data/shards/arm_b/{train,held_out}/*.extras.jsonl.
Example record (metadata of a real train pair; token ids live in the .bin shards):
{"problem_id": "002e8671e41d40e7", "subject": "Algebra", "chosen_prompt_len": 84,
"shared_prefix_len": 244, "step_index": 5, "pair_id": "380749b605f7afcb28e3ec12ca453036"}
Known data-quality issues (docs/audits/phase1_postmortem.md): on a 63-pair
terminal-step subset, 19.0% (CI [11.2, 30.4]) of "rejected" steps still reach the
correct answer. This is consistent with the label noise reported in the literature for
PRM800K. About 10–11% of the parent SFT rows have wrong final answers. Both sides of
every pair are off-policy: humans rated GPT-4 generations, not samples from this policy.
4. Training procedure
Objective
The objective is standard sigmoid DPO on summed completion log-probabilities, with a frozen reference (Rafailov et al., 2023):
$$ \mathcal{L}{\text{DPO}}(\theta) = -,\mathbb{E}{(x, y_c, y_r)}\Big[\log \sigma\big(\beta,\Delta_\theta\big)\Big],\qquad \Delta_\theta = \big[\log \pi_\theta(y_c\mid x) - \log \pi_{\text{ref}}(y_c\mid x)\big] - \big[\log \pi_\theta(y_r\mid x) - \log \pi_{\text{ref}}(y_r\mid x)\big] $$
with $\log \pi(y\mid x)=\sum_{t\in\mathcal{M}} \log \pi(y_t\mid y_{<t},x)$ over the completion mask
$\mathcal{M}$, and $\beta=0.1$. In this build $\mathcal{M}$ started at prompt_len, so it also
covered the shared prefix. Because chosen and rejected share that prefix, its terms
cancel exactly in $\Delta_\theta$, on the policy side and the reference side alike. For the sigmoid
loss used here, the mask choice therefore has no effect. It did matter for the rerun's asymmetric terms
(defect D2, fixed in 5f35f73). The implementation is nmo/kernels/fused_dpo.py::_variant_loss, a chunked
fused log-softmax that never materializes the full logits tensor.
For reference, the rerun in the sibling repo optimized the DPOP form $-\log\sigma\big(\beta[\Delta_\theta - \lambda\max(0,\log\pi_{\text{ref}}(y_c)-\log\pi_\theta(y_c))]\big) + c_{\text{nll}}\cdot\text{NLL}(y_c)$ with λ = 50 and $c_{\text{nll}}$ = 0.1. That objective was not used for these weights.
Monitored but not optimized: implicit rewards $r=\beta(\log\pi_\theta-\log\pi_{\text{ref}})$, reward margin, batch reward accuracy, per-token chosen NLL, chosen-longer fraction.
Hyperparameters
| Hyperparameter | Value |
|---|---|
| Loss | dpo_sigmoid (variant: sigmoid), β = 0.1, nll_coeff = 0.0 |
| Reference | frozen SFT micro_00002250. Log-probs precomputed once with an FSDP2-sharded forward, max_length 2,048, right truncation |
| Optimizer | AdamW 8-bit (bitsandbytes), betas (0.9, 0.95), eps 1e-8, weight decay 0.0 |
| Learning rate | 5e-7, effectively constant (see note) |
| Logged schedule | linear warmup over 22 steps (3%), then cosine to 0 |
| Gradient clipping | none (no clipping existed in this trainer) |
| Batch | micro 2 × grad-accum 4 × 4 ranks = 32 pairs per optimizer step |
| Epochs / steps | 2 epochs. Banner/planned horizon 746 optimizer steps (= 2 × ⌈11,911/32⌉); the trainer's scheduler horizon was 728 (rank-sharded sampler), and the logged cosine follows 728; 727 run (data exhausted) |
| Pair presentations | 22,626 (logged pairs summed) |
Tokens processed (logged n_tokens summed) | 15,292,831 |
| Sharding / memory | FSDP2 with activation checkpointing; 2 dataloader workers per rank |
| Checkpoint cadence | every 100 micro-steps, keep 2 |
| Held-out eval | 594 pairs, at end of training |
| Armed tripwires | logps_chosen (v1, window 20 log rows), length_drift (band ±0.10 around 0.438) |
LR note. The nmo
Trainerstepped and logged the warmup-cosine schedule, but never wrote it intooptimizer.param_groups. At HEAD94e25e0,nmo/train/trainer.pycontains noparam_groupswrite, and no other module applies the logged LR. This run therefore trained at the constant base LR of 5e-7, with no warmup and no decay. Thelrcolumn inreceipts/history.jsonlshows the intended schedule, not the applied one. The defect was found on 2026-10-12 and fixed only in the successoraligntrainer.
Compute
| Hardware | 4 GPUs, one rank each. The run banner records triton_fa2 (verified … on NVIDIA A10G). |
| Wall-clock | Gates passed 2026-08-20 19:18 and the final checkpoint was written 2026-08-22 03:23, about 32 h. About 66 min per 100 micro-steps (consecutive checkpoint timestamps). |
| Held-out eval | finished 2026-08-22 04:01 |
| Host guards | ≥45 GB RAM preflight, heavy-job lock, 22 GB/rank RSS budget (banner) |
5. Training curves
All curves are parsed from receipts/history.jsonl, which is byte-identical to
runs/dpo_arm_b/history.jsonl. It has 11,640 rows = 2,910 micro-steps × 4 ranks. Each point is the
pair-weighted mean over the 16 rows of one optimizer step. Where the rerun appears for
contrast, its data come from runs/dpo_arm_b_response/history.jsonl.
Figure 1. DPO loss falls from 0.692 (mean of the first 25 steps; ln 2 = 0.693) to 0.622 (mean of the last 25).
The implicit reward margin rises from 0.003 to 0.162. A visible step change near optimizer step 360–380 accounts
for about a third of the total loss and margin movement; the rest is gradual.
Figure 2. Train-batch reward accuracy, primary vs rerun. The primary rises from 0.538 (first 25 steps) to
0.793 (last 25). The rerun stays at chance (0.472 → 0.511).
Figure 3. Left: summed log-probs move with batch composition (right panel), not with collapse. Over the
run, the mean of the last 25 steps (−165.6 chosen) is close to the first 25 (−167.0). The v1 tripwire
read this length-confounded series with a zero-threshold slope test over 20 rows, and fired.
Middle: per-token chosen NLL, the diagnostic DPOP itself publishes, stays flat for the primary
(0.525 → 0.538 nats/token, first-25 vs last-25 means). For the rerun it rises from about 0.52 to about 1.0 after optimizer step about 500 (last-25 mean 0.935).
Figure 4. Gradient norm (mean of 4 per-rank logged values). Primary: median 22.7, max 36.7 (step 51).
Rerun: 2,851 at step 1 and a peak of 355,830 at step 518. No clipping was configured in either run.
Figure 5. The logged LR schedule (peak 5e-7 at step 22, cosine over the 728-step scheduler horizon to 2.5e-12) against the LR that was actually
applied (constant 5e-7; see the LR note in section 4).
Tripwire record. The logps_chosen tripwire fired first at micro-step 43 and latched.
Under the frozen pre-registration this automatically launched the dpop + NLL rerun as the
recorded arm result. A later audit (docs/audits/phase1_postmortem.md, D1) found that the
same tripwire fires on a shuffled copy of this run's series at nearly the same rate
(2,987 vs 3,049 fires). It has no discriminating power, so the primary run was condemned on a
false alarm. The length-drift tripwire did not fire. The chosen-longer fraction stayed at
0.420 (last 25 steps) against a baseline of 0.438 ± 0.10.
6. Evaluation
Protocol. Zero-shot, using the nmo prompt template ([INST] Solve the following math problem. Reason one step at a time, writing each step as its own paragraph separated by a blank line. When you reach the result, write "# Answer" followed by a blank line and the answer alone.\n\n{problem} [/INST]). Decoding is HF greedy (temperature 0), max_new_tokens 768, one sample. Answers are scored by
a sandboxed symbolic-equivalence verifier (math_verify-based, 5 s per-item timeout). Harness ceiling test: gold
solutions score 1.000 extract-and-verify on all 1,319 GSM8K and 500 MATH-500 items
(outputs/eval/ceiling_test.json). CIs are 95% Wilson intervals. The paired comparison is an
exact McNemar test joined on problem_id.
GSM8K test (full, n = 1,319)
| Model | pass@1 | 95% CI | correct | format compliance | no-answer | truncated at 768 | mean / median tokens |
|---|---|---|---|---|---|---|---|
| Mistral-7B-v0.3 base (same protocol) | 0.05 | not recorded | not recorded | not recorded | not recorded | 0.715 | not recorded |
SFT parent (nano-mistral-o1-sft) | 0.2047 | [0.1838, 0.2273] | 270 | 0.9356 | 0.0644 | 0.0644 | 272.6 / 225 |
| This model (Arm B primary, sigmoid) | 0.2108 | [0.1896, 0.2336] | 278 | 0.9075 | 0.0925 | 0.0933 | 311.9 / 255 |
Arm B rerun, dpop + NLL (-response) | 0.0091 | [0.0052, 0.0158] | 12 | 0.4466 | 0.5534 | 0.5413 | 539.9 / 768 |
The base-model row comes from the audit text (phase1_postmortem.md). Its per-problem receipt is not
retained in this repo.
Figure 6. GSM8K pass@1 with Wilson CIs, and truncation rate. Sources: outputs/eval/{sft-final,arm-b-primary-posthoc,arm-b-final}.json.
Paired test against the SFT parent
| Contrast | both right | SFT only | Arm only | both wrong | exact McNemar p | reading |
|---|---|---|---|---|---|---|
| This model vs SFT (declared post-hoc diagnostic) | 168 | 102 | 110 | 939 | 0.631 | null, +0.6 pp |
| Rerun vs SFT (pre-registered primary contrast) | 2 | 268 | 10 | 1,039 | 2.8e-66 | −19.6 pp, an instrument-chain artifact |
The minimum detectable effect at 80% power for independent samples is 4.72 pp (mde80_independent).
Figure 8. Paired outcomes. Of 1,319 problems, 212 changed outcome against the SFT parent (110 gained, 102 lost):
behavioural churn with no net gain.
Figure 7. Distribution of generated tokens on GSM8K. This model generates somewhat longer outputs than
SFT (median 255 vs 225; truncation 9.3% vs 6.4%). The rerun piles up at the 768 cap.
Held-out preference accuracy
| Run | held-out acc | 95% CI | n |
|---|---|---|---|
| This model (Arm B primary) | 0.6902 | [0.6519, 0.7261] | 594 |
| Arm B rerun (dpop + NLL) | 0.5421 | [0.5019, 0.5818] | 594 |
| Arm A (argilla, whole-solution pairs) | 0.556 | [0.465, 0.642] | 117 |
Figure 9. Held-out pair accuracy. Sources: runs/dpo_arm_b.log lines 3349 and 6509; Arm A from docs/RESULTS.md.
Not measured for this checkpoint: MATH-500, maj@k / pass@k (k > 1), any non-math benchmark, safety or toxicity evaluations. There is no iterative hill-climb: this is a single training run, so no hill-climbing chart exists.
7. Results discussion
-
Step-DPO taught a ranking, not a skill. The model learned to rank held-out chosen steps above rejected ones (0.690, well above chance), but that ranking did not turn into GSM8K accuracy (+0.6 pp, p = 0.63). This matches the published penalty for off-policy step pairs (Step-DPO's ablation: about 0.7 pp) and the predecessor project's null PPO result on the same supervision (+0.86 pp vs control, not significant).
-
This run was not destructive. Per-token NLL stayed flat, grad norm stayed around 22, and the length-drift band held. The −19.6 pp "destruction" in the project's recorded result belongs to the rerun. The audit attributes it to two implementation defects, not to step-DPO:
- D1: a tripwire with no null calibration chose the rerun objective.
- D2: the completion mask was drawn at
prompt_len, so the asymmetric dpop/NLL terms integrated over a span that was about 87% shared prefix.
With no gradient clipping and no halt, the rerun diverged at optimizer step about 506.
-
The 0.690 held-out number should not be read as collapse. The original Results section said the 0.690 was "carried by the degenerate mode". The audit supersedes that reading. By the per-token metric this run showed no chosen-likelihood collapse.
-
Lessons recorded by the project: calibrate any monitor that can change the experiment against a shuffle null. Use per-token, not summed, log-probs for collapse detection. Re-derive cancellation arguments whenever an asymmetric loss term is added. Make grad-norm guards halt rather than only log. Put a task-accuracy canary inside every RL run. Fixes R1–R3 landed in commit
5f35f73. -
Prediction scoring. The pre-registered band for Arm B was 0 to +3 pp. This checkpoint (+0.6 pp, not significant) falls inside it. The recorded rerun (−19.6 pp) does not.
8. Intended use, limitations, risks
- Intended use: research on preference optimization for step-level reasoning, interpretability (base ↔ SFT ↔ DPO deltas, crosscoder studies), and reproduction of the nano-mistral-o1 phase-1 ledger.
- Not intended for: production math tutoring, any high-stakes numerical decision, chat or assistant use. The model has no safety tuning and no refusal training.
- Limitations: GSM8K accuracy is about 21% zero-shot. MATH-500 was not measured for this checkpoint (parent: 8.4%).
English only. It expects the exact
[INST] … [/INST]math template above, and other formats were not evaluated. It was trained at constant LR (see section 4), so it is not LR-comparable to runs on thealigntrainer. 9.3% of GSM8K generations hit the 768-token cap (9.2% hit it without emitting an answer). - Risks: the model confidently produces wrong arithmetic and reasoning. Its outputs should be checked with a verifier. It inherits any biases of Mistral-7B-v0.3 and of the GPT-4-generated PRM800K solutions.
9. Reproducibility
| Item | Value |
|---|---|
| Code | nano-mistral-o1 (local repo; no public remote). HEAD at launch time was commit 0280fb45a2b74377660310a2db0e63bc6b530fb2 (2026-08-20 19:18:17 +0530, 2 s before the first log line at 19:18:19); the run did not record its SHA or working-tree state, so this is inferred from timestamps |
| Config | configs/dpo_steppairs.yaml, sha256 e19fb4f5f95af48d98f8f75474a0210678ba69102de39e2c8af9d86a8bfee117 (unchanged since commit c7d3ab4) |
| Results / audit commits | f1c4507 (phase-1 results), 6206f15 (postmortem), 5f35f73 (R1–R3 fixes), d752d6a (post-hoc diagnostic resolved) |
| Parent checkpoint | checkpoints/sft/checkpoints/micro_00002250 = viai957/nano-mistral-o1-sft |
| Data hashes (banner) | arm_b-train d5f98d2a72cd9a9747eda8703530039e, arm_b-held 61f8d3201cc7f9325554cdf578844b60, gsm8k_test b2983c4e4123ac83475e3b7297834395, tokenizer 69c68b365b9e8f42 |
| HF weights revision | eaa239dce6570e4e43cf1ae85ab7459bb3d8c7da (upload verified by sha256 per file) |
# data build (pinned local snapshots; --held-out-frac 0.05 --seed 0 are the defaults), then dedup
uv run python scripts/build_data.py
uv run python scripts/dedup_arm_b_shards.py
# frozen-SFT reference log-probs + the mandatory path-bias dual pass (sharded forward)
uv run python scripts/precompute_ref_logprobs.py configs/dpo_steppairs.yaml
torchrun --nproc_per_node=4 scripts/precompute_ref_logprobs.py configs/dpo_steppairs.yaml --path-bias
# path-bias fired for this run (action rerun_precompute_sharded), so the cache actually used was the
# FSDP2-sharded one (forward_impl fsdp2_sharded). This pass is required to reproduce it:
torchrun --nproc_per_node=4 scripts/precompute_ref_logprobs.py configs/dpo_steppairs.yaml --sharded-cache
# training (4 GPUs)
torchrun --nproc_per_node=4 scripts/dpo.py configs/dpo_steppairs.yaml
# evaluation (single GPU, fresh process) and paired test
CUDA_VISIBLE_DEVICES=0 python scripts/eval_checkpoint.py \
--checkpoint runs/dpo_arm_b/checkpoints/micro_00002910 \
--name arm-b-primary-posthoc --gsm8k-n 1319 --math500-n 0
python scripts/primary_contrast.py --arm outputs/eval/arm-b-primary-posthoc.json \
--baseline outputs/eval/sft-final.json --source gsm8k --expect-n 1319 \
--label "POST-HOC DIAGNOSTIC: superseded primary sigmoid ckpt vs sft-final (NOT the pre-registered contrast)" \
--out outputs/eval/posthoc_primary_vs_sft.json
# restore this checkpoint into the repo layout
hf download viai957/nano-mistral-o1-dpo-arm-b --revision eaa239dce6570e4e43cf1ae85ab7459bb3d8c7da \
--local-dir runs/dpo_arm_b/checkpoints/micro_00002910 --exclude 'receipts/*' README.md 'figures/*'
Usage:
from transformers import AutoModelForCausalLM, AutoTokenizer
rid = "viai957/nano-mistral-o1-dpo-arm-b"
tok = AutoTokenizer.from_pretrained(rid)
model = AutoModelForCausalLM.from_pretrained(rid, torch_dtype="bfloat16", device_map="auto")
prompt = ("[INST] Solve the following math problem. Reason one step at a time, writing each step as "
"its own paragraph separated by a blank line. When you reach the result, write \"# Answer\" "
"followed by a blank line and the answer alone.\n\n{problem} [/INST]")
ids = tok(prompt.format(problem="What is 17 * 23?"), return_tensors="pt").to(model.device)
out = model.generate(**ids, max_new_tokens=768, do_sample=False)
print(tok.decode(out[0][ids.input_ids.shape[1]:], skip_special_tokens=False))
Files in this repo: receipts/history.jsonl is the per-micro-step, per-rank training log of this run.
receipts/eval_posthoc.log is the GSM8K run log for this checkpoint. receipts/arm_result.json is the arm
manifest written by the rerun: it names runs/dpo_arm_b_response/... and lists the tripwire alarms.
10. Related repositories, licence, citation
| Repo | Role |
|---|---|
viai957/nano-mistral-o1-sft | parent SFT checkpoint and DPO reference |
viai957/nano-mistral-o1-dpo-arm-b-response | Arm B dpop + NLL rerun (the pre-registered recorded result, GSM8K 0.0091) |
viai957/nano-mistral-o1-dpo-arm-a | Arm A, whole-solution argilla preference pairs |
viai957/nano-mistral-o1-dpo-arm-a-halfepoch-salvage | Arm A halted-run salvage checkpoint |
viai957/nano-mistral-o1-grpo-stageb-step48 | stage-b GRPO with verifier reward |
Licence. Apache-2.0 for the weights and code, following Mistral-7B-v0.3. Training data is derived from PRM800K (OpenAI) and MATH (Hendrycks et al.). Evaluation uses GSM8K (OpenAI). These datasets are reported upstream as MIT-licensed; that was not re-verified in a local file, so check each dataset card before reuse.
@misc{nanomistralo1_dpo_arm_b_2026,
title = {nano-mistral-o1 DPO Arm B (primary sigmoid run): step-level shared-prefix DPO on PRM800K for Mistral-7B-v0.3},
author = {{nano-mistral-o1 contributors}},
year = {2026},
howpublished = {\url{https://huggingface.co/viai957/nano-mistral-o1-dpo-arm-b}},
note = {Weights revision eaa239dce6570e4e43cf1ae85ab7459bb3d8c7da}
}
@inproceedings{rafailov2023dpo,
title = {Direct Preference Optimization: Your Language Model is Secretly a Reward Model},
author = {Rafailov, Rafael and Sharma, Archit and Mitchell, Eric and Ermon, Stefano and Manning, Christopher D. and Finn, Chelsea},
booktitle = {NeurIPS},
year = {2023}
}
@article{lightman2023prm800k,
title = {Let's Verify Step by Step},
author = {Lightman, Hunter and Kosaraju, Vineet and Burda, Yura and Edwards, Harri and Baker, Bowen and Lee, Teddy and Leike, Jan and Schulman, John and Sutskever, Ilya and Cobbe, Karl},
journal = {arXiv:2305.20050},
year = {2023}
}
@article{lai2024stepdpo,
title = {Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs},
author = {Lai, Xin and Tian, Zhuotao and Chen, Yukang and Yang, Senqiao and Peng, Xiangru and Jia, Jiaya},
journal = {arXiv:2406.18629},
year = {2024}
}