From 0a0fd7de5b71e7d3001503197824924f7ec1b536 Mon Sep 17 00:00:00 2001 From: Owen McGirr Date: Mon, 12 Oct 2026 19:40:36 +0100 Subject: [PATCH 1/2] Use switchify-prediction v0.2.2 for faster word generation 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 --- docs/neural-prediction.md | 2 +- docs/six-predictions.md | 6 +- scripts/check-packaged-prediction.mjs | 2 +- scripts/prediction-neural.json | 280 +++++++++++++------------- src-tauri/Cargo.lock | 8 +- src-tauri/Cargo.toml | 4 +- 6 files changed, 152 insertions(+), 150 deletions(-) diff --git a/docs/neural-prediction.md b/docs/neural-prediction.md index 83b76417..0a085606 100644 --- a/docs/neural-prediction.md +++ b/docs/neural-prediction.md @@ -36,4 +36,4 @@ The benchmark now requires 1,000 successful warmed refinements across at most fi ## Reply timeout update -The companion inference and reset reply deadline is now 2 seconds, increased from 500 ms after repeated macOS CI timeouts. Startup remains bounded at 30 seconds, statistical suggestions remain immediate, and late or stale results remain rejected. That change pinned both Rust libraries to `171210ee89e3944d1c606d50ad779a5dfb1651b8`, the timeout fix in switchify-prediction PR #22, and kept the v0.2.0 worker assets. The v0.2.1 worker assets and their converter come from `2a2ed0c2b0013663ffa9317dba3389ec96b6f14b`, and they add six-slot generation. Both Rust libraries are now pinned to `e5223aa8af58d982278db110b70293546db1cdd7`, which adds incremental, bounded personal learning without changing the worker protocol. The deadlines are unchanged. The earlier 500 ms measurements above remain historical evidence, not measurements of the increased deadline. +The companion inference and reset reply deadline is now 2 seconds, increased from 500 ms after repeated macOS CI timeouts. Startup remains bounded at 30 seconds, statistical suggestions remain immediate, and late or stale results remain rejected. That change pinned both Rust libraries to `171210ee89e3944d1c606d50ad779a5dfb1651b8`, the timeout fix in switchify-prediction PR #22, and kept the v0.2.0 worker assets. The v0.2.1 worker assets from `2a2ed0c2b0013663ffa9317dba3389ec96b6f14b` added six-slot generation. The worker assets, their converter and both Rust libraries now come from the v0.2.2 release, `b873c88314b0eb0573f3c34d301fbd2f5761d2ab`, still on worker protocol 2. Its workers batch the search and stop it as soon as the ranked words are settled. For the same context they return the same words 3–5× faster: a median of 581 to 121 ms with AVX2 and 1,257 to 424 ms portable on a Windows test machine, and 690 to 151 ms on macOS ARM CI. Generation now sees the current sentence as typed, with case and punctuation. The libraries add incremental, bounded personal learning. The deadlines are unchanged. The earlier 500 ms measurements above remain historical evidence, not measurements of the increased deadline. diff --git a/docs/six-predictions.md b/docs/six-predictions.md index 03aeaa5f..f438433b 100644 --- a/docs/six-predictions.md +++ b/docs/six-predictions.md @@ -15,8 +15,10 @@ instant slots available, with explicit retry or keyboard reopening required. ## Release assets -The build downloads checksum-pinned v0.2.1 companion release archives from -GitHub. Worker provenance is pinned to the release commit. The Rust libraries are pinned to a later commit that adds personal learning; see word prediction. +The build downloads checksum-pinned v0.2.2 companion release archives from +GitHub. Both libraries and worker provenance are pinned to the release commit. +Only the workers and notices are extracted; the companion CLI in each archive is +not pinned and never unpacked. Verified local caches work offline, and installed applications need no network access or model setup. Model, tokenizer and statistical database bytes remain unchanged. diff --git a/scripts/check-packaged-prediction.mjs b/scripts/check-packaged-prediction.mjs index 474870b0..1550b4cc 100644 --- a/scripts/check-packaged-prediction.mjs +++ b/scripts/check-packaged-prediction.mjs @@ -16,7 +16,7 @@ if (!(await verified(neural, { files: bundlePins }))) throw new Error('Packaged const pin = JSON.parse(await readFile(new URL('./prediction-neural.json', import.meta.url), 'utf8')); if (JSON.stringify(JSON.parse(await readFile(join(neural, 'model-bundle.json'), 'utf8'))) !== JSON.stringify(pin.bundle)) throw new Error('Wrong packaged neural policy'); const build = JSON.parse(await readFile(join(neural, 'worker-notices/BUILD.json'), 'utf8')); -if (build.commit !== pin.revision || build.version !== '0.2.1' || build.worker_protocol !== 2) throw new Error('Wrong worker provenance'); +if (build.commit !== pin.revision || build.version !== '0.2.2' || build.worker_protocol !== 2) throw new Error('Wrong worker provenance'); const workerPin = pin.workers[build.target]; if (!workerPin) throw new Error('Unsupported packaged worker'); const windows = build.target.includes('windows'); diff --git a/scripts/prediction-neural.json b/scripts/prediction-neural.json index 19ff7a45..fb689a53 100644 --- a/scripts/prediction-neural.json +++ b/scripts/prediction-neural.json @@ -1,5 +1,5 @@ { - "revision": "2a2ed0c2b0013663ffa9317dba3389ec96b6f14b", + "revision": "b873c88314b0eb0573f3c34d301fbd2f5761d2ab", "bundle": { "format_version": 1, "model_id": "smollm2-135m-q8-v1", @@ -75,233 +75,233 @@ }, "workers": { "aarch64-apple-darwin": { - "archive_sha256": "aaa633461090006311557e7b2a4b9876c225af29933501feb65afc4c8c048d49", + "archive_sha256": "44bd816f26e0b3db13db1d2c9c7bedd3e055ea8ce665b9eaf2935f32c0154209", "files": { - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/QUALIFICATION.md": { - "size": 7086, - "sha256": "f5d13a7406728515112cab4da093ee19642f68abbb9f30c8c8f511ae68ec8eb3" + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/BUILD.json": { + "size": 987, + "sha256": "e5a8267d9d24568ca408f7697a562914b0be6cce98aac27d03963ea0f39b547d" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/QUALIFICATION.json": { - "size": 714, - "sha256": "636ff7eabd1eec3cbfcf3d554d1908175cbae42d65330b7d8cf80bc4f0cbc509" + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/Cargo.lock": { + "size": 46276, + "sha256": "7866a0e2ef173313da2f020e60e93c993c0e81ac58d2ce90563652cc6bf5d8b7" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/LICENSE": { + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/LICENSE": { "size": 1079, "sha256": "1e5643d5431cc5b2d04534dee7b3f716b24fc3b82493a1659534cbfa4fc8732c" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/Cargo.lock": { - "size": 46262, - "sha256": "1ca440eb3b6acbe7a5b40ebc39bf2db2fb761ab5592f6610fd1a61adf04f2ffe" + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/QUALIFICATION.json": { + "size": 714, + "sha256": "636ff7eabd1eec3cbfcf3d554d1908175cbae42d65330b7d8cf80bc4f0cbc509" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/THIRD_PARTY_NOTICES.md": { - "size": 1545871, - "sha256": "6bc01a7be7b3aaa59d2c04acbbdea91b20699f0f20d556debc5e674eb0d3600f" + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/QUALIFICATION.md": { + "size": 7086, + "sha256": "f5d13a7406728515112cab4da093ee19642f68abbb9f30c8c8f511ae68ec8eb3" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/README.md": { - "size": 8954, - "sha256": "c1ffe05faa70725dfe43e54657b2088baec45fcd1356e5cc802ec89a4965c39b" + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/README.md": { + "size": 9644, + "sha256": "db26426370dd2bc3997e2815e486ce23f0d42c0ed6898dc2308fcb9f6312ec77" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/switchify-smol-worker": { - "size": 7321632, - "sha256": "acb543af042d1dc40b928edbfd4d5dfb88270d05f19efe98b8b322002a7469d3" + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/RUST_LIBRARY_COPYRIGHT.html": { + "size": 279302, + "sha256": "0a65bb747c49c7bb816cbc7188319bd6e4e8d08091c1190b8a3c0971c47968ed" + }, + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/SECURITY.md": { + "size": 1973, + "sha256": "d79bf51500d3927bc47fad3e61b987be10764c7003b82df0f9d1f752f72a5182" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/SHA256SUMS": { + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/SHA256SUMS": { "size": 998, - "sha256": "ba76f5b2bd7aa375164d1886548f913c0faf83cde9edb8f463c89877b59a3aea" + "sha256": "a28962b779af026a99330429f22d3f57d81d0e700706ba519ef20c754425cd6e" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/RUST_LIBRARY_COPYRIGHT.html": { - "size": 279302, - "sha256": "0a65bb747c49c7bb816cbc7188319bd6e4e8d08091c1190b8a3c0971c47968ed" + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/THIRD_PARTY_NOTICES.md": { + "size": 1545871, + "sha256": "6bc01a7be7b3aaa59d2c04acbbdea91b20699f0f20d556debc5e674eb0d3600f" + }, + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/switchify-smol-worker": { + "size": 7106800, + "sha256": "64852b02f0589c419652cabc573c6d4fe62d937d77f6bcb8984ab4ec583f25b1" }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/verify_bundle.py": { + "switchify-prediction-neural-0.2.2-aarch64-apple-darwin/verify_bundle.py": { "size": 1282, "sha256": "69c124d037d9e25018f690c10b861c4388c01a8cd8eb3ed438d17136196c1194" - }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/BUILD.json": { - "size": 987, - "sha256": "efe9910c9f3de2f33846eb08cae659f5f01b12cadddd3e4121903239c4ff97e3" - }, - "switchify-prediction-neural-0.2.1-aarch64-apple-darwin/SECURITY.md": { - "size": 1973, - "sha256": "d79bf51500d3927bc47fad3e61b987be10764c7003b82df0f9d1f752f72a5182" } }, - "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.1/switchify-prediction-neural-0.2.1-aarch64-apple-darwin.zip" + "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.2/switchify-prediction-neural-0.2.2-aarch64-apple-darwin.zip" }, "x86_64-apple-darwin": { - "archive_sha256": "6882754360e1f854c96052d816cccbf1f93598ffc7b81f711ba2150cddbbd465", + "archive_sha256": "c0d28a281f848f266c9ac07824c32f11f3b475519a3f941608927a18b87e0a56", "files": { - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/QUALIFICATION.md": { - "size": 7086, - "sha256": "f5d13a7406728515112cab4da093ee19642f68abbb9f30c8c8f511ae68ec8eb3" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/BUILD.json": { + "size": 1024, + "sha256": "deca8a94bc2e510e9953f85e4b388f0c64c1f5f4c42b2a910852ec2f75792d12" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/QUALIFICATION.json": { - "size": 714, - "sha256": "636ff7eabd1eec3cbfcf3d554d1908175cbae42d65330b7d8cf80bc4f0cbc509" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/Cargo.lock": { + "size": 46276, + "sha256": "7866a0e2ef173313da2f020e60e93c993c0e81ac58d2ce90563652cc6bf5d8b7" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/LICENSE": { + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/LICENSE": { "size": 1079, "sha256": "1e5643d5431cc5b2d04534dee7b3f716b24fc3b82493a1659534cbfa4fc8732c" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/Cargo.lock": { - "size": 46262, - "sha256": "1ca440eb3b6acbe7a5b40ebc39bf2db2fb761ab5592f6610fd1a61adf04f2ffe" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/QUALIFICATION.json": { + "size": 714, + "sha256": "636ff7eabd1eec3cbfcf3d554d1908175cbae42d65330b7d8cf80bc4f0cbc509" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/THIRD_PARTY_NOTICES.md": { - "size": 1545871, - "sha256": "6bc01a7be7b3aaa59d2c04acbbdea91b20699f0f20d556debc5e674eb0d3600f" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/QUALIFICATION.md": { + "size": 7086, + "sha256": "f5d13a7406728515112cab4da093ee19642f68abbb9f30c8c8f511ae68ec8eb3" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/README.md": { - "size": 8954, - "sha256": "c1ffe05faa70725dfe43e54657b2088baec45fcd1356e5cc802ec89a4965c39b" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/README.md": { + "size": 9644, + "sha256": "db26426370dd2bc3997e2815e486ce23f0d42c0ed6898dc2308fcb9f6312ec77" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/switchify-smol-worker": { - "size": 7903704, - "sha256": "5a518794a91d7ad9edb6f537c5f9e12ec765cfeffa2160a1a46ecf1e3eb35790" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/RUST_LIBRARY_COPYRIGHT.html": { + "size": 279302, + "sha256": "0a65bb747c49c7bb816cbc7188319bd6e4e8d08091c1190b8a3c0971c47968ed" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/switchify-smol-worker-avx2": { - "size": 8054416, - "sha256": "6151ef19e3848ce7375a3748b844ae9ef2d5f52037c60eebd49b7df09004a2ba" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/SECURITY.md": { + "size": 1973, + "sha256": "d79bf51500d3927bc47fad3e61b987be10764c7003b82df0f9d1f752f72a5182" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/SHA256SUMS": { + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/SHA256SUMS": { "size": 1091, - "sha256": "d1b7a00190a833867cdf2924fc5835e2865c9c365b294130dab136535a71892d" + "sha256": "75c4309dac31b14485d527d1218f8784f9c7103625e2b6b6af1d3521caf3c23c" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/RUST_LIBRARY_COPYRIGHT.html": { - "size": 279302, - "sha256": "0a65bb747c49c7bb816cbc7188319bd6e4e8d08091c1190b8a3c0971c47968ed" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/THIRD_PARTY_NOTICES.md": { + "size": 1545871, + "sha256": "6bc01a7be7b3aaa59d2c04acbbdea91b20699f0f20d556debc5e674eb0d3600f" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/verify_bundle.py": { - "size": 1282, - "sha256": "69c124d037d9e25018f690c10b861c4388c01a8cd8eb3ed438d17136196c1194" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/switchify-smol-worker": { + "size": 7653120, + "sha256": "b604a79f05d67939f927e1d21982127440d023785e7ef3c5ef5bcab1a4d16332" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/BUILD.json": { - "size": 1024, - "sha256": "d910e349135956cd1341383b1d1bd2a8b76fe0f5ea957776d54c8a94d2ec83ac" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/switchify-smol-worker-avx2": { + "size": 7685576, + "sha256": "2224cb3c162f2a7af92c297868dc27da4ecb982d17303e4f2e2ba3f2b11dd211" }, - "switchify-prediction-neural-0.2.1-x86_64-apple-darwin/SECURITY.md": { - "size": 1973, - "sha256": "d79bf51500d3927bc47fad3e61b987be10764c7003b82df0f9d1f752f72a5182" + "switchify-prediction-neural-0.2.2-x86_64-apple-darwin/verify_bundle.py": { + "size": 1282, + "sha256": "69c124d037d9e25018f690c10b861c4388c01a8cd8eb3ed438d17136196c1194" } }, - "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.1/switchify-prediction-neural-0.2.1-x86_64-apple-darwin.zip" + "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.2/switchify-prediction-neural-0.2.2-x86_64-apple-darwin.zip" }, "x86_64-pc-windows-msvc": { - "archive_sha256": "5580543007f7e0cc8601685be195be6fb68215a6521bd5eb8864ac58590bad1c", + "archive_sha256": "c73ea3051d26e82e63696279e9154e1cc0257a6ad30a164eef19e80d3bad21c4", "files": { - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/BUILD.json": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/BUILD.json": { "size": 1059, - "sha256": "b168a91658032969073ff350bec657113039905d9c5b64a5e0c6c7b442530bce" + "sha256": "c922c14a252e8338ca79bfea422e748c7d93a1718a38e2051983761f58c92b30" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/Cargo.lock": { - "size": 46262, - "sha256": "1ca440eb3b6acbe7a5b40ebc39bf2db2fb761ab5592f6610fd1a61adf04f2ffe" + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/Cargo.lock": { + "size": 46276, + "sha256": "7866a0e2ef173313da2f020e60e93c993c0e81ac58d2ce90563652cc6bf5d8b7" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/LICENSE": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/LICENSE": { "size": 1100, "sha256": "38a190016c5d23b6acf37beda35bdef634a3572da76bb7c6ebfec84763648357" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/QUALIFICATION.json": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/QUALIFICATION.json": { "size": 714, "sha256": "636ff7eabd1eec3cbfcf3d554d1908175cbae42d65330b7d8cf80bc4f0cbc509" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/QUALIFICATION.md": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/QUALIFICATION.md": { "size": 7147, "sha256": "934945362415a5672a5c05887553911778f2032508b5efcb9a755c5e551548dc" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/README.md": { - "size": 8954, - "sha256": "c1ffe05faa70725dfe43e54657b2088baec45fcd1356e5cc802ec89a4965c39b" + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/README.md": { + "size": 9644, + "sha256": "db26426370dd2bc3997e2815e486ce23f0d42c0ed6898dc2308fcb9f6312ec77" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/RUST_LIBRARY_COPYRIGHT.html": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/RUST_LIBRARY_COPYRIGHT.html": { "size": 279302, "sha256": "0a65bb747c49c7bb816cbc7188319bd6e4e8d08091c1190b8a3c0971c47968ed" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/SECURITY.md": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/SECURITY.md": { "size": 1973, "sha256": "d79bf51500d3927bc47fad3e61b987be10764c7003b82df0f9d1f752f72a5182" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/SHA256SUMS": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/SHA256SUMS": { "size": 1116, - "sha256": "117a918e874ac6fe4d473fd6e449e472205d327f5c7588abe12802d11b7e234d" + "sha256": "f913fd02b75b6d09bcd6d15f4b3644e2b9cc72d59acd50342b223afa37b7a0ff" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/switchify-smol-worker-avx2.exe": { - "size": 8709120, - "sha256": "46d05730c283e7d6ca6d325611410c0b2196d0431e6cfe8b973cd61c24011d2b" - }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/switchify-smol-worker.exe": { - "size": 8510464, - "sha256": "d6087919a6704a673ab6f4609e87a113e3f59a4bba692a9be4cd1f7bcdc2dc69" - }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/THIRD_PARTY_NOTICES.md": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/THIRD_PARTY_NOTICES.md": { "size": 1552635, "sha256": "448c7f55a9ef918d5cf67f57cfb141c62f7bc6d819cc168fc4ad20f73b34c5f0" }, - "switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc/verify_bundle.py": { + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/switchify-smol-worker-avx2.exe": { + "size": 8314880, + "sha256": "0678efc94d432e7b6ff37cdb6c610ad72307dc0daba3fce37db245ed2522113c" + }, + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/switchify-smol-worker.exe": { + "size": 8230912, + "sha256": "fcea9fcbcff050671e19aa3cf1e34fdffdb11e1fb91dcb78c16dd5c293221424" + }, + "switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc/verify_bundle.py": { "size": 1315, "sha256": "96b47d695b104c61ca65de856108d8850a6da7c00220ae72dd91b8e73cb8f6f2" } }, - "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.1/switchify-prediction-neural-0.2.1-x86_64-pc-windows-msvc.zip" + "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.2/switchify-prediction-neural-0.2.2-x86_64-pc-windows-msvc.zip" }, "x86_64-unknown-linux-gnu": { - "archive_sha256": "7411a6773589f7e28975e6754a6a48e893808b5c3953252a9251bdec792474bd", + "archive_sha256": "fb9b015bcb9e501c6324110b154f3dddb83d6e1074774e529a673f17f4507df4", "files": { - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/BUILD.json": { + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/BUILD.json": { "size": 1051, - "sha256": "aad2210a773e9979ceae63e668f91c10db49d7906f90f274eed474d6124c0c35" - }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/RUST_LIBRARY_COPYRIGHT.html": { - "size": 279302, - "sha256": "0a65bb747c49c7bb816cbc7188319bd6e4e8d08091c1190b8a3c0971c47968ed" + "sha256": "28fad8db4dc2c07c5b079f25208120c02e3262d608341d382519cf57186c376a" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/switchify-smol-worker": { - "size": 10154408, - "sha256": "d537aff0606ac07289ae2dae69dab503a090be9d5d2248919e0fb91bf7c29df3" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/Cargo.lock": { + "size": 46276, + "sha256": "7866a0e2ef173313da2f020e60e93c993c0e81ac58d2ce90563652cc6bf5d8b7" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/SHA256SUMS": { - "size": 1091, - "sha256": "589c2588753eb078508c447dd374dd1da4a34a0d62d6e824a9adffc1c01cda69" - }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/LICENSE": { + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/LICENSE": { "size": 1079, "sha256": "1e5643d5431cc5b2d04534dee7b3f716b24fc3b82493a1659534cbfa4fc8732c" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/switchify-smol-worker-avx2": { - "size": 10245944, - "sha256": "2a75322f581d8bfdad17094d36fd1e529effcdf03d482a6a7d876eaf9c4cd91e" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/QUALIFICATION.json": { + "size": 714, + "sha256": "636ff7eabd1eec3cbfcf3d554d1908175cbae42d65330b7d8cf80bc4f0cbc509" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/SECURITY.md": { - "size": 1973, - "sha256": "d79bf51500d3927bc47fad3e61b987be10764c7003b82df0f9d1f752f72a5182" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/QUALIFICATION.md": { + "size": 7086, + "sha256": "f5d13a7406728515112cab4da093ee19642f68abbb9f30c8c8f511ae68ec8eb3" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/verify_bundle.py": { - "size": 1282, - "sha256": "69c124d037d9e25018f690c10b861c4388c01a8cd8eb3ed438d17136196c1194" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/README.md": { + "size": 9644, + "sha256": "db26426370dd2bc3997e2815e486ce23f0d42c0ed6898dc2308fcb9f6312ec77" + }, + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/RUST_LIBRARY_COPYRIGHT.html": { + "size": 279302, + "sha256": "0a65bb747c49c7bb816cbc7188319bd6e4e8d08091c1190b8a3c0971c47968ed" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/Cargo.lock": { - "size": 46262, - "sha256": "1ca440eb3b6acbe7a5b40ebc39bf2db2fb761ab5592f6610fd1a61adf04f2ffe" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/SECURITY.md": { + "size": 1973, + "sha256": "d79bf51500d3927bc47fad3e61b987be10764c7003b82df0f9d1f752f72a5182" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/README.md": { - "size": 8954, - "sha256": "c1ffe05faa70725dfe43e54657b2088baec45fcd1356e5cc802ec89a4965c39b" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/SHA256SUMS": { + "size": 1091, + "sha256": "6f55ee91c6179dacf6251a5094a90137f2c2719b87ece86b461db062df378703" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/THIRD_PARTY_NOTICES.md": { + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/THIRD_PARTY_NOTICES.md": { "size": 1535176, "sha256": "93cad9c9282edec579015f6d822901ab48596ff21e9f74bb3f07dc2ae8b7314c" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/QUALIFICATION.json": { - "size": 714, - "sha256": "636ff7eabd1eec3cbfcf3d554d1908175cbae42d65330b7d8cf80bc4f0cbc509" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/switchify-smol-worker": { + "size": 9908824, + "sha256": "4f661a856bd7eae4769c549da67a7e7b5ca5bc69d03abe8a1452aacc071c42e6" }, - "switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu/QUALIFICATION.md": { - "size": 7086, - "sha256": "f5d13a7406728515112cab4da093ee19642f68abbb9f30c8c8f511ae68ec8eb3" + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/switchify-smol-worker-avx2": { + "size": 9880952, + "sha256": "6fdf06bb52fcd83f1a359567a1025319eb77f97155e2b9dd12aa118c10f6f036" + }, + "switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu/verify_bundle.py": { + "size": 1282, + "sha256": "69c124d037d9e25018f690c10b861c4388c01a8cd8eb3ed438d17136196c1194" } }, - "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.1/switchify-prediction-neural-0.2.1-x86_64-unknown-linux-gnu.zip" + "url": "https://github.com/switchifyapp/switchify-prediction/releases/download/v0.2.2/switchify-prediction-neural-0.2.2-x86_64-unknown-linux-gnu.zip" } }, - "library_revision": "e5223aa8af58d982278db110b70293546db1cdd7" + "library_revision": "b873c88314b0eb0573f3c34d301fbd2f5761d2ab" } diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 1c215a36..1c55917d 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4216,8 +4216,8 @@ dependencies = [ [[package]] name = "switchify-prediction" -version = "0.2.1" -source = "git+https://github.com/switchifyapp/switchify-prediction?rev=e5223aa8af58d982278db110b70293546db1cdd7#e5223aa8af58d982278db110b70293546db1cdd7" +version = "0.2.2" +source = "git+https://github.com/switchifyapp/switchify-prediction?rev=b873c88314b0eb0573f3c34d301fbd2f5761d2ab#b873c88314b0eb0573f3c34d301fbd2f5761d2ab" dependencies = [ "clap", "rusqlite", @@ -4232,8 +4232,8 @@ dependencies = [ [[package]] name = "switchify-prediction-neural" -version = "0.2.1" -source = "git+https://github.com/switchifyapp/switchify-prediction?rev=e5223aa8af58d982278db110b70293546db1cdd7#e5223aa8af58d982278db110b70293546db1cdd7" +version = "0.2.2" +source = "git+https://github.com/switchifyapp/switchify-prediction?rev=b873c88314b0eb0573f3c34d301fbd2f5761d2ab#b873c88314b0eb0573f3c34d301fbd2f5761d2ab" dependencies = [ "clap", "serde", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 921906cc..1d59d8e5 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -14,8 +14,8 @@ crate-type = ["staticlib", "cdylib", "rlib"] tauri-build = { version = "2", features = [] } [dependencies] -switchify-prediction = { git = "https://github.com/switchifyapp/switchify-prediction", rev = "e5223aa8af58d982278db110b70293546db1cdd7" } -switchify-prediction-neural = { git = "https://github.com/switchifyapp/switchify-prediction", rev = "e5223aa8af58d982278db110b70293546db1cdd7" } +switchify-prediction = { git = "https://github.com/switchifyapp/switchify-prediction", rev = "b873c88314b0eb0573f3c34d301fbd2f5761d2ab" } +switchify-prediction-neural = { git = "https://github.com/switchifyapp/switchify-prediction", rev = "b873c88314b0eb0573f3c34d301fbd2f5761d2ab" } anyhow = "1" base64 = "0.22" directories = "6.0.0" From 23041db5ab3d58476b11b614e0056551af1e4abe Mon Sep 17 00:00:00 2001 From: Owen McGirr Date: Mon, 12 Oct 2026 19:46:07 +0100 Subject: [PATCH 2/2] Note the macOS figure comes from single CI runs Refs #1033 Co-Authored-By: Claude Opus 5.5 --- docs/neural-prediction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/neural-prediction.md b/docs/neural-prediction.md index 0a085606..bc02c072 100644 --- a/docs/neural-prediction.md +++ b/docs/neural-prediction.md @@ -36,4 +36,4 @@ The benchmark now requires 1,000 successful warmed refinements across at most fi ## Reply timeout update -The companion inference and reset reply deadline is now 2 seconds, increased from 500 ms after repeated macOS CI timeouts. Startup remains bounded at 30 seconds, statistical suggestions remain immediate, and late or stale results remain rejected. That change pinned both Rust libraries to `171210ee89e3944d1c606d50ad779a5dfb1651b8`, the timeout fix in switchify-prediction PR #22, and kept the v0.2.0 worker assets. The v0.2.1 worker assets from `2a2ed0c2b0013663ffa9317dba3389ec96b6f14b` added six-slot generation. The worker assets, their converter and both Rust libraries now come from the v0.2.2 release, `b873c88314b0eb0573f3c34d301fbd2f5761d2ab`, still on worker protocol 2. Its workers batch the search and stop it as soon as the ranked words are settled. For the same context they return the same words 3–5× faster: a median of 581 to 121 ms with AVX2 and 1,257 to 424 ms portable on a Windows test machine, and 690 to 151 ms on macOS ARM CI. Generation now sees the current sentence as typed, with case and punctuation. The libraries add incremental, bounded personal learning. The deadlines are unchanged. The earlier 500 ms measurements above remain historical evidence, not measurements of the increased deadline. +The companion inference and reset reply deadline is now 2 seconds, increased from 500 ms after repeated macOS CI timeouts. Startup remains bounded at 30 seconds, statistical suggestions remain immediate, and late or stale results remain rejected. That change pinned both Rust libraries to `171210ee89e3944d1c606d50ad779a5dfb1651b8`, the timeout fix in switchify-prediction PR #22, and kept the v0.2.0 worker assets. The v0.2.1 worker assets from `2a2ed0c2b0013663ffa9317dba3389ec96b6f14b` added six-slot generation. The worker assets, their converter and both Rust libraries now come from the v0.2.2 release, `b873c88314b0eb0573f3c34d301fbd2f5761d2ab`, still on worker protocol 2. Its workers batch the search and stop it as soon as the ranked words are settled. For the same context they return the same words 3–5× faster: a median of 581 to 121 ms with AVX2 and 1,257 to 424 ms portable on a Windows test machine, and 690 to 151 ms on macOS ARM CI in single runs, whose timing varies. Generation now sees the current sentence as typed, with case and punctuation. The libraries add incremental, bounded personal learning. The deadlines are unchanged. The earlier 500 ms measurements above remain historical evidence, not measurements of the increased deadline.