DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to read which learned features a protein activates with Esm

Attach an ESMC sparse autoencoder and inspect the sparse feature activations for a sequence.

Short answer: Install the package with pip install esm; then 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. All steps.

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

  1. Install the package with pip install esm
  2. Load ESMC with EsmcForMaskedLM.from_pretrained and the autoencoder with EsmcSaeModel.from_pretrained on biohub/ESMC-6B-sae-k64-codebook16384
  3. Call sae.initialize_layers([30, 60]) and model.add_sae_models with those layers, as in the README
  4. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer