oumi-weights-lab
БесплатноБез исполняемых скриптовНе проверенUse when asked to find out how an open-weights language model does something (which heads, MLPs, neurons, features, or directions carry a behavior) or to test…
от majiayu000★ 31 звезда на GitHubОб этом скилле
Oumi Weights Lab
Run Python against a live model with tested calls for finding mechanisms, editing weights with exact undo, and measuring what changed. There are two ways to run it, with the same lab object:
- A script, for a model that loads in seconds, such as one under a billion parameters on CPU. Write a file that calls
open_laband run it withoumi-weights-lab script analysis.py, which runs it in the lab's own environment. A script session holds onlyartifacts/, sosend,peek,stopandbackupdo not apply to it. - A persistent worker, for a large model or a long session. Load the model once, then send Python snippets (see Session commands). Snippets share state, so an edit made in one is measured in the next, and the worker saves every snippet's source, output, and forward-pass count in the session directory.
Scripts and snippets are trusted Python with the user's filesystem and network access.
Understand a model: start here
Don't write your own ablation loops and hooks. These calls do it, tested, and leave the model as they found it:
from oumi_weights_lab import open_lab
lab = open_lab(
"/abs/path/to/model", device="cpu"
) # or a Hub id; a worker snippet already has `lab`
rows = [{"prompt": "The capital of France is", "options": [" Paris", " Rome"], "answer": 0}]
scan = lab.ablation_scan(rows) # zero each head and MLP, batched; most breaking first
print(scan["parts"][:5])
clean = ["When Mary and John went to the store, John gave a drink to"]
corrupt = ["When Mary and John went to the store, Anna gave a drink to"]
direct = lab.logit_attribution(clean[0], (" Mary", " John")) # who writes the answer
edges = lab.edge_attribution(clean, corrupt, metric=(" Mary", " John")) # candidate circuit
circuit = lab.find_circuit(
clean, corrupt, metric=(" Mary", " John"), top=50, edges=edges
) # tested by real patching, reusing the attribution above
print(circuit["faithfulness"])
These calls are not a sequence to run in order; choose each one for what it would tell you (see Investigate by experiment). ablation_scan is a broad sweep, not the answer: a part with a backup shows no drop, and a part that breaks the behavior may be only one of several, so scan groups (groups="layers", "pairs") and then run the circuit calls.
- Choose a method says which call answers which question, what each cannot show, and what each costs. That covers heads, directions (
contrast_directions), sparse features (load_sae), and attribution graphs. - Find and test a circuit is the protocol for a claim: rival hypotheses, faithfulness and completeness, look-alikes, redundancy, and a report of what failed. A single ablation sweep misses backup parts and parts that only work together.
Investigate by experiment
Treat the model as the subject of an experiment, not a checklist. There is no fixed order of calls: at each step, run the experiment that would most reduce your uncertainty about what the task needs, for what it costs. Uncertainty that would not change your answer or your edit is not worth resolving.
Keep a belief file, such as beliefs.md in the session directory, and update it after every experiment:
- Established: findings that survived an intervention and a control, each with the test that showed it.
- Hypotheses: the rival explanations still standing, the evidence for and against each, and how confident you are in each.
- Assumptions: what you rely on but have not tested, such as "this prompt pair isolates the behavior" or "the feature is linear at this site".
- Open questions: what you do not know yet, the ones that matter most to the task first.
Before each experiment, answer in the belief file:
- What am I unsure of that matters for the task?
- Which explanations compete?
- Which experiment would come out differently under each of them?
- What will each possible outcome tell me? Write the result each hypothesis predicts before you run.
- Is there a cheaper experiment that would tell me nearly as much?
An experiment that every standing hypothesis predicts the same way teaches nothing, however thorough it is.
- Cost. Reading weights (
parts,measure,compare,head_weights) costs no forward passes and shows what a part could do: what it reads and writes, and how large it is. Running prompts shows what the model does on them. Only an intervention with a control shows what a part causes. Rule out what cheap experiments can, and spend passes where only an intervention can decide. Choose a method lists each call's cost, andlab.forward_passesread before and after a call gives the count. - Surprises. When a result fits none of your predictions, check the setup first: active edits (
lab.active_edit_ids), patches and batch size, and whether restored scores match the baseline. If
Установить oumi-weights-lab в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл oumi-weights-lab?
Use when asked to find out how an open-weights language model does something (which heads, MLPs, neurons, features, or directions carry a behavior) or to test such a claim; when asked to ablate, zero, edit, swap, or compare a model's parameters, including LoRA adapters; when measuring how a weight change affects a model's answers; or when recording, patching, or probing a Hugging Face causal model's activations or gradients.
Как установить скилл oumi-weights-lab?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл oumi-weights-lab запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic