get_embedding_layers
Retrieve available embedding layers from Evo 2 models, with curated recommendations for downstream tasks like classification and interpretation.
Instructions
Get available layers for embedding extraction from Evo 2 model.
Returns a list of layer names that can be used to extract sequence embeddings from the specified Evo 2 checkpoint. Different layers encode varying levels of biological abstraction. Larger models tend to have more nuanced representations but require more computational resources. For supervised classification tasks (e.g., variant effect prediction), intermediate layers like Block 20 (40B model) often perform best. For mechanistic interpretability (e.g., SAE training), deeper layers like Layer 26 are commonly used. For probing tasks, top-level layers (e.g., blocks.26 in 7B model) may be optimal.
Args:
checkpoint: Model checkpoint identifier. See list_available_checkpoints() for options.
which: Selection switch. "recommended" returns a curated subset of layers suitable for
common downstream tasks; "all" returns every available layer from the model.
Returns: Dictionary containing: - checkpoint: The checkpoint identifier - layers: List of layer names available for embedding extraction - info: Information about layer selection for different tasks
Example: >>> layers = get_embedding_layers("evo2_7b") >>> print(f"Layers (recommended): {layers['layers']}") >>> layers_all = get_embedding_layers("evo2_7b", which="all") >>> print(f"Total layers: {len(layers_all['layers'])}")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| which | No | recommended | |
| checkpoint | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||