Proto is not affiliated with Biohub. This toolkit is open source and builds on the implementation produced by this organization. Product names, logos, and trademarks are the property of their respective owners.
Background
ESM C (Biohub) is a protein language model trained with the masked language modeling objective: during training, residues are hidden at random and the model learns to predict the original amino acid from the surrounding residues on both sides. For each residue it produces a contextual numerical representation (an embedding), along with per-position scores (logits) over the 20 standard amino acids. ESM C is distributed in the sameesm software package as ESM3, but does not include ESM3’s structure track or sequence-generation capability; it provides only embeddings and per-position scores. Three model sizes are wrapped here, all MIT-licensed: esmc_300m (embedding size 960, 30 layers), esmc_600m (embedding size 1152, 36 layers), and esmc_6b (embedding size 2560, 80 layers). The 6B model is the largest ESM C variant and underpins both the ESM Atlas and the ESMFold2 structure predictor, which is trained on top of a frozen ESM C 6B.
An SAE is trained to reconstruct a language model’s internal activations through a bottleneck that permits only k active features per position out of a much larger codebook. The sparsity pressure pushes individual features toward single interpretable concepts, so a feature may correspond to a specific structural or functional property such as a zinc-binding site, a beta barrel, or a transmembrane helix. Biohub trained SAEs on ESM C using the TopK approach and used them to organize the ESM Atlas, a map of 6.8 billion proteins (Biohub).
The SAEs were trained with two structural hyperparameters that set granularity. k fixes how many features are allowed to activate per residue, with lower values not able to reconstruct the activation as accurately — but higher values are harder to interpret, since a residue explained by 512 features is barely more legible than the dense embedding the SAE replaced. k=64 is the balance Biohub trained across every layer. Additionally, the codebook_size of each SAE fixes how many features exist in total. Small codebooks group related concepts into one feature, for example a single metal-binding feature; large codebooks split that into dedicated zinc-finger, iron-sulfur, and calcium-binding features. Every combination of layer, k, and codebook_size is a separately trained SAE rather than a runtime setting, and not all combinations were published.
Tools
ESM C SAE Features (esmc-sae-features)
Runs each sequence through the ESM C backbone once with SAEs attached to the requested layers, and returns the active codebook features at each residue, ordered by descending magnitude. Start and end tokens are stripped so positions align with the input sequence: feature_indices[0] holds the features for residue 1, and the position column of an exported CSV is 1-indexed, matching the rest of proto-tools.API Reference
Input: MaskedModelInput
Input: MaskedModelInput
Config: ESMCSAEFeaturesConfig
Config: ESMCSAEFeaturesConfig
esmc_300m, esmc_600m, esmc_6bNone uses the ~75%-depth layer Biohub sweeps (300M: 23, 600M: 27, 6B: 60). Each layer adds a download and GPU memory.hidden_states, mlp_outputs64 was trained against every layer, and other values exist solely at the sweep layer.Available options: 16, 32, 64, 128, 256, 512model_checkpoint and sae_target.Available options: 8192, 16384, 32768, 65536, 131072"transformers" matches the published SAE documentation. "esm" reads the esmc toolkit’s weights instead, avoiding a second backbone download at the cost of ~1% disagreement in active features.Available options: transformers, esmTrue is coerced to 1 and False to 0.None waits indefinitely.BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.Output: ESMCSAEFeaturesOutput
Output: ESMCSAEFeaturesOutput
Applications
Feature activations show which concepts the model recognizes at each residue, which supports interpreting what drives an embedding, locating functional sites without supervision, and comparing how proteins are represented internally. Because features are sparse and indexed, activations are directly comparable across proteins: within one SAE, a feature index always denotes the same learned concept. Indices are not comparable between different SAEs, including different layers of the same backbone, since each is trained separately and orders its codebook arbitrarily. TheESMC-6B-sae-layer60-k64-codebook16384 SAE additionally has agent-generated natural-language descriptions for its codebook, available through the ESM Atlas.Usage Tips
layersselects which activations are decomposed. The default is the ~75%-depth layer Biohub sweeps (300M: 23, 600M: 27, 6B: 60), where representations transfer best to downstream tasks. Each extra layer adds a download and GPU memory.sae_targetpicks what the SAE reads.hidden_states(the default) decomposes the accumulated residual stream after a block, so features reflect everything the model has built up to that depth; it is what the ESM Atlas and the published feature descriptions use.mlp_outputsdecomposes only that block’s own MLP contribution before the residual add, which attributes a feature to one layer’s computation. MLP-output SAEs are published only atcodebook_size=131072.kandcodebook_sizeare only free at the sweep layer. All-layer SAEs exist atk=64and one codebook size, so varying either requireslayersto be exactly the sweep layer. The config rejects unpublished combinations and names the valid alternatives.- Only requested layers are downloaded, and layer size tracks
codebook_size. Each layer file holds an encoder and decoder ofd_model x codebook_sizeweights, so a hidden-state layer is 0.13 GB on 300M and 0.34 GB on 6B, while an MLP-output layer (131072 codebook) is 1.0 GB and 2.7 GB respectively. Requesting every layer of the 6B MLP collection would pull roughly 217 GB; the tool logs a warning past 10 GB rather than refusing, since a deliberate multi-layer sweep is legitimate. - Rank features by normalized activation, not raw magnitude. The largest raw activations belong to features that fire on nearly every protein and say little. Biohub’s published statistics correct for this:
(activation / uniref90_max_activation) * uniref90_idfscales a feature to [0, 1] and upweights rare ones.describe_sae_featuresinhelpers.pyreturns both statistics alongside each feature’s label, for the one SAE with published descriptions (ESMC-6B-sae-layer60-k64-codebook16384, which the 6B defaults resolve to). - Output size scales with
ktimes sequence length. Each residue carrieskindices andkmagnitudes, so a 300-residue protein atk=64yields 19,200 pairs per layer.
Toolkit Notes
These apply to every ESM C tool in this toolkit (esmc-embedding, esmc-sae-features).
- ESM C shares the Biohub
esmenvironment with ESM3. Both are distributed in the sameesmpackage and use a single shared on-disk environment (biohub_esm); installing either tool installs the environment for both. - All checkpoints are MIT-licensed and ungated.
esmc_300m,esmc_600m, andesmc_6bare all free for academic and commercial use, and none require a HuggingFace token. Weights download automatically on first use;esmc_6bdownloads roughly 25 GB. - The two tools load the backbone differently.
esmc-embeddingreads theesm-package weights;esmc-sae-featuresloads the Transformers-format backbone (biohub/ESMC-300Mand siblings), because the SAE API is defined on the Transformers model. Both repos hold the same parameters in different serializations, so using both tools downloads the backbone twice: 1.3 GB for 300M, 2.3 GB for 600M, 25.4 GB for 6B. This is deliberate — the SAEs are published and documented against the Transformers model, and reading theesm-package activations instead agrees on only about 99% of active features, which is the wrong trade for an interpretability tool. Each backbone is loaded only when its tool is first called. batch_sizecontrols memory usage. Lower it if you run out of GPU memory; raise it to process short sequences faster. For repeated single-batch calls, useToolInstance.persist_tool("esmc")to keep the model loaded in memory between calls; for multi-GPU or large-batch runs, preferToolPool.

Biohub