Skip to main content
License: ESM C (Cambrian) is open source and free for academic and commercial use under an MIT license. Please refer to the license for full terms.

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.


Biohub/esm
Biohub/esm
View repo
biohub/ESMC-6B
biohub/ESMC-6B
View model
biohub.ai
Visit website
Language Modeling Materializes a World Model of Protein Biology
Salvatore Candido, Thomas Hayes, … Alexander Rives
2026
Read paper
Copy citation
evo-design/proto-tools/proto_tools/tools/masked_models/esmc
View source
Open Notebook
Open notebook
proto-tools on GitHub
Run locally with proto-tools
Toolkit contributors

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 same esm 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.

Tools

ESM C Embeddings (esmc-embedding)

Runs each input sequence through ESM C once and averages the per-residue representations, excluding the start and end tokens and any padding, into a single fixed-length vector per sequence. Per-position scores (logits) over the 20 standard amino acids are also returned when requested.

API Reference

Source
List[string]
required
Protein sequence(s) to process. Can be provided as:
Source
enum
default:"esmc_300m"
ESM C weights variant. "esmc_300m" (960-dim embeddings), "esmc_600m" (1152-dim), and "esmc_6b" (2560-dim). Larger checkpoints give richer representations at the cost of GPU memory; "esmc_6b" holds ~13 GB of bf16 weights.Available options: esmc_300m, esmc_600m, esmc_6b
boolean
default:"False"
Include per-position logits in the output (large; disable to save memory).
integer
default:"-1"
Transformer layer index for embeddings. -1 returns the post-norm final-layer output (outputs.embeddings); other indices select from pre-norm per-block outputs.hidden_states. Range is checkpoint- dependent (esmc_300m: 30 layers, esmc_600m: 36 layers, esmc_6b: 80 layers).
integer
default:"0"
Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr).
string
default:"cuda"
Device to run the model on.
integer
default:"3600"
Maximum execution time in seconds. None waits indefinitely.
integer
Random seed. When set, tools run reproducibly up to small GPU float noise (see BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
integer
default:"8"
Number of sequences to process in parallel. Larger batches improve throughput but require more GPU memory.
Source
List[SequenceEmbedding]
required
Per-sequence embedding results. Each SequenceEmbedding contains:

Applications

The averaged embedding is a learned numerical representation of a protein, suitable for machine-learning tasks such as clustering, classification, and property prediction, and for similarity search by comparing these vectors (for example with cosine similarity). The optional per-position scores give the model’s predicted amino-acid preference at each site, useful for conservation analysis and for examining the model’s expectations at specific positions. ESM C is embedding-focused, so it is the lighter-weight choice when you need embeddings or per-position scores but not sequence generation or scoring.

Usage Tips

  • model_checkpoint selects the model size. esmc_300m (the default) has embedding size 960, esmc_600m has 1152, and esmc_6b has 2560. Larger checkpoints give richer representations but cost more GPU memory and time — esmc_6b loads about 13 GB of bf16 weights, before activations that grow with sequence length and batch_size.
  • repr_layer selects which internal model layer the embedding is taken from. The default -1 uses the final layer; other values select earlier layers.
  • Per-position scores are large. Enabling return_logits adds an array of size (sequence length by 20) per sequence, which dominates runtime and memory for long inputs. Leave it set to False unless you need the per-position scores.

Toolkit Notes

These apply to every ESM C tool in this toolkit (esmc-embedding).
  • ESM C shares the Biohub esm environment with ESM3. Both are distributed in the same esm package 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, and esmc_6b are all free for academic and commercial use, and none require a HuggingFace token. Weights download automatically on first use; esmc_6b downloads roughly 25 GB.
  • batch_size controls memory usage. Lower it if you run out of GPU memory; raise it to process short sequences faster. For repeated single-batch calls, use ToolInstance.persist_tool("esmc") to keep the model loaded in memory between calls; for multi-GPU or large-batch runs, prefer ToolPool.
Example notebook: See the full working example for a copy-paste-ready walkthrough.

Infrastructure Guides

The following guides cover how to run tools efficiently and at scale.

Tool Persistence

Keep a tool’s model warm across calls instead of reloading it every invocation.

Device Management

How GPUs are allocated to tools and how to target specific devices.

Parallel Execution

Fan a batch of inputs out across multiple GPUs.