Skip to content

v0.5.0

Choose a tag to compare

@jgreer013 jgreer013 released this 07 Nov 06:10
9a114ed

Oumi Weights Lab 0.5 is about understanding a model. Analyses that find and test circuits are now tested lab calls: direct logit attribution, path patching, edge attribution, sparse autoencoders and transcoders, attribution graphs, and contrastive directions. Agents can save the methods they write, and the skill gains a method map and a research protocol. Version 0.5 is experimental, and snippets run as trusted Python with your filesystem and network access.

Tested on CPU with tiny GPT-2 and grouped-query Llama models, on the oldest and newest supported versions of PyTorch, Transformers, PEFT, accelerate and bitsandbytes. The proving ground's tasks planted inside GPT-2 small were validated live, and its network limit was checked live in Docker.

Highlights

Building blocks for new methods

  • run_with runs a forward pass with temporary interventions.
  • jacobian, jvp and vjp take derivatives between any two sites.
  • sweep runs one prompt under many sets of interventions, in batched passes.
  • ablation_scan zeroes each head and MLP, or groups and pairs of them, in batched passes. It is the fast first sweep, and its docs say what a sweep can't show.

Circuit analyses

  • logit_attribution, path_patch, edge_attribution and find_circuit find a circuit and test it.
  • contrast_directions computes directions from contrasting prompts and checks them on held-out rows.

Features

  • load_sae loads sparse autoencoders and transcoders through SAELens (the saes extra), and edits their features.
  • attribution_graph builds feature-level attribution graphs from transcoders.

Methods the agent writes

  • save_method, load_method and run_method keep a method with its source, results and setup.
  • oumi-weights-lab methods promote writes a recipe draft from one for a maintainer.

Scripts

  • open_lab loads a model in a plain Python script.
  • oumi-weights-lab script FILE runs that script in the lab's environment.

The skill

  • A method map says which call answers which question.
  • A research protocol asks for rival hypotheses, faithfulness checks, and a search for backup mechanisms.
  • A quick start for understanding a model opens the skill.

The proving ground

  • Planted mechanisms with held-out answer keys.
  • A Docker runner with a skill arm and a control arm.
  • A scorer, and a paired comparison.
  • The agent's container can reach only the agent API host, so it can't download a model to diff against.
  • The proving-ground page lists what each task family can and can't show, including what still finds the GPT-2 keys from the weights.

Install this version

Claude Code:

claude plugin marketplace add oumi-ai/weights-lab
claude plugin install oumi-weights-lab@oumi-weights-lab

The plugin includes the SAE support. As before, it includes quantized loading except on Intel Macs and macOS before 14.

CLI, pinned to this release, with LoRA adapters, Hugging Face datasets, multi-GPU loading, quantized loading and SAEs:

uv tool install 'oumi-weights-lab[adapters,datasets,multi-gpu,quantized,saes] @ git+https://github.com/oumi-ai/weights-lab@v0.5.0'

See the README for Codex and other agents.

What's Changed

  • Add a proving ground that scores agents on planted mechanisms by @jgreer013 in #85
  • Add run_with, jacobian, jvp, vjp and sweep for writing new methods by @jgreer013 in #86
  • Compute directions from contrasting prompts with a held-out check by @jgreer013 in #87
  • Add direct logit attribution, path patching, and EAP-IG circuit analyses by @jgreer013 in #88
  • Load sparse autoencoders and transcoders and edit their features by @jgreer013 in #89
  • Build feature-level attribution graphs from transcoders by @jgreer013 in #90
  • Save agent-written methods with their source, results and setup by @jgreer013 in #91
  • Add a method map and a research protocol to the skill by @jgreer013 in #92
  • Plant redundant and self-repairing copy heads in the proving ground by @jgreer013 in #93
  • Run the lab from a plain script with open_lab by @jgreer013 in #94
  • Add ablation_scan, a batched sweep that zeroes each head and MLP by @jgreer013 in #95
  • Plant copy mechanisms inside GPT-2 small for the proving ground by @jgreer013 in #96
  • Set the version to 0.5.0 by @jgreer013 in #97

Full Changelog: v0.4.0...v0.5.0