Keylime m2 (106M) β Preview
Preview. This is an early preview of Keylime, released to show what the model can do and to collect feedback and data for improving it. It is not a finished product: expect rough edges, and expect the weights, file layout and manifest to change between versions.
Keylime's on-device autocorrect language model, in onnxruntime's pre-optimized ORT format. The Keylime keyboard for Android and the Keylime app for macOS download these files on first run and check each one against the SHA-256 in the model manifest.
m2 style (m2s): a 106M-parameter Block AttnRes decoder LM with a 32k SentencePiece vocab, trained on 9B tokens with casual / standard / formal style tokens. int4 weights. It's the default model in the Keylime apps.
Style tokens: the context starts with [EOS, id], where id is 249 for casual, 250 for standard and 251 for formal.
Manifest id: m2s_int4 ("m2 106M int4"). The manifest (file list, step-graph layout and decode parameters) is at
https://autocorrect.mostlime.hackclub.app/autocorrect-android/manifest.json, with a copy in the models-v1 release
of Mostlime12195/keylime-models.
Files
| file | bytes | sha256 | what it is |
|---|---|---|---|
m2s.step.int4m.ort |
78969984 | 28e79b14b67c25659a41ce6ac84fd498bce530310eb7ec6bff116ad2e003fe39 |
step graph (batched candidates), pre-optimized onnxruntime (ORT) format |
m2s.step.int4t.ort |
79105008 | 8a97ae16e68944f78e180c180dd3f18adf41b56dcadb21c4863e8e75b03c686f |
tree step graph (one call scores every candidate of a word), ORT format |
vocab_m2.json |
695095 | f328549e080df02ab6a57e3ecf87dc8dd6470b286516ba00f67a86f383d1c77a |
SentencePiece vocabulary |
LICENSE |
18659 | 5eebefd3682e32d661f307a28539b304e5e52fb1eb33ba214e61d7a57663e4f0 |
CC BY 4.0 license text |
Download: https://huggingface.co/MostLime/keylime-m2-preview/resolve/main/<file>
Graph layout (manifest meta)
| key | value |
|---|---|
| params | 106,315,648 |
| d_model | 640 |
| vocab_size | 32768 |
| n_kv_heads | 2 |
| head_dim | 64 |
| conv_kernel | 7 |
| state_names | k0, v0, k1, v1, k2, v2, k3, v3, k4, v4, k5, v5, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 |
The graphs are single-step decoders that carry their KV cache (k*/v*) and short-conv state (c*) as inputs and
outputs, so the keyboard reuses the shared left context and only scores the candidate words.
This repo has no code and no training data, only the exported weights and the vocab the keyboard needs.
License
Copyright Β© Mostlime12195. The model files are licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).