Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 27 May 02:52
· 83 commits to main since this release

[0.4.0] - 2026-05-26

Lets you choose which on-device model to run, and stops holding the model in memory when you're not using it. A new gear/settings popover offers a curated model catalog — pick one and click Load to switch — and the offscreen model is now released after a configurable idle timeout and re-warmed on return, reclaiming the multi-GB WebGPU allocation that previously lived for the entire browser session.

Added

  • User-selectable model picker. A gear button in the panel header opens a settings popover listing a curated model catalog. Selection is select-then-Load: clicking a row only marks the choice; the Load button commits it, force-recreating the offscreen document and re-walking the fallback ladder headed by the chosen model. The choice persists in chrome.storage.local (key local-nano:model-pref:v1) and — unlike the per-device capability record — is NOT invalidated on an extension-version bump, since a model preference is a user choice, not a device fact. No preference set means today's capability-based auto-pick (onnx-community/gemma-4-E2B-it-ONNX). The picker chooses the model only; dtype/device stay automatic (the existing load-time ladder steps them capable→lean), and the model rows are keyboard-operable.
  • Curated model catalog. Two live entries — the gemma-4-E2B-it default (webgpu/q4f16) and the smaller onnx-community/Qwen2.5-0.5B-Instruct (wasm/q8, the CPU/WASM-only "smallest that answers") — span a both-directions size spectrum. Qwen3.5-0.8B and a larger-model slot ship gated OFF (QWEN3_08B_ENABLED, LARGER_MODEL_ENABLED, both false), mirroring the existing SMALLER_MODEL_ENABLED gate, pending manual WebGPU smoke-vetting; only combinations docs/models.md confirms working are ever live.
  • Idle resource release. The offscreen model (a multi-GB WebGPU session) is now freed after a period of inactivity instead of being held for the whole browser session. A chrome.alarms timer — measured from the last generation, so it survives the MV3 service-worker eviction a plain timer would not — fires the service worker, which verifies no generation is in flight (reschedules if one is) and then closes the entire offscreen document, a hard release that actually reclaims VRAM. The offscreen document never closes itself, keeping the worker's readiness flag honest. The next use re-warms: recovery works from the send path (not just panel-open), bounded to a single retry so a dead device cannot spin. The timeout is configurable in the popover — 5 / 15 / 60 min or Never (default 15) — and "Never" disables release for users who would rather keep the model warm.

Notes

  • A model switch and an idle re-warm share ONE serialized teardown+re-warm primitive under a single lock, so two model loads can never overlap (the v0.2.0 VK_ERROR_OUT_OF_DEVICE_MEMORY came from concurrent sessions). A failed switch reverts the stored preference so the next session does not boot into a model that never loaded.
  • All inference still runs on-device. The only network access remains the one-time model-weights download from Hugging Face; switching to a catalog model not yet cached triggers a one-time download for that model.
  • The gated catalog entries (Qwen3.5-0.8B, the larger-model slot) stay off until a manual WebGPU smoke pass confirms each tier loads and answers — CI cannot exercise WebGPU, so on-hardware behavior (real VRAM reclamation, release-then-return) is gated on the manual smoke matrix.