Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
56 changes: 56 additions & 0 deletions docs/releases/v0.2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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. 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, 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
normalized context.
- **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 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 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 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.
- **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.
6 changes: 3 additions & 3 deletions neural/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion neural/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion neural/worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading