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
1 change: 1 addition & 0 deletions .github/workflows/neural.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches: [main]
pull_request:
workflow_dispatch:
workflow_call:
permissions:
contents: read
concurrency:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ jobs:
import os, pathlib, tomllib
version = tomllib.loads(pathlib.Path('Cargo.toml').read_text())['package']['version']
assert os.environ['GITHUB_REF_NAME'] == 'v' + version, 'Tag must match Cargo.toml'
for manifest in ['neural/Cargo.toml', 'neural/worker/Cargo.toml']:
assert tomllib.loads(pathlib.Path(manifest).read_text())['package']['version'] == version, 'Companion versions must match'
PY
validate:
needs: version
uses: ./.github/workflows/ci.yml
neural:
needs: version
uses: ./.github/workflows/neural.yml
draft:
needs: validate
needs: [validate, neural]
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -39,4 +44,4 @@ jobs:
RELEASE_TAG: ${{ github.ref_name }}
shell: bash
run: |
gh release create "$RELEASE_TAG" --verify-tag --draft --generate-notes release-assets/*/*.zip release-assets/*/*.sha256
gh release create "$RELEASE_TAG" --verify-tag --draft --notes-file "docs/releases/$RELEASE_TAG.md" release-assets/*/*.zip release-assets/*/*.sha256
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.1.0"
version = "0.2.0"
edition = "2024"
rust-version = "1.97.1"
license = "MIT"
Expand Down
14 changes: 14 additions & 0 deletions docs/releases/v0.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Switchify Prediction v0.2.0

Adds an optional offline SmolLM2 companion library and CLI. It returns statistical suggestions immediately and can refine them asynchronously in an isolated worker. Existing predictor APIs, personal learning, database formats and the default statistical model are unchanged.

The neural companion is experimental and **not production-qualified**. Optimized Windows refinement measured 122 ms p95, but two development quality cells regressed and portable performance missed the target. Linux and macOS packages passed build and automated tests; actual model performance on those platforms remains unmeasured. See the repository's `docs/smol-production-results.md` for measurements and limitations.

## Downloads

- `switchify-prediction-*` packages contain the statistical CLI.
- `switchify-prediction-neural-*` packages contain the companion CLI and workers for the named platform. These are separate from the statistical CLI packages.
- The model bundle contains the existing English statistical database and attribution notices.
- Each ZIP has a SHA-256 file. Verify it and run the included `verify_bundle.py` after extraction.

Neural model weights are not included. Follow `neural/README.md` to assemble the pinned local model bundle. The companion never downloads weights at runtime. Packages include license notices and explicit qualification status. Executables are unsigned, and this release does not integrate the companion into Switchify PC or publish crates to crates.io.
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.1.0"
version = "0.2.0"
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.1.0"
version = "0.2.0"
edition = "2024"
rust-version = "1.97.1"
license = "MIT"
Expand Down
6 changes: 4 additions & 2 deletions scripts/package_neural.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import shutil
import subprocess
import tempfile
import tomllib

import dependency_notices

Expand Down Expand Up @@ -65,7 +66,8 @@ def main():
rustc = subprocess.check_output(['rustc', '-vV'], text=True)
target = next(line.split(': ',1)[1] for line in rustc.splitlines() if line.startswith('host: '))
ext = '.exe' if os.name == 'nt' else ''
name = 'switchify-prediction-neural-0.1.0-' + target
version = tomllib.loads((ROOT / 'neural/Cargo.toml').read_text())['package']['version']
name = 'switchify-prediction-neural-' + version + '-' + target
args.output.mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory() as temp:
stage = Path(temp) / name
Expand All @@ -85,7 +87,7 @@ def main():
(stage / 'THIRD_PARTY_NOTICES.md').write_text(notices(target), encoding='utf-8')
sysroot = Path(subprocess.check_output(['rustc','--print','sysroot'], text=True).strip())
shutil.copyfile(sysroot / 'share/doc/rust/COPYRIGHT-library.html', stage / 'RUST_LIBRARY_COPYRIGHT.html')
(stage / 'BUILD.json').write_text(json.dumps({'version':'0.1.0','target':target, 'rustc':rustc,
(stage / 'BUILD.json').write_text(json.dumps({'version':version,'target':target, 'rustc':rustc,
'platform':platform.platform(), 'libc':platform.libc_ver(), 'signed':False,
'commit':subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(),
'model_id':'smollm2-135m-q8-v1', 'accelerated_requires':['avx2','fma','f16c'] if args.accelerated else [],
Expand Down
Loading