From 87f1f2a001f1182f301918d8d4967071f0d5ec95 Mon Sep 17 00:00:00 2001 From: Owen McGirr Date: Mon, 12 Oct 2026 16:43:03 +0100 Subject: [PATCH 1/3] Prepare v0.2.2 release Bumps the library, companion and worker versions to 0.2.2 and adds release notes covering faster generation (#25), incremental learning (#27) and the bounded personal weighting (#29). To merge after #26, #28 and #30. Closes #31 Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/releases/v0.2.2.md | 49 ++++++++++++++++++++++++++++++++++++++++ neural/Cargo.lock | 6 ++--- neural/Cargo.toml | 2 +- neural/worker/Cargo.toml | 2 +- 6 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 docs/releases/v0.2.2.md diff --git a/Cargo.lock b/Cargo.lock index 8ad3e16..ca096f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,7 +481,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "switchify-prediction" -version = "0.2.1" +version = "0.2.2" dependencies = [ "clap", "rusqlite", diff --git a/Cargo.toml b/Cargo.toml index 979af45..9126b0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchify-prediction" -version = "0.2.1" +version = "0.2.2" edition = "2024" rust-version = "1.97.1" license = "MIT" diff --git a/docs/releases/v0.2.2.md b/docs/releases/v0.2.2.md new file mode 100644 index 0000000..292d479 --- /dev/null +++ b/docs/releases/v0.2.2.md @@ -0,0 +1,49 @@ +# v0.2.2 + +Faster whole-word generation, natural generation context, and personal learning +that is fast, effective and bounded. Worker protocol 2, the model, the tokenizer, +the bundle manifest and the SQLite formats are unchanged, so existing personal +databases keep working. The matching v0.2.2 workers carry the faster search. + +## Generation (#25) + +- **Batched search.** Beam extensions at each depth now run as one batched + forward pass. Search stops as soon as further search cannot change the ranked + words. The words are identical to v0.2.1's on all 1,760 frozen queries. +- **Speed.** Median generation went from 581 ms to 121 ms with the AVX2 worker + and from 1,257 ms to 424 ms with the portable worker on a Windows test machine. + On macOS ARM CI it went from 690 ms to 151 ms. +- **Natural context.** Generation now sees the current sentence as typed, with + its case and punctuation. On the frozen workload, six-slot top six rose from + 72.4% to 73.2%. Reranking and statistical prediction are unchanged. +- **Measuring natural context.** `scripts/generation_evaluate.py` gains + `--natural-context`. + +## Personal learning (#27, #29) + +- **Incremental learning.** `Predictor::learn` and `import` add only the new + counts unless another connection has changed the personal database. On the + production baseline a sentence takes about 8 ms instead of about 190 ms. +- **Weighting.** Learned counts are kept apart from the baseline and combined + when predicting. One learned occurrence counts as up to 500 baseline + occurrences, less as more is learned, so learned words approach a bounded + share instead of outgrowing the baseline. +- **New and rare words.** A word the baseline lacks, or has seen fewer than + three times, counts once it has been learned twice. A word typed wrongly once + is therefore not suggested. +- **Results.** On a synthetic person, learned words reached the six slots for + 46.2% of queries instead of 1.3%, with no misspelling suggested. General + English accuracy was unchanged with that learning present. See + `docs/personal-learning.md` and `scripts/personal_evaluate.py`. +- **Memory.** The baseline is no longer copied, so peak predictor memory falls + from 362 MiB to 134 MiB with or without learning. +- **Behaviour change for existing users.** Learned counts now weigh much more + than the previous 5×, so learned words appear far more often. A word learned + only once that the baseline lacks or rarely sees no longer counts until it is + used again. + +These are regression measurements on synthetic and frozen fixtures, not +evidence of real users' accuracy. Prepared CI bundles are unsigned; platform +applications sign their embedded workers through their own packaging +workflows. Publishing this release, and updating Switchify PC's worker assets +and library pin to it, need separate approval. diff --git a/neural/Cargo.lock b/neural/Cargo.lock index 68c758a..58c0e35 100644 --- a/neural/Cargo.lock +++ b/neural/Cargo.lock @@ -1401,7 +1401,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "switchify-prediction" -version = "0.2.1" +version = "0.2.2" dependencies = [ "clap", "rusqlite", @@ -1416,7 +1416,7 @@ dependencies = [ [[package]] name = "switchify-prediction-neural" -version = "0.2.1" +version = "0.2.2" dependencies = [ "clap", "serde", @@ -1429,7 +1429,7 @@ dependencies = [ [[package]] name = "switchify-smol-worker" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "candle-core", diff --git a/neural/Cargo.toml b/neural/Cargo.toml index ef0cd84..8a8fcb2 100644 --- a/neural/Cargo.toml +++ b/neural/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchify-prediction-neural" -version = "0.2.1" +version = "0.2.2" edition = "2024" rust-version = "1.97.1" license = "MIT" diff --git a/neural/worker/Cargo.toml b/neural/worker/Cargo.toml index 89edded..2009af8 100644 --- a/neural/worker/Cargo.toml +++ b/neural/worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchify-smol-worker" -version = "0.2.1" +version = "0.2.2" edition = "2024" rust-version = "1.97.1" license = "MIT" From a884b88841e61371733b0bf9ffe9f1ad6486997c Mon Sep 17 00:00:00 2001 From: Owen McGirr Date: Mon, 12 Oct 2026 16:57:22 +0100 Subject: [PATCH 2/3] Qualify the v0.2.2 release notes Refs #31 Co-Authored-By: Claude Opus 5.5 --- docs/releases/v0.2.2.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/releases/v0.2.2.md b/docs/releases/v0.2.2.md index 292d479..edc15ec 100644 --- a/docs/releases/v0.2.2.md +++ b/docs/releases/v0.2.2.md @@ -9,13 +9,17 @@ databases keep working. The matching v0.2.2 workers carry the faster search. - **Batched search.** Beam extensions at each depth now run as one batched forward pass. Search stops as soon as further search cannot change the ranked - words. The words are identical to v0.2.1's on all 1,760 frozen queries. + words. For the same context, the words are identical to v0.2.1's on all 1,760 + frozen queries. - **Speed.** Median generation went from 581 ms to 121 ms with the AVX2 worker and from 1,257 ms to 424 ms with the portable worker on a Windows test machine. - On macOS ARM CI it went from 690 ms to 151 ms. + On macOS ARM CI it went from 690 ms to 151 ms in single runs, whose timing + varies; one generation in that run timed out, which the report does not + explain. - **Natural context.** Generation now sees the current sentence as typed, with its case and punctuation. On the frozen workload, six-slot top six rose from - 72.4% to 73.2%. Reranking and statistical prediction are unchanged. + 72.4% to 73.2%. Reranking and statistical prediction still use the + normalized context. - **Measuring natural context.** `scripts/generation_evaluate.py` gains `--natural-context`. @@ -23,17 +27,20 @@ databases keep working. The matching v0.2.2 workers carry the faster search. - **Incremental learning.** `Predictor::learn` and `import` add only the new counts unless another connection has changed the personal database. On the - production baseline a sentence takes about 8 ms instead of about 190 ms. + production baseline a sentence takes about 8 ms instead of about 190 ms with + little learned, rising to about 20 ms after 2,000 learned words. - **Weighting.** Learned counts are kept apart from the baseline and combined when predicting. One learned occurrence counts as up to 500 baseline occurrences, less as more is learned, so learned words approach a bounded share instead of outgrowing the baseline. - **New and rare words.** A word the baseline lacks, or has seen fewer than - three times, counts once it has been learned twice. A word typed wrongly once - is therefore not suggested. + three times, counts once it has been learned twice. A single misspelling the + baseline lacks or rarely sees is therefore not suggested. - **Results.** On a synthetic person, learned words reached the six slots for - 46.2% of queries instead of 1.3%, with no misspelling suggested. General - English accuracy was unchanged with that learning present. See + 46.2% of the 78 queries on personal words instead of 1.3%, and top six over + all 445 queries rose from 50.3% to 60.4%, with no misspelling suggested. + General English accuracy was unchanged with that learning present. These + were measured with v0.2.1 generation. See `docs/personal-learning.md` and `scripts/personal_evaluate.py`. - **Memory.** The baseline is no longer copied, so peak predictor memory falls from 362 MiB to 134 MiB with or without learning. From 6ba168462e09a61e0e3a11666136fecb2a37678d Mon Sep 17 00:00:00 2001 From: Owen McGirr Date: Mon, 12 Oct 2026 16:59:13 +0100 Subject: [PATCH 3/3] Say the macOS generation failed, not timed out Refs #31 Co-Authored-By: Claude Opus 5.5 --- docs/releases/v0.2.2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/releases/v0.2.2.md b/docs/releases/v0.2.2.md index edc15ec..02372fb 100644 --- a/docs/releases/v0.2.2.md +++ b/docs/releases/v0.2.2.md @@ -13,9 +13,9 @@ databases keep working. The matching v0.2.2 workers carry the faster search. frozen queries. - **Speed.** Median generation went from 581 ms to 121 ms with the AVX2 worker and from 1,257 ms to 424 ms with the portable worker on a Windows test machine. - On macOS ARM CI it went from 690 ms to 151 ms in single runs, whose timing - varies; one generation in that run timed out, which the report does not - explain. + On macOS ARM CI, with the portable worker, it went from 690 ms to 151 ms in + single runs, whose timing varies; one generation in that run failed, which + the report does not explain. - **Natural context.** Generation now sees the current sentence as typed, with its case and punctuation. On the frozen workload, six-slot top six rose from 72.4% to 73.2%. Reranking and statistical prediction still use the