---
title: ESM-3 inputs and parameters
description: 'Sequence formats, model size options, and embedding configuration for ESM-3.'
tags:
  - esm3
  - inputs
---

You provide a single-chain protein sequence — pasted directly, fetched by UniProt ID, or imported from a previous job. The parameter that most affects your result is model size: larger variants produce higher-quality embeddings at the cost of speed, so pick the variant that matches whether you value throughput or embedding fidelity.

## Webapp input methods

The .bloom* webapp provides three input methods for ESM-3 protein embeddings.

## Input type selection

| Input Type | Description | Example |
|------------|-------------|---------|
| **Protein Sequence** | Direct amino acid sequence entry | `MKTAYIAKQRQISFVKSHFSRQDILDLWIYHTQGYFP...` |
| **UniProt ID** | Automatic sequence fetch from UniProt | `P68871`, `Q9Y261` |
| **From Previous Job** | Import from BLAST, ESMFold, or other tools | Select from job outputs |

## Protein sequence input

- **Format**: Raw amino acid sequence using single-letter codes
- **Validation**: Real-time checking for invalid characters
- **Length range**: 10-2,048 residues (optimal: 50-1,000)
- **Case sensitivity**: Automatically converted to uppercase
- **Multiline**: Supported for longer sequences
- **FASTA format**: Header lines starting with `>` are supported; multiple sequences allowed

## UniProt ID input

- **Format**: UniProt accession codes (e.g., `P00533`, `P68871`)
- **Auto-fetch**: Automatic sequence retrieval from UniProt database
- **Validation**: Real-time format checking
- **Isoforms**: Selection of alternative splice variants when available
- **Metadata**: Protein names, organism, and function annotations loaded automatically

## Previous job integration

### Compatible tools
- **BLAST**: Sequence search results with hit sequences
- **ESMFold**: Predicted structures (sequence extraction)
- **Sequence analysis**: Processed or extracted sequences
- **Other ESM-3 runs**: Re-embed with different model sizes or parameters

### Data handling
- **Multi-sequence files**: Automatic parsing and selection
- **Format conversion**: Handling various sequence file formats
- **Provenance tracking**: Maintains connection to original data source

## Sequence requirements

ESM-3 accepts single-chain protein sequences containing standard amino acids.

## Character validation
- **Standard amino acids only**: ACDEFGHIKLMNPQRSTVWY
- **Excluded characters**: B, J, O, U, X, Z are not supported
- **Special characters**: Whitespace, numbers, and punctuation are automatically removed
- **Case normalization**: Converted to uppercase for consistency

## Length considerations
- **Minimum**: 10 residues (shorter sequences lack sufficient context)
- **Optimal range**: 50-1,000 residues for high-quality embeddings
- **Maximum**: 2,048 tokens (model context window limit)
- **Long sequences**: Sequences exceeding the context window are truncated with a warning

## Batch processing
- **Multi-FASTA**: Submit multiple sequences in a single FASTA file
- **Unique headers**: Each sequence must have a unique FASTA header for result mapping
- **Batch size**: Up to 100 sequences per batch job
- **Memory scaling**: Total memory increases with batch size and maximum sequence length

## Model parameters

## Model size selection

| Model | Parameters | Embedding Dim | Speed | Quality |
|-------|-----------|---------------|-------|---------|
| **ESM-3 Small** | 1.4B | 1,536 | Fast | Good |
| **ESM-3 Medium** | 7B | 2,560 | Moderate | Better |
| **ESM-3 Large** | 98B | 6,144 | Slow | Best |

### Choosing a model size
- **Small**: Best for batch processing, initial exploration, and when speed matters more than embedding quality
- **Medium**: Recommended default; good balance of quality and speed for most use cases
- **Large**: Best for critical analyses where embedding quality is paramount; significantly slower

## Embedding parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| **model_size** | string | `esm3_sm` | Model variant (esm3_sm, esm3_md, esm3_lg) |
| **task** | string | `embeddings` | Analysis task: embeddings, structure_prediction, function_prediction, sequence_generation, or masked_prediction |
| **return_attention** | boolean | false | Return attention maps for contact prediction |
| **pooling** | string | `mean` | Pooling strategy for per-sequence embedding (mean, cls, none) |

### Output type details

**Per-residue embeddings (L x D):**
- One embedding vector per amino acid position
- Dimension D depends on model size (1,536 to 6,144)
- Captures local structural and functional context at each position
- Best for: residue-level property prediction, contact maps, variant effect estimation

**Per-sequence embeddings (1 x D):**
- Single embedding vector representing the entire protein
- Computed by pooling per-residue embeddings
- Best for: protein-level classification, similarity search, clustering

### Pooling strategies

| Strategy | Description | Best For |
|----------|-------------|----------|
| **mean** (default) | Average across all residue positions | General-purpose protein comparison |
| **cls** | Use the CLS token embedding | Tasks where global context is critical |
| **none** | Return unpooled per-residue embeddings | Residue-level ML tasks; skips sequence-level pooling |

## Sequence preprocessing

### Automatic steps
- Whitespace and special character removal
- Case normalization to uppercase
- Length validation against model context window
- Character validation against standard amino acid alphabet

### Manual recommendations
- **Signal peptides**: Consider removing signal peptides if you want embeddings of the mature protein only
- **Propeptides**: Remove propeptide regions if not part of the functional protein
- **Domain extraction**: For multi-domain proteins, consider embedding individual domains separately for higher-resolution analysis
- **Isoform selection**: Choose the most biologically relevant isoform

## Read next
