Repository navigation
Add modulo CLI: find, add, verify and run vectors; bundle manifests - #11
Merged
Merged
Conversation
- modulo search: one search over your registries, the community index and modulo_catalog.yaml, with a status and next step per hit - modulo add hf:owner/repo[@rev]: pin the commit, download and inspect vector files (format/layer from shape, dict .pt metadata or filename), check them against the model config, and register them unverified (±8). For bundles, keep only paths naming the model (other models can share hidden size) and one layer per concept. --dry-run, --as-index-entry for draft index entries - modulo extract / verify (strength sweep, --save-range) / run (passthrough to agent/loop.py, which gains --model and --steer NAME=STRENGTH) - --json everywhere with progress on stderr; exit 1 when nothing was done - Sweep code moved to modulo/verify.py; model_dims to modulo/community.py - Loader accepts dict .pt files ({"vector": ...}); registry.yaml keeps its header comments on save; MODULO_MODEL sets the default model - setup.sh does an editable install; docs and CPU tests for the above Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Qwen3-style chat templates think by default, so every generation spent its token budget inside <think>: verify samples, agent turns and extraction activations never came from a real reply. All prompt rendering now goes through modulo.chat.chat_prompt, which passes enable_thinking=False. Templates without the variable ignore it (Qwen2.5 renders byte-identical). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- modulo-bundle.yaml (modulo/bundle.py): a repo describes its vectors (name, file, layer, description, sign convention, test prompts...), with top-level defaults. Validated; maintainer-only fields are rejected. When present, add uses only the manifest's vectors for the model. - Without a manifest, read sidecar metadata (<stem>.json, metadata.json: behavior, model_name, layer_index, best_layer, extraction_method). On rotalabs this picks their best_layer 14 instead of the middle layer. - add accepts a local directory; --as-manifest drafts a manifest. Draft modes print only YAML on stdout. - Manifest and index validation reject unfilled TODO placeholders, so a draft's text can't reach a model's prompt. - Index stays expanded entries (no pointer-style bundle entries) so all prompt text is reviewed in PR diffs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A
modulocommand (installed bypip install -e ., whichsetup.shnow does) so agents and people can find, add, check and run steering vectors. It never prompts, every subcommand takes--json, and the exit code is 1 when nothing was done.search: one search over your registries, the community index andmodulo_catalog.yaml. Each hit has a status (local/verified/community/catalog) and a next step.list: shows whatSteeringAgentwould load for a model, and why.add: adds vectors fromhf:owner/repo[@rev], a huggingface.co URL or a local directory.--as-index-entryand--as-manifestprint drafts instead of registering.extract,verify(strength sweep,--save-range) andrun(the demo, which gains--modeland--steer NAME=STRENGTH).modulo-bundle.yaml): a repo describes its vectors (names, layers, descriptions, sign conventions, test prompts), validated against the index's field rules.metadata.json/layer_N.json, includingbest_layer).<think>(agent turns, verify samples, extraction). All prompt rendering now passesenable_thinking=False. Qwen2.5 renders byte-identical..ptfiles ({"vector": ...}).registry.yamlkeeps its header comments on save.MODULO_MODELsets the default model.TODOplaceholders.Testing
tests/test_cli.pycovers search,addagainst a fake hub, manifests, sidecars, local directories and naming.modulo verify assistant_axisreproduces the known behaviour (+12 coherent, +15 muddled, −15 florid).add→verify→run --steerworks on Qwen3-8B with rotalabs vectors.Known limitations
verify's suggested range only detects repetition, so it suggests ±15 for assistant_axis, where the real positive cap is +12. Read the samples before trusting a range; the docs say so.🤖 Generated with Claude Code