Skip to content

Use switchify-prediction v0.2.2 for faster word generation - #1034

Merged
enaboapps merged 3 commits into
mainfrom
claude/1033-prediction-v0.2.2
Oct 12, 2026
Merged

enaboapps merged 3 commits into
mainfrom
claude/1033-prediction-v0.2.2

Conversation

@enaboapps

Copy link
Copy Markdown
Contributor

Closes #1033

Stacked on #1030 (base claude/1029-learn-from-typing). Retarget it to main once #1030 merges, and don't delete that branch before then.

This uses the published switchify-prediction v0.2.2, so the AI suggestion words (slots 4–6) arrive 3–5× faster. For the same context they are the same words. The worker protocol (2), model and tokenizer are unchanged.

Changes

  • scripts/prediction-neural.json:
    • The worker archive URLs, archive hashes and per-file hashes for all four targets are regenerated from the v0.2.2 release. Each archive was checked against its published .sha256.
    • revision (the converter and worker provenance) and library_revision are now b873c88 (v0.2.2).
    • v0.2.2 archives also contain the companion CLI. It is deliberately left unpinned, and unpack only extracts pinned files, so it is never extracted or shipped. The file count per target is the same as v0.2.1.
  • src-tauri/Cargo.toml: both libraries are pinned to b873c88, which already includes the learning changes from Learn from typing to personalise word prediction #1030.
  • scripts/check-packaged-prediction.mjs: expects worker BUILD.json version 0.2.2.
  • Docs: neural-prediction.md and six-predictions.md describe v0.2.2.

Measurements (from switchify-prediction #26)

Worker Median before → after
AVX2 (Windows test machine) 581 → 121 ms
Portable (Windows test machine) 1,257 → 424 ms
macOS ARM (CI, portable) 690 → 151 ms

Validation

  • npm run lint and npm test (295) pass. cargo fmt --check, cargo clippy --all-targets -D warnings and cargo test (758) pass.
  • The converter source (quantize.rs) and model-bundle.json are byte-identical between v0.2.1 and v0.2.2, so the pinned model hash still holds.
  • The archive inside BUILD.json reports commit b873c88, version 0.2.2 and protocol 2.
  • Not run locally: npm run prediction-model. On this Windows development machine, real-time scanning blocks the staging-directory rename for freshly written worker executables (EPERM), so it can't complete here. CI runs the full fetch, verification, conversion and packaged checks on Windows and macOS runners.
  • Manual check: with signed builds, confirm that AI suggestions appear quickly and that Retry predictions still works.

🤖 Generated with Claude Code

Pins the published v0.2.2 worker archives and their per-file hashes, and
moves both Rust libraries and the converter to the release commit. The
workers batch the beam search and stop once the ranked words are settled,
returning the same words 3-5x faster for the same context, and generation
sees the sentence as typed. Protocol, model and tokenizer are unchanged.
The companion CLI inside each archive is left unpinned, so it is never
extracted or shipped.

Closes #1033

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@enaboapps enaboapps added this to the v1.0.0-rc.24 milestone Oct 12, 2026
Refs #1033

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from claude/1029-learn-from-typing to main October 12, 2026 19:50
@enaboapps
enaboapps marked this pull request as ready for review October 12, 2026 19:51
@enaboapps
enaboapps merged commit 0c13a04 into main Oct 12, 2026
9 of 10 checks passed
@enaboapps
enaboapps deleted the claude/1033-prediction-v0.2.2 branch October 12, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use switchify-prediction v0.2.2 for faster word generation

2 participants