Update README.md
Browse files
README.md
CHANGED
|
@@ -18,7 +18,7 @@ tags:
|
|
| 18 |
|
| 19 |
[English](./README.md) · [Français](./README_fr.md) · [简体中文](./README_zh.md)
|
| 20 |
|
| 21 |
-
Native **MiniMind PyTorch (`.pth`) checkpoints** trained and evaluated on **Windows with AMD ROCm**, using an **AMD Radeon RX 7800 XT**. This repository contains the retained Dense baselines and the completed Mixture-of-Experts (MoE) Pretrain and Full SFT checkpoints.
|
| 22 |
|
| 23 |
- **Source code and ROCm adaptation:** [Driw0x/minimind](https://github.com/Driw0x/minimind)
|
| 24 |
- **Original MiniMind project:** [jingyaogong/minimind](https://github.com/jingyaogong/minimind)
|
|
@@ -36,8 +36,11 @@ Native **MiniMind PyTorch (`.pth`) checkpoints** trained and evaluated on **Wind
|
|
| 36 |
| `full_sft_768.pth` | Dense | Full SFT, initialized from Dense Full Pretrain | `sft_t2t.jsonl` |
|
| 37 |
| `pretrain_768_moe.pth` | MoE | Full Pretrain | `pretrain_t2t.jsonl` |
|
| 38 |
| `full_sft_768_moe.pth` | MoE | Full SFT, initialized from MoE Full Pretrain | `sft_t2t.jsonl` |
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
The two MoE checkpoint files measured **387.88 MiB each** in the local audit. Their presence in this table does not by itself confirm that they have been uploaded to the Hub: upload the corresponding `.pth` files together with these updated cards.
|
| 41 |
|
| 42 |
### Model configuration
|
| 43 |
|
|
@@ -53,9 +56,9 @@ The two MoE checkpoint files measured **387.88 MiB each** in the local audit. Th
|
|
| 53 |
|
| 54 |
The active-parameter count is not a measured FLOP count or proof of identical inference cost. The model's MoE feed-forward layers include an auxiliary router-balancing objective during training.
|
| 55 |
|
| 56 |
-
## Evaluation — October 27, 2026
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
**Local reference losses:** `seed=42`, 256 randomly selected records each from `pretrain_t2t_mini.jsonl` and `sft_t2t_mini.jsonl`, identical reference datasets for Dense and MoE. The full checkpoints themselves were trained on `pretrain_t2t.jsonl` and `sft_t2t.jsonl`. Perplexity (PPL) is `exp(loss)`.
|
| 61 |
|
|
@@ -64,18 +67,24 @@ All four **full-dataset** checkpoints were compared using the existing [`scripts
|
|
| 64 |
| Dense Mini Pretrain | 1.8275 | 6.22 | 2.5207 | 12.44 | 0.795 |
|
| 65 |
| Dense Mini Full SFT | 1.9992 | 7.38 | 1.5663 | 4.79 | 0.361 |
|
| 66 |
| Dense Full Pretrain | 1.6372 | 5.14 | 2.8685 | 17.61 | Not retained as reliable |
|
| 67 |
-
| Dense Full SFT | 1.8730 | 6.51 | 1.3771 | 3.96 |
|
| 68 |
| MoE Full Pretrain | **1.5468** | **4.70** | **2.1544** | **8.62** | 0.842* |
|
| 69 |
| MoE Full SFT | **1.7544** | **5.78** | **1.2994** | **3.67** | 0.262 |
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
**What these results show:** The MoE Full Pretrain checkpoint has lower Pretrain reference loss than the Dense Full Pretrain checkpoint (1.5468 vs 1.6372); the MoE Full SFT checkpoint has lower SFT reference loss than the Dense Full SFT checkpoint (1.2994 vs 1.3771). For MoE, SFT lowers SFT reference loss from 2.1544 to 1.2994 while raising Pretrain reference loss from 1.5468 to 1.7544.
|
| 72 |
|
|
|
|
|
|
|
| 73 |
**Important limitations of the metrics:**
|
| 74 |
|
| 75 |
- These reference samples come from the **training datasets**. The losses reflect training-distribution fit; they are **not** held-out generalization results.
|
| 76 |
- External repetition is the mean repeated-character **3-gram ratio** over eight separate prompts, with deterministic greedy decoding and `max_new_tokens=256`. Lower means less repetition, **not** higher factual correctness. Historical Mini results are from the same diagnostic family.
|
| 77 |
- `*` The Pretrain external benchmark uses a chat-formatted prompt in `diagnose_validation.py`, whereas upstream `eval_llm.py` uses `BOS + prompt` for Pretrain. The MoE Pretrain repetition figure (0.842) must be treated cautiously; the Dense Full Pretrain aggregate was not retained as reliable.
|
| 78 |
- The **MoE Full SFT repetition score (0.262) is slightly worse than the Dense Full SFT score (0.244)** on this particular benchmark. Lower loss does not imply better generated answers.
|
|
|
|
| 79 |
|
| 80 |
### Qualitative findings
|
| 81 |
|
|
@@ -88,6 +97,8 @@ Both MoE checkpoints loaded and generated responses on the eight built-in upstre
|
|
| 88 |
|
| 89 |
These models are **educational and experimental**, not reliable general-purpose assistants. No broad claim of MoE superiority in reasoning, correctness, or generalization is supported by these tests.
|
| 90 |
|
|
|
|
|
|
|
| 91 |
## Download and run (native MiniMind)
|
| 92 |
|
| 93 |
From PowerShell on a compatible PyTorch/ROCm installation:
|
|
@@ -116,7 +127,7 @@ python -m scripts.diagnose_validation --weights pretrain full_sft --mode full --
|
|
| 116 |
|
| 117 |
## Intended use and provenance
|
| 118 |
|
| 119 |
-
These checkpoints demonstrate a
|
| 120 |
|
| 121 |
For implementation, training commands and additional results, see the [GitHub README](https://github.com/Driw0x/minimind), [training commands](https://github.com/Driw0x/minimind/blob/master/docs/training_commands.md), and [generation-quality report](https://github.com/Driw0x/minimind/blob/master/docs/generation_quality.md).
|
| 122 |
|
|
|
|
| 18 |
|
| 19 |
[English](./README.md) · [Français](./README_fr.md) · [简体中文](./README_zh.md)
|
| 20 |
|
| 21 |
+
Native **MiniMind PyTorch (`.pth`) checkpoints** trained and evaluated on **Windows with AMD ROCm**, using an **AMD Radeon RX 7800 XT**. This repository contains the retained Dense baselines and the completed Mixture-of-Experts (MoE) Pretrain and Full SFT checkpoints. Subsequent LoRA, DPO, and distillation experiments are documented below.
|
| 22 |
|
| 23 |
- **Source code and ROCm adaptation:** [Driw0x/minimind](https://github.com/Driw0x/minimind)
|
| 24 |
- **Original MiniMind project:** [jingyaogong/minimind](https://github.com/jingyaogong/minimind)
|
|
|
|
| 36 |
| `full_sft_768.pth` | Dense | Full SFT, initialized from Dense Full Pretrain | `sft_t2t.jsonl` |
|
| 37 |
| `pretrain_768_moe.pth` | MoE | Full Pretrain | `pretrain_t2t.jsonl` |
|
| 38 |
| `full_sft_768_moe.pth` | MoE | Full SFT, initialized from MoE Full Pretrain | `sft_t2t.jsonl` |
|
| 39 |
+
| `lora_medical_768.pth` | Dense LoRA adapter | LoRA on Dense Full SFT | `lora_medical.jsonl` |
|
| 40 |
+
| `dpo_768.pth` | Dense | DPO, initialized from Dense Full SFT | `dpo.jsonl` |
|
| 41 |
+
| `full_dist_768.pth` | Dense student / MoE teacher | Distillation from MoE Full SFT, initialized from Dense Full SFT | `sft_t2t.jsonl` |
|
| 42 |
|
| 43 |
+
The two MoE checkpoint files measured **387.88 MiB each** in the local audit. Their presence in this table does not by itself confirm that they have been uploaded to the Hub: upload the corresponding `.pth` files together with these updated cards. The LoRA, DPO, and distillation files were also evaluated locally; their Hub availability must be checked separately.
|
| 44 |
|
| 45 |
### Model configuration
|
| 46 |
|
|
|
|
| 56 |
|
| 57 |
The active-parameter count is not a measured FLOP count or proof of identical inference cost. The model's MoE feed-forward layers include an auxiliary router-balancing objective during training.
|
| 58 |
|
| 59 |
+
## Evaluation — October 27 and November 24, 2026
|
| 60 |
|
| 61 |
+
The original four **full-dataset** Pretrain/Full SFT checkpoints were compared using the existing [`scripts/diagnose_validation.py`](https://github.com/Driw0x/minimind/blob/master/scripts/diagnose_validation.py) protocol on October 27. The two historical Mini checkpoints are included as references. LoRA, DPO, and distillation were evaluated with the same diagnostics on November 24.
|
| 62 |
|
| 63 |
**Local reference losses:** `seed=42`, 256 randomly selected records each from `pretrain_t2t_mini.jsonl` and `sft_t2t_mini.jsonl`, identical reference datasets for Dense and MoE. The full checkpoints themselves were trained on `pretrain_t2t.jsonl` and `sft_t2t.jsonl`. Perplexity (PPL) is `exp(loss)`.
|
| 64 |
|
|
|
|
| 67 |
| Dense Mini Pretrain | 1.8275 | 6.22 | 2.5207 | 12.44 | 0.795 |
|
| 68 |
| Dense Mini Full SFT | 1.9992 | 7.38 | 1.5663 | 4.79 | 0.361 |
|
| 69 |
| Dense Full Pretrain | 1.6372 | 5.14 | 2.8685 | 17.61 | Not retained as reliable |
|
| 70 |
+
| Dense Full SFT | 1.8730 | 6.51 | 1.3771 | 3.96 | 0.244 |
|
| 71 |
| MoE Full Pretrain | **1.5468** | **4.70** | **2.1544** | **8.62** | 0.842* |
|
| 72 |
| MoE Full SFT | **1.7544** | **5.78** | **1.2994** | **3.67** | 0.262 |
|
| 73 |
+
| Dense Full SFT + LoRA (merged) | 1.9250 | 6.86 | 1.4830 | 4.41 | 0.451 |
|
| 74 |
+
| Dense DPO | 1.8730 | 6.51 | 1.3772 | 3.96 | 0.237 |
|
| 75 |
+
| Dense distilled student | 1.9377 | 6.94 | 1.3698 | 3.93 | **0.218** |
|
| 76 |
|
| 77 |
**What these results show:** The MoE Full Pretrain checkpoint has lower Pretrain reference loss than the Dense Full Pretrain checkpoint (1.5468 vs 1.6372); the MoE Full SFT checkpoint has lower SFT reference loss than the Dense Full SFT checkpoint (1.2994 vs 1.3771). For MoE, SFT lowers SFT reference loss from 2.1544 to 1.2994 while raising Pretrain reference loss from 1.5468 to 1.7544.
|
| 78 |
|
| 79 |
+
**November 24 follow-up:** Relative to Dense Full SFT, merged LoRA has higher Pretrain/SFT reference losses (1.9250/1.4830) and repetition (0.451). DPO has essentially unchanged reference losses (1.8730/1.3772) and slightly lower repetition (0.237). The distilled Dense student has slightly lower SFT loss (1.3698 vs 1.3771) and repetition (0.218 vs 0.244), but higher Pretrain loss (1.9377 vs 1.8730). The MoE Full SFT teacher remains at 1.2994 SFT loss and 0.262 repetition on the same protocol.
|
| 80 |
+
|
| 81 |
**Important limitations of the metrics:**
|
| 82 |
|
| 83 |
- These reference samples come from the **training datasets**. The losses reflect training-distribution fit; they are **not** held-out generalization results.
|
| 84 |
- External repetition is the mean repeated-character **3-gram ratio** over eight separate prompts, with deterministic greedy decoding and `max_new_tokens=256`. Lower means less repetition, **not** higher factual correctness. Historical Mini results are from the same diagnostic family.
|
| 85 |
- `*` The Pretrain external benchmark uses a chat-formatted prompt in `diagnose_validation.py`, whereas upstream `eval_llm.py` uses `BOS + prompt` for Pretrain. The MoE Pretrain repetition figure (0.842) must be treated cautiously; the Dense Full Pretrain aggregate was not retained as reliable.
|
| 86 |
- The **MoE Full SFT repetition score (0.262) is slightly worse than the Dense Full SFT score (0.244)** on this particular benchmark. Lower loss does not imply better generated answers.
|
| 87 |
+
- The LoRA entry uses a **locally merged** `full_sft_lora_medical_768.pth` for evaluation, not the standalone adapter file. These general-language references do not evaluate medical-domain gains. No held-out DPO preference accuracy or win rate, nor teacher–student KL validation, was measured.
|
| 88 |
|
| 89 |
### Qualitative findings
|
| 90 |
|
|
|
|
| 97 |
|
| 98 |
These models are **educational and experimental**, not reliable general-purpose assistants. No broad claim of MoE superiority in reasoning, correctness, or generalization is supported by these tests.
|
| 99 |
|
| 100 |
+
In the newer generations, merged LoRA frequently repeats content (notably on Fibonacci); DPO still fails the exact-three-points constraint and the `add` code fix; the distilled student answers **11** for `12 - 5 + 3` (correct: **10**) and also fails the three-point constraint and code fix. Lower repetition is not proof of correct answers.
|
| 101 |
+
|
| 102 |
## Download and run (native MiniMind)
|
| 103 |
|
| 104 |
From PowerShell on a compatible PyTorch/ROCm installation:
|
|
|
|
| 127 |
|
| 128 |
## Intended use and provenance
|
| 129 |
|
| 130 |
+
These checkpoints demonstrate a small-model training path (Pretrain → Full SFT, plus LoRA, DPO, and MoE-to-Dense distillation), Dense/MoE comparisons, native Windows AMD ROCm execution, checkpoint loading, and explicit evaluation limitations. They are suitable for research, learning, and reproducibility experiments; they are **not validated for high-stakes decisions, factual reliability, or production deployment**.
|
| 131 |
|
| 132 |
For implementation, training commands and additional results, see the [GitHub README](https://github.com/Driw0x/minimind), [training commands](https://github.com/Driw0x/minimind/blob/master/docs/training_commands.md), and [generation-quality report](https://github.com/Driw0x/minimind/blob/master/docs/generation_quality.md).
|
| 133 |
|