|
Download README.md from wasi-master/wmkeyboard-context-models: direct link, hf CLI and curl.
- Browser
- Download file 3.11 kB
-
https://huggingface.co/wasi-master/wmkeyboard-context-models/resolve/main/README.md
- Command line
-
hf download hf://wasi-master/wmkeyboard-context-models/README.md
-
curl -L -o README.md https://huggingface.co/wasi-master/wmkeyboard-context-models/resolve/main/README.md
3.11 kB
| license: mit | |
| language: [en, bn, hi] | |
| pipeline_tag: text-generation | |
| tags: [wmkeyboard, next-word-prediction, keyboard, on-device] | |
| # WM Keyboard context models | |
| Small word-level transformers that [WM Keyboard](https://github.com/wasi-master/wmkeyboard) runs on the phone. They read the sentence before the caret and predict the next word. The keyboard also uses them to rank suggestions and check autocorrect. | |
| These are int8 files in the keyboard's own `WMLM` format. Transformers cannot load them. The reader is [`lm.rs`](https://github.com/wasi-master/wmkeyboard/blob/main/native/wm-engine/src/lm.rs), and the training code is in [`tools/wmlm`](https://github.com/wasi-master/wmkeyboard/tree/main/tools/wmlm). | |
| | File | Languages | Training data | Teacher | | |
| |---|---|---|---| | |
| | `en_context.wmlm` | English, 10.3M parameters | Tatoeba, Leipzig news, OpenSubtitles (9.0M sentences) | Qwen2.5-1.5B, weight 0.3 | | |
| | `en_context_large.wmlm` | English, 16.1M parameters | same as above | same as above | | |
| | `bn_rom_context.wmlm` | English and Banglish, 10.3M parameters | mixed English and romanised Bengali (2.7M sentences); the published build notes do not list each source | Qwen2.5-1.5B, weight 0.5 | | |
| | `hi_rom_context.wmlm` | English and Hinglish | MADLAD-400 `hi_Latn`, Tatoeba English, Leipzig news 2023 300K | none listed | | |
| In the two-language files, `<lang:0>` is English and `<lang:1>` is the romanised language. | |
| On the keyboard's typing harness, next-word top-1 is .203 for the standard English model and .214 for the large one. On 2,000 held-out Hinglish sentences, the Hinglish model scores .232 top-1 and .374 top-3. The Banglish model's mixed held-out perplexity is 119.5. These scores come from different test sets, so they cannot be compared across languages. | |
| The models reflect the text they were trained on and can suggest wrong or offensive words. | |
| ## License and credits | |
| The weights are MIT. Training sources: [Tatoeba](https://tatoeba.org/) (CC BY 2.0 FR, part CC0), the [Leipzig Corpora Collection](https://wortschatz.uni-leipzig.de/en/download), [MADLAD-400](https://huggingface.co/datasets/allenai/MADLAD-400) (Kudugunta et al. 2023) and [OpenSubtitles](https://www.opensubtitles.org/) through [OPUS](https://opus.nlpl.eu/) (Lison and Tiedemann 2016). Vocabularies were seeded from the keyboard's word lists; the [data repository](https://github.com/wasi-master/wmkeyboard-data) credits their sources. The Hinglish list includes [Dakshina](https://github.com/google-research-datasets/dakshina) (CC BY-SA 4.0). The [Qwen2.5-1.5B](https://huggingface.co/Qwen/Qwen2.5-1.5B) teacher is Apache-2.0. | |
| ## Files | |
| | File | Bytes | SHA-256 | | |
| |---|---:|---| | |
| | `en_context.wmlm` | 10,801,380 | `fef5aae9cbf11bd290ea5dd2817cc65d098072f4585f073f9c557d2ce674f040` | | |
| | `en_context_large.wmlm` | 16,728,720 | `3baddb746c7add8f0fdcb43fa050a280cbeccdaaedfd533955489effcdf362a7` | | |
| | `bn_rom_context.wmlm` | 10,801,084 | `2a43d0dcfb739546ad37ebdb9d0dfccf1684aabc8530122fd95dc42ed1e7b6f1` | | |
| | `hi_rom_context.wmlm` | 6,590,836 | `1cfcda6b800a240f0a34db12dc1eb3f2a1e99c3fc8799f2daef21e75246b85c8` | | |