/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
7,1 млрд
Лицензия
Apache 2.0
Архитектура
mistral · dense
Базовая модель
nano-mistral-o1-sft
Библиотека
transformers
Опубликована
20 окт 2026

nano-mistral-o1-dpo-arm-a-halfepoch-salvage

Генерация текстаТекст → текст3 профессии
348скачиваний за 30 дней0лайковвеса обновлены4 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Экспериментальный снимок Mistral-7B-v0.3 после ошибочно распределённого DPO-обучения для форензического анализа изменений весов.

Это исследовательский контрольный снимок модели Mistral-7B-v0.3, дообученной методом DPO авторами проекта nano-mistral-o1 на базе viai957/nano-mistral-o1-sft. Веса сохранены после прерванного запуска с ошибкой распределения данных: все четыре GPU многократно обрабатывали одни и те же предпочтительные пары. Снимок соответствует 425-му шагу оптимизатора, примерно 1,55 эпохи; название репозитория с упоминанием половины эпохи не отражает фактическое состояние обучения.

Модель имеет архитектуру MistralForCausalLM, около 7,1 млрд параметров, веса bf16 и контекст до 32 768 токенов. Она принимает текст и генерирует текст; обучающие пары содержали математические задачи и полные решения, а карточка указывает английский язык. Модель предназначена для криминалистического анализа и интерпретации последствий ошибочно распределённого DPO-обучения, например для сравнения весов с родительской SFT-моделью. Это не готовый математический помощник: оценка на бенчмарках отсутствует, ожидаются слабые математические способности и уверенные ошибки. Запуск в fp16 не поддерживается и может приводить к NaN; модель не имеет настройки безопасности.

Репозиторий использует формат safetensors и библиотеку Transformers. Лицензия модели — Apache-2.0; в README отдельно отмечен возможный лицензионный риск в отношении ответов, использованных в обучающих данных.

Сценарии применения

  • сравнение весов DPO-снимка с родительской SFT-моделью
  • анализ влияния ошибочного распределения обучающих данных на DPO
  • исследование изменений предпочтений модели на математических ответах

Ограничения

Это не модель для развёртывания или использования как математического помощника: оценки на бенчмарках нет, а математические способности ожидаются слабыми. Обучение прошло с ошибкой распределения данных и постоянной скоростью обучения; fp16 не поддерживается, настройки безопасности отсутствуют.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

nano-mistral-o1-dpo-arm-a-halfepoch-salvage

This is an incident record. It holds the weights of the first, aborted DPO "Arm A" run of the nano-mistral-o1 project. A data-sharding bug meant all four GPUs trained on the same preference pair at every micro-step. The weights were kept for forensics, not as a result. The recorded Arm A result is viai957/nano-mistral-o1-dpo-arm-a.

Correction to earlier descriptions. The previous version of this card, and the project's docs/RESULTS.md entry of 2026-08-20, say these weights are the "step-146 / half-epoch" state because the learning rate was 0 after step 146. The run's own history.jsonl contradicts that: (a) the logged LR is never 0 (it is 4.29e-7 at step 147 and 6.39e-8 at step 425); (b) the trainer's scheduler horizon was 549 steps, not 146; (c) 616 preference pairs that were seen twice, both times after step 146, had their chosen-completion log-prob rise between visits by a mean of +2.65 nats (98.4% of them rose, none stayed the same). The checkpoint is the optimizer-step-425 state (micro-step 3,400), after about 1.55 epochs of the 2,193-pair training split. The repo name is kept for link stability. Details are in Section 7.

1. TL;DR product sheet

FieldValue
What it isFull-parameter DPO checkpoint of Mistral-7B-v0.3 (bf16, 7.25B params, one 14.5 GB safetensors file), saved from a run halted by hand after a sharding bug
Parentviai957/nano-mistral-o1-sft (SFT checkpoint micro_00002250), which descends from mistralai/Mistral-7B-v0.3
MethodDPO, sigmoid loss, β = 0.1, no NLL or DPOP term, frozen-SFT reference log-probs precomputed
Dataargilla/distilabel-math-preference-dpo: 2,418 raw → 2,310 after filtering → 2,193 train / 117 held-out pairs
What it actually trained on3,400 pair-visits, 8 unique pairs per optimizer step (32 intended), 425 optimizer steps, about 1.55 epochs
Learning rate actually appliedconstant 5e-7 (the trainer logged a warmup-cosine schedule but never applied it; see Section 4)
Compute4 × 23 GB NVIDIA GPUs with FSDP2, AdamW 8-bit, Triton FA2 attention. The project put the post-step-146 portion alone at about 24 GPU-hours. Total wall-clock was not logged.
BenchmarksNot measured. No GSM8K, MATH-500 or held-out preference evaluation was run on this checkpoint.
Training-set signalPreference accuracy on first visits (pairs not yet trained on) was 0.546 [0.525, 0.567], n = 2,193. On re-visits it was 0.944 [0.929, 0.955], n = 1,207. That pattern is memorisation, not generalisation.
StatusSuperseded. Kept only to document the incident.

2. Model details and mechanism

  • Architecture: MistralForCausalLM. 32 layers, hidden size 4096, FFN 14336, 32 query heads and 8 KV heads (GQA), head_dim 128, RoPE θ = 1e6, vocab 32,768, no sliding window, untied embeddings. The config was written by transformers 5.15.0. Weights are bf16. Do not run in fp16.
  • Tokenizer: the Mistral-7B-v0.3 tokenizer ([INST]/[/INST] template) as saved with the parent SFT.
  • Training framework: the in-repo nmo trainer of nano-mistral-o1. It uses FSDP2 with 32 per-block units and does not use TRL or DeepSpeed.

How the bug worked

flowchart TD
    B[mistralai/Mistral-7B-v0.3] -->|SFT, 1 epoch, PRM800K-derived corpus| S[nano-mistral-o1-sft<br/>micro_00002250]
    S -->|frozen| REF[(Reference log-probs<br/>precomputed, 2,193 + 117 pairs)]
    S -->|init| P[Policy]
    D[argilla distilabel-math-preference-dpo<br/>2,193 train pairs] --> SMP[LengthGroupedSampler<br/>NOT rank-sharded]
    SMP -->|same pair| R0[rank 0]
    SMP -->|same pair| R1[rank 1]
    SMP -->|same pair| R2[rank 2]
    SMP -->|same pair| R3[rank 3]
    R0 & R1 & R2 & R3 -->|identical grads, all-reduce mean| ACC[grad-accum 8<br/>= 8 unique pairs / step<br/>intended 32]
    REF --> L[sigmoid DPO loss, beta = 0.1]
    P --> L --> ACC --> OPT[AdamW8bit, lr 5e-7 constant<br/>scheduler value logged, not applied]
    OPT --> P
    OPT -->|save every 100 micro-steps| CK[micro_00003400<br/>optimizer step 425<br/>= this repo]

In the code used for this run (nmo/train/dpo_stage.py::make_preference_sampler at 6a55cea), every rank got the bare LengthGroupedSampler. So all four ranks walked the same batch list in the same order. The logs confirm this: in all 3,470 logged micro-steps, the four rank rows carry the same batch pair-id.

3. Training data

ItemValue
Sourceargilla/distilabel-math-preference-dpo, revision 440a59870da94a4c252c8f0031e7412cd1dfe3f2
LicenceApache-2.0 container. The project's research corpus flagged a possible OpenAI-output licence restriction on the responses, and the owner accepted that risk in a dated decision (2026-08-22, docs/RESULTS.md).
Pair typeOne preferred and one rejected full solution per math prompt (response-level, not step-level)
Raw → filtered2,418 → 2,310 (decontamination plus token-boundary certification), max_len 2048
DecontaminationChecked against 1,819 eval hashes (MATH-500 500 + GSM8K test 1,319). 0 contaminated pairs.
SplitHeld-out fraction 0.05, seed 0: 2,193 train / 117 held-out
Train shardarm_a-train-0000, 2,193 rows, 872,580 tokens, content hash 9db20954e6cc29660b58691e3cf83003
Length baselineChosen response is the longer one in 54.89% of pairs (mean 1,278 vs 1,232 characters). This baseline feeds the length-drift tripwire.
Reference log-probsPrecomputed from the frozen SFT model. The path-bias check fired (max abs Δ 1.317 against a 0.025 threshold, n = 100), so the cache was rebuilt with the same FSDP2-sharded forward pass used in training.

4. Training procedure

Objective

The loss is standard sigmoid DPO (Rafailov et al., 2023). Sequence log-probs are summed over completion tokens:

$$ \mathcal{L}{\text{DPO}}(\theta) = -,\mathbb{E}{(x,y_w,y_l)}\left[\log\sigma\Big(\beta\big[(\log\pi_\theta(y_w|x)-\log\pi_{\text{ref}}(y_w|x)) - (\log\pi_\theta(y_l|x)-\log\pi_{\text{ref}}(y_l|x))\big]\Big)\right],\quad \beta = 0.1 $$

The NLL coefficient is 0 for the whole run. The DPOP term (λ = 50) was configured only as a tripwire response and never activated. The logged quantities are rewards/chosen $=\beta(\log\pi_\theta(y_w|x)-\log\pi_{\text{ref}}(y_w|x))$, the same for rejected, rewards/margins = chosen minus rejected, and rewards/accuracies $=\mathbb{1}[\text{margin}>0]$.

What the optimizer actually computed. With micro-batch 1, gradient accumulation 8 and world size 4, each step should average $32$ distinct pairs. Because all ranks saw the same pair, each step was

$$ g_t = \frac{1}{8}\sum_{i=1}^{8}\nabla_\theta \ell(x_i, y_{w,i}, y_{l,i}) $$

and the all-reduce averaged four copies of the same gradient. In effect this is a batch-8 DPO run that cost four times the compute.

Learning rate: logged versus applied

  • Logged: linear warmup over 16 steps to 5e-7, then cosine decay. The schedule inverted from the logged LR has a horizon of 549 optimizer steps, which matches the trainer's horizon computation $\lceil 2 \times 2193 / 8 \rceil$ for each rank's unsharded stream. The 146 in the launch banner came from a different formula, $2\lceil 2310/32\rceil$, that assumed sharding. The two numbers were never compared at launch; that check was added as a launch refusal in c7d3ab4.
  • Applied: in the trainer code used for this run (nmo/train/trainer.py at 6a55cea), the scheduler is stepped and logged but its value is never written to optimizer.param_groups. The optimizer therefore ran at its construction LR, 5e-7, from step 1 with no warmup and no decay. The project found this on 2026-10-12, and it affects every nano-mistral-o1 run on this trainer. It is fixed only in the successor align trainer.

Hyperparameters

HyperparameterValueSource
Init / referenceSFT micro_00002250 (quality gate passed 2026-08-18)checkpoints/sft/sft_quality_gate.json
VariantDPO sigmoid, β = 0.1configs/dpo_argilla.yaml @ 23b6f3f
LR (applied)5e-7 constantconfig + trainer code
LR (logged)warmup 16 → cosine, horizon 549history.jsonl
Micro-batch × accum × world1 × 8 × 4 (intended global batch 32, effective 8 unique pairs)config + history.jsonl
Epochs configured2config
Optimizerbitsandbytes AdamW8bit (shard-local), betas (0.9, 0.95), wd 0, eps 1e-8scripts/dpo.py, nmo/config.py @ 6a55cea
Gradient clippingnone (no clipping existed in this trainer)docs/audits/phase1_postmortem.md
Precision / attentionbf16 / in-repo Triton FA2 (parity-gated)config, docs/RESULTS.md 2026-08-17 entry
ShardingFSDP2, 32 per-block units, bf16 params, fp32 reduceruns/precompute_arm_a_sharded.log
Save cadenceevery 100 micro-steps, keep 2config
Armed tripwireslogps_chosen, length_drift (band ±0.10 around 0.5489). Tripwire alarms are written only to the end-of-run summary, which this hand-halted run never produced, so whether either tripwire fired is not recorded. The trainer at 6a55cea does not halt on an alarm.config, nmo trainer @ 6a55cea
Steps run3,470 micro / 433 optimizer (halted by hand); checkpoint at 3,400 / 425history.jsonl
Tokens processed to checkpoint2,067,664 (sum of logged n_tokens)history.jsonl

Compute

The run used 4 × 23 GB NVIDIA GPUs on one host. Project documents from that time say A10G; a host audit on 2026-10-25 found 4 × L4. docs/RESULTS.md puts the post-step-146 stretch (steps 147–433) at about 24 GPU-hours. history.jsonl has no timestamps, so total wall-clock is not available.

5. Training curves

All curves are parsed from receipts/history.jsonl in this repo, which is the same file as local runs/dpo_arm_a_halfepoch_salvage/history.jsonl. Only the last continuous launch segment is used (file lines 413–14,292). The earlier lines come from a micro-batch-2 attempt that ran out of memory and an attempt that died at micro-step 100. Where those overlap the final segment, they match row for row. Every micro-step has four rank rows with the same pair, so one row per micro-step is plotted. All metrics are training-set metrics. Plot script: _build/analyze.py.

DPO core curves Figure 1. Loss, reward margin, preference accuracy and per-token NLL of the chosen response per micro-step (light) with a 100-step rolling mean (bold). Dashed line: optimizer step 146. Dotted line: end of epoch 1 (micro-step 2,193, where the last new pair appears). Solid line: the saved checkpoint. During epoch 1 every pair is new and accuracy stays near chance. It jumps to about 0.94 exactly when pairs start repeating. Source: history.jsonl fields loss, rewards/margins, rewards/accuracies, nll/chosen.

Log-probs and rewards Figure 2. Left: summed policy log-probs of chosen and rejected completions (100-step rolling mean; the mean moves with the pair mix). Right: implicit rewards. The mean chosen reward is 0.227 over epoch 1 and 0.572 over epoch 2 up to the checkpoint; the rejected reward is 0.213 and 0.282 over the same windows. The run did not collapse the chosen likelihood. Source: history.jsonl fields logps/* and rewards/chosen|rejected.

LR and grad norm Figure 3. Left: the logged LR (scheduler value) against the 5e-7 actually applied. The logged LR is never 0. Right: pre-step gradient norm per optimizer step, taken as the median of the four logged rank values. Median over steps 116.6, max of the plotted median 196.9 at step 86 (largest single-rank value 207.5), no clipping. Source: history.jsonl fields lr and grad_norm.

Revisit test Figure 4. Change in logps/chosen between a pair's first and second visit, for the 616 pairs whose two visits both came after optimizer step 146. Mean +2.65 nats, median +2.40, 98.4% positive, 0 unchanged. If the weights had been frozen after step 146 these would all be exactly 0. Source: history.jsonl (batch, optimizer_step, logps/chosen).

Salvage vs rerun Figure 5. This run against the recorded, correctly sharded Arm A rerun on the same data, plotted against epochs consumed. Both curves are rolling means over about 200 pairs. Both runs jump in margin when epoch 2 begins. With four times as many optimizer steps per epoch, the unsharded run reaches a higher train margin. Sources: runs/dpo_arm_a_halfepoch_salvage/history.jsonl and the final-launch segment of runs/dpo_arm_a/history.jsonl (lines 15,493–17,684).

6. Evaluation

EvaluationThis checkpointReference
GSM8K test (n = 1,319) pass@1not measuredparent SFT 0.2047 [0.1838, 0.2273] (outputs/eval/sft-final.json)
MATH-500 (n = 500) pass@1not measuredparent SFT 0.084 [0.0627, 0.1116]
Held-out preference accuracy (n = 117)not measuredrecorded Arm A rerun 0.556 [0.465, 0.642], 65/117 (runs/dpo_arm_a/arm_result.json)
Train-set preference accuracy on first visits, steps 1–146 (micro 1–1,168)0.544 [0.515, 0.572], 635/1,168—
Train-set preference accuracy on first visits, all of epoch 10.546 [0.525, 0.567], 1,197/2,193—
Train-set preference accuracy on re-visits, epoch 2 up to the checkpoint0.944 [0.929, 0.955], 1,139/1,207—

Intervals are Wilson 95%. A first-visit accuracy is computed in the forward pass before that pair's own gradient is applied, so it works as a rough generalisation estimate on unseen pairs. It agrees with the rerun's held-out 0.556. There is no hill-climbing chart because this was a single run with no iterations.

7. Results discussion and lessons

  1. The sharding bug was silent. The loss curve looked plausible, and the configured global batch was 32 (config global_batch: 32; the config comment gives a 146-step horizon), the values the launch banner is computed from. Tripwire alarms are written only to the end-of-run summary, which this hand-halted run never produced, so whether a tripwire fired is not recorded. The bug was found by checking the batch identities across ranks in history.jsonl. The fixes, in commit c7d3ab4, are a rank-sharded sampler, a hard stop at the scheduler horizon, and a refusal to launch when the banner horizon and the trainer horizon disagree.
  2. The first explanation of the incident was wrong as well. The 2026-08-20 entry said the run became a "weights-frozen zombie" after step 146. It used the banner's 146-step horizon and assumed the trainer's cosine schedule reached zero there. The trainer's own horizon was 549, the logged LR stayed positive, and in any case the scheduler LR was never applied (Section 4). Figure 4 shows directly that the weights kept changing. The roughly 24 GPU-hours after step 146 did train the model, at batch 8, through about one more epoch.
  3. Re-visiting pairs produces memorisation, not preference learning. On first visits, train accuracy stayed at about 0.55, close to the rerun's held-out 0.556 and barely above chance. Once pairs repeated, accuracy jumped to about 0.94 and the margin rose from about 0.01 to about 0.29. That shows the model fitting pairs it has already seen. Treat any train-set preference accuracy from epoch ≥ 2 as uninformative.
  4. Logged training metrics can be wrong. The logged LR was a schedule that was never applied. The lesson the project drew: check what the optimizer actually used (param_groups), not only what the scheduler reports.
  5. For the overall phase-1 picture: response-level DPO on Arm A was null on held-out preference accuracy, as pre-registered. The project's later diagnostic found vanilla step-level DPO (Arm B primary) was also null on GSM8K (0.2108 against SFT 0.2047, p = 0.63). See the sibling cards.

8. Intended use, limitations, risks

  • Intended use: forensic and interpretability work on what an under-sharded, batch-8 DPO run does to a 7B SFT model, for example weight-diff comparisons against the SFT parent and the recorded Arm A rerun. Not for deployment, and not as a math assistant.
  • Limitations: no benchmark evaluation exists. Training ran at a constant LR with no warmup. It saw about 1.55 epochs at an effective batch of 8, against a pre-registration of 2 epochs at batch 32. The parent SFT scores only 0.2047 on GSM8K, so expect weak math ability.
  • Risks: the preference data may carry OpenAI-output terms (see Section 3). The model has no safety tuning. Outputs can be wrong with full confidence. Running in fp16 is unsupported and may produce NaNs.

9. Reproducibility

ItemValue
Code (local repo nano-mistral-o1)Last commit before launch: 6a55cea3cd550ede274af4583531f027ee6252f8. The exact launch commit is not recorded in the receipts.
Configconfigs/dpo_argilla.yaml as of 23b6f3fafd4af83164bd30419bd480b1d0422be4 (unchanged since b933602)
Incident recorddocs/RESULTS.md dated entry 2026-08-20, commit 23b6f3f
Fixc7d3ab47265ab40748232c24aa158b5d25435e86
HF upload commitdb2e54d08eea1d0eb652ff8cf514c1f328c457c0. Upload receipt runs/dpo_arm_a_halfepoch_salvage/checkpoints/micro_00003400.hf.json holds the sha256 of every file. model.safetensors sha256 is e1a1bd3dba5b2f632b6924d25773de354167ba16abff8a4e42be2d3ef04503d4.
Launch (as run, buggy)torchrun --nproc_per_node=4 scripts/dpo.py configs/dpo_argilla.yaml at 6a55cea. Do not rerun this; it reproduces the bug.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "viai957/nano-mistral-o1-dpo-arm-a-halfepoch-salvage"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="bfloat16")
# restore into the original repo layout
hf download viai957/nano-mistral-o1-dpo-arm-a-halfepoch-salvage \
  --revision db2e54d08eea1d0eb652ff8cf514c1f328c457c0 \
  --local-dir runs/dpo_arm_a_halfepoch_salvage/checkpoints/micro_00003400 \
  --exclude 'receipts/*' --exclude README.md

Each number in this card is mapped to its source file and field in evidence.json. That file travels with the card build but is not uploaded with the weights.

10. Related repos, licence, citation

nano-mistral-o1 family

Licence and attribution. The weights are released under Apache-2.0, following the base model mistralai/Mistral-7B-v0.3 (Apache-2.0). The preference data is argilla/distilabel-math-preference-dpo (Apache-2.0 container; see the note in Section 3). DPO is from Rafailov et al. (2023).

@misc{nanomistralo1_dpo_arm_a_salvage_2026,
  title        = {nano-mistral-o1 DPO Arm A half-epoch salvage: an unsharded-sampler incident record},
  author       = {viai957},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/viai957/nano-mistral-o1-dpo-arm-a-halfepoch-salvage}},
  note         = {Revision db2e54d08eea1d0eb652ff8cf514c1f328c457c0}
}
@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 = {Advances in Neural Information Processing Systems},
  year      = {2023}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
MistralForCausalLM
Ревизия весов
fd4ac63

0 моделей