Who it is forA researcher who wants to know what a protein model has learned about their sequence.
The problemRaw embeddings say nothing a human can read.
The outcomeA sparse tensor of feature activations per layer you can map to the published feature descriptions.
What you need first
- Python with pip; `pip install esm` is about 5.6 GB, of which about 4.6 GB is the CUDA build of torch
- A CUDA GPU for the local examples, which load models with device set to cuda
- A Biohub Platform API token if you use the hosted client instead of local weights
Steps
- Install the package with
pip install esm - Load ESMC with EsmcForMaskedLM.from_pretrained and the autoencoder with EsmcSaeModel.from_pretrained on biohub/ESMC-6B-sae-k64-codebook16384
- Call sae.initialize_layers([30, 60]) and model.add_sae_models with those layers, as in the README
- Run the model and read output.sae_outputs["layer60"], which is a sparse coo tensor
Prompt for your agent
Using Biohub/esm, attach the ESMC-6B SAE to layers 30 and 60, run <my sequence> through it, and list the strongest sparse features with their shapes.
Caveat. The human readable feature descriptions in the README apply to the ESMC-6B-sae-layer60-k64-codebook16384 codebook, not every SAE variant.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Biohub/esm and "Read which learned features a protein activates"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer