# Evo2

Score, embed, and generate DNA sequences with Evo 2, a long-context genomic foundation...

- Repository: https://github.com/aipoch/open-science (5414 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add aipoch/open-science --skill evo2 -g -a claude-code -y`
Codex: `npx skills add aipoch/open-science --skill evo2 -g -a codex -y`
Cursor: `npx skills add aipoch/open-science --skill evo2 -g -a cursor -y`
Gemini CLI: `npx skills add aipoch/open-science --skill evo2 -g -a gemini-cli -y`

## Description

Score, embed, and generate DNA sequences with Evo 2, a long-context genomic foundation model. Use this skill when: (1) Computing per-nucleotide or per-sequence likelihoods for variant effect scoring, (2) Embedding genomic windows for downstream classification, (3) Generating DNA conditioned on a prefix, (4) Scoring regulatory or coding regions across species.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Evo 2, DNA Language Model

## Prerequisites

| Requirement | Minimum         | Recommended  |
| ----------- | --------------- | ------------ |
| Python      | 3.11            | 3.12 (<3.13) |
| CUDA        | 12.1+           | 12.4+        |
| GPU VRAM    | 24 GB (7B bf16) | 80 GB (40B)  |
| RAM         | 32 GB           | 128 GB       |

## How to run

### Installation

```bash
pip install evo2
# Weights pulled from Hugging Face on first model load.
```

### Loading and scoring

```python
from evo2 import Evo2

model = Evo2("evo2_7b")        # or "evo2_40b", see model table
seqs = ["ATCG" * 50, "GGGCTTAA" * 25]
ll = model.score_sequences(seqs)   # → list[float], mean per-token log-likelihood
print(ll)
```

### Generation

```python
out = model.generate(
    prompt_seqs=["ATGAAAGCT"],
    n_tokens=256,
    temperature=0.7,
)
print(out.sequences[0])
```

## Models

| Name           | Params | Context | VRAM (bf16) | Notes                                |
| -------------- | ------ | ------- | ----------- | ------------------------------------ |
| `evo2_7b`      | 7 B    | 1 M nt  | ~22 GB      | Default; fits on a single 24 GB+ GPU |
| `evo2_40b`     | 40 B   | 1 M nt  | ~78 GB      | H100 80 GB or multi-GPU              |
| `evo2_1b_base` | 1 B    | 8 K nt  | ~6 GB       | FP8 path requires sm_89+ (H100)      |

## Output format

`score_sequences` returns a `list[float]` (or `np.ndarray`) of mean log-likelihoods,
one per input sequence. More negative ⇒ less likely under the model. For variant
effect, compute `Δll = ll_alt - ll_ref` over a fixed window.

`generate` returns a `GenerationOutput` with `.sequences` (list[str]), `.logits`
(list[Tensor]), and `.logprobs_mean` (list[float]), always populated, no flag required.

## Decision tree

```
Need a DNA model?
│
├─ Per-base/per-sequence likelihood, generation → Evo 2 ✓
├─ Predict experimental tracks (expression, accessibility) → borzoi
└─ Protein, not DNA → fair-esm2 / esmfold2
```

## Remote compute

The rest: https://github.com/aipoch/open-science/blob/HEAD/resources/skills/evo2/SKILL.md
