Skip to content

v5.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 31 Oct 12:09
c249306

Drowse 5.4.0: a full restructure of the library, plus lens format v7, typed request errors, faster steering and a tidier dashboard. 6.0 stays reserved for the S-lens/mid-lens work and the Ledger redesign.

What changed

  • Layered packages. drowse.core and drowse.io are now 17 packages in a fixed layer order (base, geometry, model, store, steering, readout, lens, sae, generation, fit, loom, session, and the CLI, server, web and notebook fronts). tests/invariants/test_layering.py enforces the order, type-only imports included.
  • The session is a facade. drowse/core/session.py (11,015 lines) became drowse/session/session.py (1,754 lines) over collaborators that own their state: engine, batch, registry, neutral baseline, read plane, one token replay for geometry, lens and SAE. Nothing outside drowse/session/ reads a session private.
  • Lens format v7. Lenses live under models/<id>/lens/ as local/r and local/j, keyed by kind (J/R/K/S) and site (out/mid). The active-lens file has an output side and an input side. Pre-5.4 homes need python scripts/migrate_lens_v7.py --home DIR once; it relinks the same shard bytes and refits nothing.
  • Typed request errors. Client input raises RequestError (400, text verbatim) or a subclass; a bare ValueError is a broken invariant and answers a scrubbed 500.
  • Faster. Against 5.3 on SmolLM2-360M (MPS), with the 17 default probes attached: unsteered decode +1%, affine steering +6% to +19%, probe-gated +53%, curved % steering +35%, session load −9%, months fit −15%. Resident manifolds and probes now upload as one packed device buffer each (geometry/packing.py).
  • Tests and docs. The suite runs on a real tiny CPU session instead of stubs and is organized by package (4,938 tests). Every package has its own AGENTS.md, and ARCHITECTURE and README were rewritten.
  • Dashboard. Svelte 5.57.2 (5.55.8 can freeze its update scheduler under rapid interaction), lazy drawer loading, the Neurons header link removed, and fixes for the token drilldown's remembered tab and first-open drawer focus. The built dist dropped from 11 MB to 5.2 MB.

Breaking changes

  • Module paths under drowse.core and drowse.io are gone. from drowse import X is unchanged.
  • Removed DrowseSession forwarders: diff_nodes, rewind, clear_history, remove_cast_member, ensure_manifold_loaded, ensure_profile_registered. Use session.tree, session.registry or drowse.loom.diff.node_diff. New: session.joint_logprobs(a, b).
  • Lens artifacts must be format v7 (see above). Manifolds, fits, neutral caches, templates, loom trees, transcripts, archives and SAE artifacts keep their formats and load as-is.
  • Server: an unexpected ValueError is now a 500. CLI: template format and ambiguity errors exit 2 instead of 1.
  • drowse lens fit --standard is now --kind j; lens use takes local:r / local:j.

Verification

Full suite with MPS: 4,928 passed, 8 skipped. Perf gates 2/2. svelte-check 0 errors, 0 warnings. Doc references checked against the code: 0 broken of 6,606. Browser goldens byte-identical. drowse.ai's port (branch six-prep) passes its node, Python and build suites; its remaining e2e failures reproduce on drowse.ai main.


What's Changed

Full Changelog: v5.3.1...v5.4.0