evo2
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.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-31
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- evo2
- license
- Apache-2.0
- metadata
- { "category": "biomodels", "third_party": [ { "kind": "weights", "name": "Evo 2", "license": "Apache-2.0", "provider": "Arc Institute", "terms_url": "https://github.com/ArcInstitute/evo2/blob/main/LICENSE" } ], "display-name": "Evo 2", "requirements": [ "gpu" ] }
- 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.
03 SKILL.md 正文
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
pip install evo2
# Weights pulled from Hugging Face on first model load.
Loading and scoring
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
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
7B/40B inference is GPU-bound (≥24 GB / 80 GB VRAM). Read
compute_details({provider, mode:'read'}) for an environment with evo2 +
flash-attn and a pre-cached HF weight mount, then submit:
c = host.compute.create(provider)
job = c.submit_job(
intent="Evo2-7B score 200bp variant window — 1×GPU, ~2 min",
inputs=["score_evo2.py"],
command="python3 score_evo2.py", # env selection is host-specific — see compute_details for your provider
outputs=["scores.json"],
run_timeout_s=1800,
)
# the Job repr just printed itself (id, notes) — cell ends here; the kernel never waits on the job
Then call the wait_for_notification brain-tool. When the
compute_done notification arrives, act on its payload:
save_artifacts(payload["output_files"]) # paths under hpc/<job_id>/
For the full record (files, stdout_tail, notes, …), re-enter the
kernel: res = c.attach_job(job_id).result() then c.close(intent=...). See the
remote-compute-ssh / remote-compute-modal skill for the orchestration
details.
Inside score_evo2.py, point HF_HOME at the provider's weight-cache mount
(path is in compute_details) and set HF_HUB_OFFLINE=1 so the loader
doesn't try to write refs/ into a read-only mount. Weight footprint:
~15 GB (7B), ~80 GB (40B).
Typical performance
| Task | 7B on H100 | Notes |
|---|---|---|
| Model load (cached) | ~5-7 min | First call hydrates weights |
score_sequences, 200×200bp |
~10-20 s | After load |
generate, 1×512 nt |
~15 s |
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Transformer Engine not installed |
No FP8 — falls back to bf16 | Informational only on non-H100; ignore |
| OOM on load | 40B on <80 GB GPU | Use evo2_7b or shard with device_map |
HF tries to write refs/main |
HF_HOME points at RO mount |
Set HF_HUB_OFFLINE=1 |
dtype mismatch in score_sequences |
Passing tensors not strings | Pass list[str]; the API tokenizes for you |
Next: pair with borzoi to predict track-level effects of the same
variants.
04 同仓库更多 Skills
unslop
Edit substantive human-facing prose to remove AI writing patterns while preserving meaning and tone.
pstack-principle-type-system-discipline
Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, refuse to lie to the compiler, exhaust variants, derive from authoritative schemas.
pstack-principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.
pstack-principle-subtract-before-you-add
Apply when sequencing an addition, refactor, or rewrite. Remove dead weight, redundant validators, and stub references first, then build on the simpler base.
pstack-principle-sequence-verifiable-units
Sequence migrations or dependent changes around meaningful verification boundaries.
pstack-principle-separate-before-serializing-shared-state
Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.