Rahspide commited on
Commit
c5a2f76
·
verified ·
1 Parent(s): ab38849

docs: released v1, recipe as run, GGUF, spot-check

Browse files
Files changed (1) hide show
  1. README.md +30 -11
README.md CHANGED
@@ -22,8 +22,8 @@ tags:
22
 
23
  # MNN-Pocket-0.3B-RU-Chat (planned)
24
 
25
- > **Status: not trained yet.** This card is the plan for the second product; no weights exist.
26
- > When training finishes this banner and the numbers below will be replaced.
27
 
28
  Russian instruction-following assistant, built by SFT on top of
29
  [`Rahspide/MNN-Pocket-0.3B-RU`](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU).
@@ -54,33 +54,52 @@ model means Russian is already paid for, and SFT only has to teach the dialogue
54
  A control run on the official `taobao-mnn/MNN-Pocket-0.3B` with the same SFT data is planned, so that
55
  "we lost the assistant in pretraining" can be told apart from "there was no assistant to lose".
56
 
57
- ## Planned recipe
58
 
59
- - Start point: `Rahspide/MNN-Pocket-0.3B-RU` (or its final checkpoint).
60
  - Chat template: the model's own ChatML (`<|im_start|>` / `<|im_end|>`), untouched.
61
  - Loss only on assistant tokens; system and user turns are masked context.
62
  - Multi-turn dialogue kept as one example; packing with explicit boundaries.
63
- - Three data volumes tried (≈5k / 20k / 50k examples) with early stopping on a held-out Russian split;
64
- one epoch per checkpoint kept, best picked on the held-out split rather than on the training loss.
65
  - 10–20% English instruction replay from `HuggingFaceH4/ultrachat_200k` to keep bilingual instruction
66
  following; the exact share is tuned on an English sanity set.
67
- - Learning-rate grid 1e-4 … 3e-4, full fine-tuning; LoRA is the fallback if full FT cannot fit.
68
 
69
- ## Planned data
70
 
71
  | Dataset | Role | Licence |
72
  |---|---|---|
73
  | `IlyaGusev/saiga_scored` | core Russian instructions with quality scores | see dataset card |
74
  | `IlyaGusev/ru_turbo_alpaca` | volume filler | CC-BY-4.0 |
75
- | `HuggingFaceH4/ultrachat_200k` | English replay, 10–20% | MIT |
76
 
77
  Rules: deduplicate by normalised text, drop examples shorter than ~16 tokens, exclude any dataset whose
78
  licence forbids redistribution of derivatives, and check for leakage into MERA test sets.
79
 
80
- ## Planned evaluation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  - Blind manual review of 50–100 Russian dialogues: instruction following, naturalness, correct refusal,
83
- 2–3 turn coherence.
84
  - Selective MERA tasks that fit a 0.3B model's format and context — not the aggregate score.
85
  - No regression against the continuation sister on Russian bits/char, and no collapse of English answers.
86
 
 
22
 
23
  # MNN-Pocket-0.3B-RU-Chat (planned)
24
 
25
+ > **Status: v1 released.** Instruction-tuned on 50M tokens (18.8M Russian + 6M English replay) on one
26
+ > Kaggle T4 in ~6.5 h. Weights and GGUF builds are in this repository.
27
 
28
  Russian instruction-following assistant, built by SFT on top of
29
  [`Rahspide/MNN-Pocket-0.3B-RU`](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU).
 
54
  A control run on the official `taobao-mnn/MNN-Pocket-0.3B` with the same SFT data is planned, so that
55
  "we lost the assistant in pretraining" can be told apart from "there was no assistant to lose".
56
 
57
+ ## Recipe (as run)
58
 
59
+ - Start point: `Rahspide/MNN-Pocket-0.3B-RU` (step 36,621).
60
  - Chat template: the model's own ChatML (`<|im_start|>` / `<|im_end|>`), untouched.
61
  - Loss only on assistant tokens; system and user turns are masked context.
62
  - Multi-turn dialogue kept as one example; packing with explicit boundaries.
63
+ - One run at 50M tokens (1,525 optimizer steps, 32k tokens each), checkpoints every 300 steps.
 
64
  - 10–20% English instruction replay from `HuggingFaceH4/ultrachat_200k` to keep bilingual instruction
65
  following; the exact share is tuned on an English sanity set.
66
+ - lr 1e-4, cosine, 5% warmup, full fine-tuning, fp16 autocast on T4 with fp32 master weights.
67
 
68
+ ## Data (as used)
69
 
70
  | Dataset | Role | Licence |
71
  |---|---|---|
72
  | `IlyaGusev/saiga_scored` | core Russian instructions with quality scores | see dataset card |
73
  | `IlyaGusev/ru_turbo_alpaca` | volume filler | CC-BY-4.0 |
74
+ | `HuggingFaceH4/ultrachat_200k` | English replay, 15% of tokens (6M) | MIT |
75
 
76
  Rules: deduplicate by normalised text, drop examples shorter than ~16 tokens, exclude any dataset whose
77
  licence forbids redistribution of derivatives, and check for leakage into MERA test sets.
78
 
79
+ ## Quality spot-check
80
+
81
+ Greedy generation, Q4_K_M, CPU:
82
+
83
+ | Prompt | Answer |
84
+ |---|---|
85
+ | «Объясни в двух предложениях, что такое инфляция.» | «Инфляция — это процесс роста цен на товары и услуги в стране или за ее пределами. Этот процесс может привести к у…» |
86
+ | «Напиши короткое поздравление с днём рождения коллеге.» | «Дорогой [Имя], С днём рождения! Желаю, чтобы ваша работа была не только эффективной, но и приятной для глаз…» |
87
+ | «Привет! Как дела?» | повторяет вопрос — ожидаемое слабое место 0.3B на коротких репликах |
88
+
89
+ ## GGUF builds
90
+
91
+ | File | Size | Note |
92
+ |---|---|---|
93
+ | `gguf/MNN-Pocket-0.3B-RU-Chat-Q8_0.gguf` | 310 MB | near-lossless |
94
+ | `gguf/MNN-Pocket-0.3B-RU-Chat-Q4_K_M.gguf` | 223 MB | phone size |
95
+
96
+ ~63 tok/s generation on a 16-thread CPU, no GPU. Use the model's own ChatML template (`--jinja` in
97
+ llama.cpp); without it the model continues text instead of answering.
98
+
99
+ ## Evaluation (to do)
100
 
101
  - Blind manual review of 50–100 Russian dialogues: instruction following, naturalness, correct refusal,
102
+ 2–3 turn coherence. **Not run yet** — the spot-check above is qualitative only.
103
  - Selective MERA tasks that fit a 0.3B model's format and context — not the aggregate score.
104
  - No regression against the continuation sister on Russian bits/char, and no collapse of English answers.
105