CC

chrishayuk/chuk-mcp-lazarus

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

21 stars 4 forks 품질 62 트렌드 30

Mechanistic interpretability MCP server wrapping chuk-lazarus.

개요

Mechanistic interpretability MCP server wrapping chuk-lazarus. Load any model, extract activations, train probes, steer generation, and ablate components -- all via MCP tools that Claude (or any MCP client) can call autonomously. Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json): Works with any model chuk-lazarus supports: - -- Gemma 3 (270M--27B), TranslateGemma 4B/12B - -- Llama 2/3, Mistral, SmolLM2 - -- Qwen 2/3 - -- IBM Granite 3.x/4.x (hybrid Mamba-2/Transformer) - -- AI21 Jamba (hybrid Mamba-Transformer MoE) - -- Pure SSM models - -- Code generation - -- GPT-2 and compatible Default demo target: (34 layers, fits on Apple Silicon). Smoke tests use for speed. The flagship experiment follows a 15-step workflow: 1. -- load_model("google/gemma-3-4b-it") 2. -- get_model_info() reveals 34 layers 3. -- see how the prompt breaks into tokens 4. -- see baseline model output 5. -- verify activations are non-trivial 6.

README

원문 README의 일부입니다. 원문 보기.

chuk-mcp-lazarus

Mechanistic interpretability MCP server wrapping chuk-lazarus.

Load any model, extract activations, train probes, steer generation, and ablate components – all via MCP tools that Claude (or any MCP client) can call autonomously.

Quick Start

# Clone and install
git clone https://github.com/chuk-ai/chuk-mcp-lazarus.git
cd chuk-mcp-lazarus
uv sync

# Run the smoke test (53 tests on SmolLM2-135M, ~3 seconds)
uv run python examples/smoke_test.py

# Run the full 15-step language transition demo
uv run python examples/language_transition_demo.py

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "lazarus": {
      "command": "uv",
      "args": ["run", "chuk-mcp-lazarus", "stdio"],
      "cwd": "/path/to/chuk-mcp-lazarus"
    }
  }
}

Tools (64)

Group Tool Purpose
Model load_model Load any HuggingFace model into memory
Model get_model_info Return architecture metadata
Generation generate_text Generate text from the loaded model
Generation predict_next_token Top-k next-token predictions with probabilities
Generation tokenize Show how text is tokenized
Generation logit_lens Layer-by-layer prediction evolution (calibrated logit lens)
Generation track_token Track a specific token’s probability across layers
Generation track_race Race N candidate tokens across layers with crossing detection
Generation embedding_neighbors Find nearest tokens in embedding space (cosine similarity)
Activations extract_activations Hidden states at specific layers and positions
Activations compare_activations Cosine similarity + PCA across prompts
Attention attention_pattern Per-head attention weights at specified layers
Attention attention_heads Per-head entropy and focus analysis
Probing train_probe Train a classifier on activations
Probing evaluate_probe Evaluate on held-out data
Probing scan_probe_across_layers Find the crossover layer
Probing probe_at_inference Run a trained probe during autoregressive generation
Probing list_probes List all trained probes
Steering compute_steering_vector Contrastive activation addition
Steering steer_and_generate Generate with steering applied
Steering list_steering_vectors List all computed vectors
Ablation ablate_layers Zero out layers, measure disruption
Ablation patch_activations Swap activations between prompts
Causal trace_token Which layers are causally necessary for a prediction
Causal full_causal_trace Position × layer causal heatmap (Meng et al. style)
Residual residual_decomposition Attention vs MLP contribution per layer
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "lazarus": { "command": "uv", "args": ["run", "chuk-mcp-lazarus", "stdio"], "cwd": "/path/to/chuk-mcp-lazarus" } } }