Rahspide commited on
Commit
1317cae
·
verified ·
1 Parent(s): f3cb38c

docs: Q4_1 build, MNN sources, corrected parameter count

Browse files
Files changed (1) hide show
  1. README.md +10 -4
README.md CHANGED
@@ -23,7 +23,7 @@ tags:
23
 
24
  ![MNN-Pocket-0.3B-RU — a Russian continuation model on a 0.3B base](assets/cover.png)
25
 
26
- ![params](https://img.shields.io/badge/params-361M-E2543F?style=flat-square)
27
  ![tokens](https://img.shields.io/badge/trained%20on-1.2B%20tokens-5FD3B4?style=flat-square)
28
  ![context](https://img.shields.io/badge/context-32k%20(base)-6FA8FF?style=flat-square)
29
  ![gguf](https://img.shields.io/badge/gguf-Q8__0%20%C2%B7%20Q4__K__M-E2543F?style=flat-square)
@@ -61,7 +61,7 @@ it should continue, and continues when it should answer.
61
 
62
  | | |
63
  |---|---|
64
- | Base | `taobao-mnn/MNN-Pocket-0.3B-Base` (Qwen3 architecture, 303 M non-embedding / 361 M total) |
65
  | Tokenizer | 65,536 tokens, byte-level BPE, `<|endoftext|>` = 65510 |
66
  | Training tokens | 1.2 B — 0.9 B ru + 0.204 B en + 0.096 B zh |
67
  | Method | full fine-tune, 1 epoch, no LoRA |
@@ -91,6 +91,10 @@ was started, got through ~50 M of a planned 200 M tokens, and changed nothing me
91
  (1.337 → 1.337 on the same eval), so it is **not** published. Treat v1 as Russian-first, with working but
92
  measurably weaker English and Chinese.
93
 
 
 
 
 
94
  ## Why the tokenizer shapes the recipe
95
 
96
  ![Russian characters per token, base vs extended vocabulary](assets/tokenizer.png)
@@ -160,6 +164,7 @@ used, so the resulting weights stay publishable.
160
  |---|---|---|---|
161
  | Q8_0 | 310 MB | [`MNN-Pocket-0.3B-RU-Q8_0.gguf`](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU/blob/main/gguf/MNN-Pocket-0.3B-RU-Q8_0.gguf) | near-lossless, for desktop |
162
  | Q4_K_M | 223 MB | [`MNN-Pocket-0.3B-RU-Q4_K_M.gguf`](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU/blob/main/gguf/MNN-Pocket-0.3B-RU-Q4_K_M.gguf) | the size to ship on a phone |
 
163
  | MNN INT4 | 165 MB | [mnn/MNN-Pocket-0.3B-RU-INT4](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU/tree/main/mnn/MNN-Pocket-0.3B-RU-INT4) | MNN runtime, Android |
164
 
165
  Both files sit under `gguf/` with the quant tag in the name, which is what llama.cpp matches on:
@@ -176,9 +181,10 @@ Converted with llama.cpp `convert_hf_to_gguf.py` (f16) and quantised with `llama
176
  | Q4_K_M | ~410 tok/s | **~130 tok/s** |
177
  | Q8_0 | ~525 tok/s | ~99 tok/s |
178
 
179
- Phone figures will be several times lower; these are desktop-CPU numbers.
 
180
 
181
- The MNN build runs through MNN's own runtime. Build `llm_demo` from the MNN repository with
182
  `-DMNN_BUILD_LLM=ON`, then point it at the folder:
183
 
184
  ```bash
 
23
 
24
  ![MNN-Pocket-0.3B-RU — a Russian continuation model on a 0.3B base](assets/cover.png)
25
 
26
+ ![params](https://img.shields.io/badge/params-303M-E2543F?style=flat-square)
27
  ![tokens](https://img.shields.io/badge/trained%20on-1.2B%20tokens-5FD3B4?style=flat-square)
28
  ![context](https://img.shields.io/badge/context-32k%20(base)-6FA8FF?style=flat-square)
29
  ![gguf](https://img.shields.io/badge/gguf-Q8__0%20%C2%B7%20Q4__K__M-E2543F?style=flat-square)
 
61
 
62
  | | |
63
  |---|---|
64
+ | Base | `taobao-mnn/MNN-Pocket-0.3B-Base` (Qwen3 architecture). 302.8 M unique parameters here: 58.7 M embeddings + 244.1 M others. The base file lists 361.5 M because it stores `lm_head` as a separate copy of the tied matrix |
65
  | Tokenizer | 65,536 tokens, byte-level BPE, `<|endoftext|>` = 65510 |
66
  | Training tokens | 1.2 B — 0.9 B ru + 0.204 B en + 0.096 B zh |
67
  | Method | full fine-tune, 1 epoch, no LoRA |
 
91
  (1.337 → 1.337 on the same eval), so it is **not** published. Treat v1 as Russian-first, with working but
92
  measurably weaker English and Chinese.
93
 
94
+ The base vocabulary is itself a pruned set: the [technical report](https://arxiv.org/abs/2611.12311) describes cutting
95
+ Qwen3's ~151 k tokens down to ~64 k by frequency while keeping BPE dependencies and byte fallback. Poor Cyrillic
96
+ coverage is what that pruning cost.
97
+
98
  ## Why the tokenizer shapes the recipe
99
 
100
  ![Russian characters per token, base vs extended vocabulary](assets/tokenizer.png)
 
164
  |---|---|---|---|
165
  | Q8_0 | 310 MB | [`MNN-Pocket-0.3B-RU-Q8_0.gguf`](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU/blob/main/gguf/MNN-Pocket-0.3B-RU-Q8_0.gguf) | near-lossless, for desktop |
166
  | Q4_K_M | 223 MB | [`MNN-Pocket-0.3B-RU-Q4_K_M.gguf`](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU/blob/main/gguf/MNN-Pocket-0.3B-RU-Q4_K_M.gguf) | the size to ship on a phone |
167
+ | Q4_1 | 208 MB | [`MNN-Pocket-0.3B-RU-Q4_1.gguf`](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU-GGUF/blob/main/MNN-Pocket-0.3B-RU-Q4_1.gguf) | fastest generation on CPU |
168
  | MNN INT4 | 165 MB | [mnn/MNN-Pocket-0.3B-RU-INT4](https://huggingface.co/Rahspide/MNN-Pocket-0.3B-RU/tree/main/mnn/MNN-Pocket-0.3B-RU-INT4) | MNN runtime, Android |
169
 
170
  Both files sit under `gguf/` with the quant tag in the name, which is what llama.cpp matches on:
 
181
  | Q4_K_M | ~410 tok/s | **~130 tok/s** |
182
  | Q8_0 | ~525 tok/s | ~99 tok/s |
183
 
184
+ Phone figures will be several times lower; these are desktop-CPU numbers. Measured back to back on the same
185
+ machine, Q4_1 generates 62.6 tok/s against 54.3 for Q4_K_M, but processes prompts slower (199 vs 251 tok/s).
186
 
187
+ The MNN build runs through MNN's own runtime. Runtime sources: [alibaba/MNN](https://github.com/alibaba/MNN), the [LLM export and inference guide](https://github.com/alibaba/MNN/blob/master/transformers/README.md), and the official Android app [`apps/Android/MnnLlmChat`](https://github.com/alibaba/MNN/tree/master/apps/Android/MnnLlmChat). Build `llm_demo` from the MNN repository with
188
  `-DMNN_BUILD_LLM=ON`, then point it at the folder:
189
 
190
  ```bash