# Weight-Space Index (wsi)

> Read, search and surgically edit transformer weights (.safetensors) without training, and apply reversible .moipatch fixes.

Weight-Space Index (wsi) is a free AI agent skill on Agensi by Ulises Cardella, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ulises Cardella](https://www.agensi.io/creators/ulises-cardella)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-18
- Security: scan passed (2026-11-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/weight-space-index-wsi
- Tags: llm-ops, research-analysis

## About this skill

Teach your agent to open a transformer checkpoint and read it like code. This skill drives **Weight-Space Index (`wsi`)**, an open-source toolkit (Apache-2.0) that indexes what every neuron reads and writes in vocabulary terms, straight from the `.safetensors` weights, on CPU and without training.

**What your agent can do with it**
- **Find facts in the weights:** which neurons map "France" to "Paris", and the readable rule each one follows (`[Eiffel, France] -> [Paris, Louvre]`).
- **Explain neurons and circuits:** what triggers a neuron, what it writes, and which earlier and later neurons connect to it.
- **Rewire a fact** without training (for example "Tower -> Paris" becomes "Tower -> Rome") and write the change to a separate edit file.
- **Explain edits and fine-tunes:** a semantic diff of what moved between two checkpoints.
- **Work across models:** align circuits between architectures and transfer an edit from one model to another.
- **Use `.moipatch` files:** small (tens of KB), reversible weight patches that carry their own router, gates and SHA-256 fingerprint of the base model. The repository ships an anti-sycophancy patch for Qwen3.5-4B (on MMLU pushback, the share of correct answers the model keeps rises from 15.0% to 40.1%) and a repetition-loop fix for Qwen3.5-0.8B.
- **Set up the `wsi` MCP server** so other agents get the same tools.

The skill also tells the agent to report readings honestly: weight-space findings are hypotheses until a forward pass confirms them, and the original checkpoint is never overwritten.

Source and benchmarks: https://github.com/krexito/weight-space-index

## Requires

- Python 3.10+
- PyTorch + safetensors
- A local .safetensors model
- Optional: transformers (runtime capture, .moipatch)
- Optional: Hugging Face CLI (model download)

## Known limitations

Weight-space readings are hypotheses about what a neuron does until a forward pass confirms them. Rewiring is tested mostly on GPT-2, Qwen3.5 and LFM3; other architectures may need checks. The shipped .moipatch files only attach to their exact base model (Qwen3.5-0.8B / 4B). Large models need enough RAM to read their weights.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Weight-Space Index (wsi) skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does Weight-Space Index (wsi) do?

Read, search and surgically edit transformer weights (.safetensors) without training, and apply reversible .moipatch fixes.

### Which AI agents support Weight-Space Index (wsi)?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Weight-Space Index (wsi)?

Connect your AI agent to Agensi through MCP, then ask it to use Weight-Space Index (wsi) on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
