biology
BioNeMo Evo2 40B
NVIDIA NIM for Evo 2 40B genomic DNA sequence generation and embeddings.
Model details
View repositoryExample usage
Call BioNeMo Evo2 40B on Baseten using the NIM DNA generation route.
Note: You need to procure your own NVAIE licenses to access this NIM.
Input
1import os
2import requests
3
4MODEL_ID = os.environ["BASETEN_MODEL_ID"]
5BASETEN_API_KEY = os.environ["BASETEN_API_KEY"]
6BASETEN_URL = (
7 f"https://model-{MODEL_ID}.api.baseten.co/environments/production/sync"
8 "/biology/arc/evo2/generate"
9)
10
11payload = {
12 "sequence": "TATAAAAGGCTACGATCGATCGATCGATCGAT",
13 "num_tokens": 64,
14 "top_k": 3,
15 "temperature": 0.7,
16 "enable_sampled_probs": True,
17}
18
19response = requests.post(
20 BASETEN_URL,
21 headers={
22 "Authorization": f"Bearer {BASETEN_API_KEY}",
23 "Content-Type": "application/json",
24 },
25 json=payload,
26 timeout=300,
27)
28response.raise_for_status()
29result = response.json()
30print(result)
31JSON output
1{
2 "sequence": "TATAAAAGGCTACGATCGATCGATCGATCGAT...",
3 "sampled_probs": [
4 0.98,
5 0.97
6 ],
7 "elapsed_ms": 123
8}