File size: 11,432 Bytes
53a5961 aafaf03 53a5961 aafaf03 53a5961 aafaf03 53a5961 aafaf03 53a5961 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | # VimeML
Compact causal language models for the Vime input method.
- **Chinese.** The v2 models generate sentences directly from pinyin keys, rerank librime (rime-ice) candidates and predict the next phrase. One model does all three jobs.
- **Japanese.** The v6 models generate the conversion directly from a kana reading and rerank AzooKey candidates together with their own, using left context.
These are custom PyTorch models for input methods. They are not instruction-tuned assistants and not Transformers `AutoModel` integrations.
[中文说明](README.zh-CN.md) · [Documentation index](docs/index.md) · [Model card](MODEL_CARD.md) · [Licensing and attribution](NOTICE.md)
## Releases
| Model | Language | Parameters | Use | Hugging Face |
| --- | --- | ---: | --- | --- |
| **vimeml-zh-v2-20m** | Chinese | 20,036,736 | iPhone: pinyin generation, Rime rerank, prediction (Core ML INT8) | [Voltline/vimeml-zh-v2](https://huggingface.co/Voltline/vimeml-zh-v2) `20m/` |
| **vimeml-zh-v2-200m** | Chinese | 193,625,088 | Desktop (PyTorch, GPU): the same three jobs | [Voltline/vimeml-zh-v2](https://huggingface.co/Voltline/vimeml-zh-v2) `200m/` |
| **vimeml-zh-v2-800m** | Chinese | 776,524,928 | Desktop (PyTorch, GPU): the same three jobs, most accurate | [Voltline/vimeml-zh-v2](https://huggingface.co/Voltline/vimeml-zh-v2) `800m/` |
| vimeml-tiny-zh-v1 | Chinese | 20,036,736 | iPhone: Rime rerank and prediction; fallback for v2 | [Voltline/vimeml-tiny-zh-v1](https://huggingface.co/Voltline/vimeml-tiny-zh-v1) |
| **vimeml-ja-v6-20m** | Japanese | 20,036,736 | iPhone: kana-to-text generation and AzooKey rerank (Core ML INT8) | [Voltline/vimeml-ja-v6](https://huggingface.co/Voltline/vimeml-ja-v6) `20m/` |
| V4.2 | Japanese | 15,070,848 | iPhone: AzooKey rerank; deployed until v6-20m, then fallback | [Voltline/vimeml-tiny-ja-v4.2](https://huggingface.co/Voltline/vimeml-tiny-ja-v4.2) |
| V2.1 | Japanese | 12,537,920 | Previous deployment | [Voltline/vimeml-tiny-ja-v2.1](https://huggingface.co/Voltline/vimeml-tiny-ja-v2.1) |
| V1 | Japanese | 7,386,624 | Baseline | [Voltline/vimeml-tiny-ja-v1](https://huggingface.co/Voltline/vimeml-tiny-ja-v1) |
Each release holds inference weights (no optimizer state), the tokenizer, Core ML packages, a frozen copy of the source, and aggregate evaluation results. Training checkpoints, corpora and private benchmark text are not published.
## Chinese
### v2: pinyin to sentence
| Model | Target | Status |
| --- | --- | --- |
| `vimeml-zh-v2-20m` | iPhone | Released 2026-11-23 (`colloq-c40`) |
| `vimeml-zh-v2-200m` | Desktop | Released 2026-11-23 (`200m/`; public pinyin 54.7%) |
| `vimeml-zh-v2-800m` | Desktop | Released 2026-11-24 (`800m/`; public pinyin 63.3%) |
All v2 models share v1's 12,288-piece tokenizer. The prompt is the text before the cursor (up to 64 characters), then the keys: full pinyin, initials, or a mix. Beam search keeps 16 hypotheses per key position, and a character is allowed only if its reading or initial matches the next keys. The top 10 sentences are rescored by the same model in language-model mode.
**vimeml-zh-v2-20m** started from v1, then went through pinyin-task training, distillation from the 200M, and colloquial post-training ([lineage and method](https://huggingface.co/Voltline/vimeml-zh-v2)). Every number below comes from a test split opened once under a preregistered plan. The metric is Top-1 exact match of the first candidate shown.
| Test set | Shipped v1 path (Rime + v1 rerank) | `kd-cont` | **v2-20m** |
| --- | ---: | ---: | ---: |
| `ime-pinyin-zh-v1-r1` test, 3,436 inputs | 31.0% | 49.1% | **51.4%** |
| … full pinyin / mixed / all initials | 81.6 / 23.7 / 9.2 | 82.6 / 47.4 / 22.2 | **84.4 / 49.8 / 24.7** |
| `ime-pinyin-zh-colloq-v1-r1` test, 4,560 colloquial inputs | — | 39.0% | **42.3%** |
On the Standard blind full-pinyin rerank of Rime candidates, v2-20m scores 94.3% against v1's 93.8% (net +7, p 0.31). Reports: [v2-20m confirmation](docs/zh/reports/zh-v2-confirmation-20261120/report.md), [colloquial confirmation](docs/zh/reports/zh-colloq-confirmation-20261123/report.md), [release scope](docs/zh/release-zh-v2-plan.md).
On the phone, v2-20m runs as one batched-KV Core ML INT8 package (23.3 MB). In the Vime client it reranks Rime candidates and predicts by default; sentence generation is behind a development switch until key-by-key generation is fast enough on older phones. Measured with `kd-cont`, which has the same shape and package: Rime rerank p50 4.1 ms on an iPhone 13 Pro and 3.0 ms on an iPhone 16 Pro Max; one-shot generation 91 and 59 ms ([iPhone report](docs/zh/reports/mac-20261121/zh-v2-20m.md), [c40 Mac result](docs/zh/mac/mac-zh-v2-20m-colloq.md)).
The desktop models run in PyTorch. With CUDA graphs in FP16 on a laptop GPU, the 200M takes 83/205 ms p50/p95 per input, including search and rescoring ([desktop latency](docs/zh/reports/zh-desktop-latency-20261118/report.md)). On the public pinyin test it reaches 54.7% (full pinyin 86.5%), and its Standard rerank is 95.2% against v1's 93.8% ([200M confirmation](docs/zh/reports/zh-v2-200m-confirmation-20261123/report.md)). The 800M (second architecture, chosen over the first on development: [arch2 evaluation](docs/zh/reports/zh-800m-arch2-eval-20261123/report.md)) reaches 63.3% on the same test (full pinyin 88.7%), 8.6 points above the 200M, with a Standard rerank of 95.3% ([800M confirmation](docs/zh/reports/zh-v2-800m-confirmation-20261124/report.md)).
### v1: candidate reranking
`vimeml-tiny-zh-v1` reranks the pinyin candidates of librime with rime-ice using left context. It was trained from random initialization on 22.4B characters of cleaned FineWeb2 `cmn_Hani` web text and LCCC dialogue. Internal code and paths use the codename `zh13`. The Hugging Face release includes the stateless Core ML package and the batched KV packages up to v4 (shared prefix, one multifunction package).
Blind exact Top-1 on `ime-standard-zh-v1-r1` (CrossWOZ, RiSAWOZ, KdConv dialogue turns; AI-reviewed labels). The models rerank a frozen 20-candidate pool from rime-ice:
| System | Full pinyin / 1,445 | Abbreviated / 964 |
| --- | ---: | ---: |
| **vimeml-tiny-zh-v1** | **93.8%** | **35.0%** |
| Qwen2.5-0.5B, same pool and scoring | 91.8% | 31.0% |
| Qwen3-0.6B-Base, same pool and scoring | 89.2% | 30.6% |
| rime-ice + Wanxiang grammar model | 82.2% | 15.7% |
| rime-ice (candidate pool source) | 72.2% | 14.6% |
The preregistered confirmation against Rime passed (+329/−19, p = 3.6e-74). Reports (Chinese): [plan](docs/zh-CN/zh/training/training-zh-v1-plan.md), [training](docs/zh-CN/zh/reports/zh-v1-20261110/training.md), [blind and baselines](docs/zh-CN/zh/reports/zh-v1-20261111/blind-and-baselines.md), [iOS release](docs/zh-CN/zh/reports/zh-v1-20261111/ios-release.md).
## Japanese
### v6: kana to text
| Model | Target | Status |
| --- | --- | --- |
| `vimeml-ja-v6-20m` | iPhone, Core ML INT8 batched KV | Released 2026-11-28; replaces V4.2 in Vime |
| `vimeml-ja-v6-200m` | Desktop, PyTorch | Test-confirmed 2026-11-28; desktop latency measured; Hugging Face `200m/` next |
One model generates candidates from the kana reading (constrained beam 16, top 10), merges them with AzooKey's top 20 and orders the list by `gen_score + 1.6 × lm_score`. On the `ime-kana-ja-v1` test (600 items, opened once under a preregistered plan) lenient Top-1 is 88.00% for v6-20m and 89.33% for v6-200m, against 85.00% for V4.2 reranking (p 0.0024 and 0.00095); the two v6 models do not differ significantly. On iPhone 13 Pro the reranked AzooKey list is within 60 ms on every keystroke (p50 24.8 ms); on a laptop GPU (CUDA graphs, FP16) the 200M's full flow takes 115/280 ms p50/p95 ([desktop latency](docs/ja/reports/ja-v6-desktop-latency-20261128/report.md)). Details: [release scope](docs/ja/release-ja-v6-plan.md), [20M confirmation](docs/ja/reports/ja-gen-confirmation-20261128/report.md), [200M confirmation](docs/ja/reports/ja-v6-200m-confirmation-20261128/report.md), [Mac and devices](docs/ja/reports/mac-20261128/ja-v6-20m.md).
### V4.2
V4.2 epoch 20 is the deployed model until Vime switches to v6-20m: INT8 block-32 weights, FP32 compute, CPU-only Core ML on iOS 18, a 17.16 MB package. It replaced V2.1 `extend5` step 40,000.
Exact Top-1 on fixed AzooKey candidate pools (Standard labels are AI-reviewed):
| Model | Standard dev / 728 | Fixed reference / 725 | Legacy / 500 | AJIMEE / 200 |
| --- | ---: | ---: | ---: | ---: |
| V2.1 FP32 | 505 | 535 | 374 | 144 |
| V4.2 FP32 | **523** | 541 | 370 | 139 |
| V4.2 INT8 (deployed) | 522 | — | 371 | 139 |
| V5 epoch 30 | 514 | — | 365 | **145** |
V4.2 and V2.1 are not significantly different. On the preregistered Standard v2 blind, V4.2 scores 598/729 against 576 (author-cluster p = 0.0508, just short of the threshold). V3, V4-B, V4.1, V4.3, V5 and the WSD runs are completed experiments that did not replace V4.2. V5 lowers validation BPC by 0.10 without moving IME Top-1. V4.4 measured the seed noise band (Standard 501–523), and a four-seed ensemble reached 619 on the blind.
Details: [evaluation](docs/ja/evaluation.md), [V4.2 training](docs/ja/training/training-v42.md), [V4.2 Core ML](docs/ja/reports/mac-20261020/v42-coreml.md), [V4.4 ablation](docs/ja/training/training-v44.md), [confirmation results (Chinese)](docs/zh-CN/ja/benchmarks/confirmation-v2-results-20261021.md).
## Installation
Python 3.11 or later.
```bash
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1
python -m pip install -e .
```
`requirements.txt` pins the platform-specific versions. `requirements/` adds the Linux CUDA training environment (`cuda.txt`), benchmark preparation (`evaluation.txt`) and external-model comparisons (`external-eval.txt`).
To run a released model, use the Hugging Face bundle on its own: each one includes its source and an `infer.py` (for v2, `python infer.py --keys woxiangchifan --context 今天中午`). The source repository runs from local checkpoints and their manifests. Core ML conversion and runtime checks need macOS. The iOS client lives in the separate Vime repository.
## Repository structure
| Path | Contents |
| --- | --- |
| `src/vimeml/` | Corpus processing, tokenization, training, evaluation and deployment |
| `scripts/` | Command-line entry points: `zh/` and `ja/` per language line, `common/` shared, each split by subsystem |
| `configs/` | Versioned experiment and data configurations, in `zh/` and `ja/` |
| `requirements/` | Extra dependency pins |
| `docs/` | English documentation and dated experiment records, in `zh/` and `ja/` |
| `docs/zh-CN/` | Chinese documentation; the reference text for plans registered in Chinese |
| `examples/ios/` | Core ML probe, SentencePiece bridge, historical client integration |
| `templates/` | Artifact exchange templates |
| `tests/` | Targeted tests |
| `datasets/`, `artifacts/`, `outputs/`, `runs/`, `handoff/` | Local, Git-ignored data, models, results and transfers |
## License
Code and published weights use GPL-3.0-or-later, with an additional permission under section 7 for app-store distribution ([LICENSE-EXCEPTION](LICENSE-EXCEPTION)). Releases before 2026-10-22 used GPL-2.0-only. Datasets and third-party components keep their own terms; [NOTICE.md](NOTICE.md) lists the attribution that applications bundling a model must show. [Contribution conventions](CONTRIBUTING.md).
|