One-click install
npx skills add https://github.com/zjunlp/Mechanist --skill saelens-zjunlp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: saelens
Source: https://github.com/zjunlp/Mechanist/tree/main/skills/mechanism-skills/feature-dictionary-learning/SAE
Command: npx skills add https://github.com/zjunlp/Mechanist --skill saelens-zjunlp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sae-lens.

What problem does it solve? Mechanistic interpretability researchers need to decompose dense language model activations into interpretable features, but training and evaluating sparse autoencoders (SAEs) involves complex pipelines for activation caching, training, and quality evaluation. ## Core Features & Use Cases - SAE Training & Loading: Train Standard, TopK, or Gated SAEs on model activations, or load pre-trained SAEs from Neuronpedia and HuggingFace. - Model Integration: Hook SAEs into transformer forward passes via HookedSAETransformer and TransformerLens for feature-level analysis. - Evaluation & Visualization: Measure variance explained, L0 sparsity, and reconstruction loss, and generate feature dashboards with SAE-Vis. - Use Case: Load a pre-trained Gemma Scope SAE, run it on GPT-2 activations, and inspect which features fire on specific prompts to understand model behavior. ## Quick Start Install sae-lens with pip and use this skill to load a pre-trained SAE and analyze the features active in my model's layer 6 residual stream.

Frequently Asked Questions about saelens

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a sparse autoencoder on language model activations?

Use the sae-lens package to run a cache activation pipeline that collects model activations, then train a Standard, TopK, or Gated SAE on them. The training tutorials in SAELens walk through configuration and evaluation of the trained SAE.

How to load pre-trained SAEs from Neuronpedia or HuggingFace?

SAELens provides loading utilities that fetch pre-trained SAEs directly from Neuronpedia or HuggingFace by name. The pre-trained SAEs list in the documentation catalogs available releases such as Gemma Scope.

Does SAELens work with HuggingFace Transformers models?

Yes, SAELens integrates with HuggingFace Transformers and other PyTorch-based models, and also provides HookedSAETransformer for hooking SAEs into TransformerLens forward passes during interpretability analysis.

How do I evaluate sparse autoencoder quality?

Evaluate SAEs using variance explained, L0 sparsity, and reconstruction loss metrics built into SAELens. For standardized comparisons, the SAEBench benchmark suite provides additional evaluation protocols.

What are the limitations of sparse autoencoders for interpretability?

SAEs approximate activations with reconstruction error, so some information is lost, and learned features may not perfectly align with human-interpretable concepts. Results should be validated with metrics like reconstruction loss and cross-checked against downstream behavior.