Evo2 Nim 标志

Evo2 Nim

组织
NVIDIA-BioNeMo
evo2-nim

Generate and analyze DNA sequences using NVIDIA's Evo 2 BioNeMo NIM microservice. Use for Evo2/Evo 2, DNA generation, genomic sequence generation, hosted generation, local Docker deployment, local forward passes, layer outputs, logits, sampled probabilities, and BioNeMo NIM workflows.

概览

发布者NVIDIA-BioNeMo
代码仓库bionemo-agent-toolkit
技能名称evo2-nim
星标数
502
复刻数
78
附带文件
10
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 10 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 NVIDIA-BioNeMo 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Evo2 Nim AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/NVIDIA-BioNeMo/bionemo-agent-toolkit/tree/main/nim-skills/evo2-nim
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NVIDIA-BioNeMo/bionemo-agent-toolkit.git /tmp/bionemo-agent-toolkit
mkdir -p .claude/skills
cp -r /tmp/bionemo-agent-toolkit/nim-skills/evo2-nim .claude/skills/evo2-nim
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Evo2 Nim,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Evo2 Nim。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Evo2 Nim 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Evo 2 NIM

Use Evo 2 for DNA generation and, locally, layer-output extraction. Load supplemental files only when needed:

  • references/api.md: exact schemas, layer names, Docker flags, hardware notes.
  • references/science.md: genomic use cases, limits, and interpretation.
  • references/parameters.md: generation/forward parameter effects.
  • references/validation.md: DNA, probability, timing, and tensor checks.
  • references/examples.md: compact hosted/local request patterns.

Instructions

For generation, use scripts/generate.py to execute the request, validate the response, and save its artifacts. Resolve the script path relative to this skill's directory and choose an output directory in the user's workspace. Use the user's sequence and requested parameters; the example below is only a smoke test.

  1. Select the requested mode. For hosted generation, go directly to the generation example; Docker setup and local forward passes are separate tasks.
  2. When the user asks to run generation, execute the client and inspect its exit status and result. Writing a script alone does not complete that request.
  3. Report the generated DNA (or its file for long sequences), actual elapsed_ms, sampled-probability summary, seed, and artifact paths from the successful run. Read the saved response or metrics if any result is unclear.

If the request or validation fails, report the actual failure and any diagnostic files. Do not replace an unavailable API response with example values. For a code-only request, provide the command without making an inference call.

Choose Mode

Honor NIM_API_MODE when it is set. Accepted values are hosted and local. If it is unset, treat an explicit EVO2_NIM_URL as local; otherwise ask when the requested mode is unclear:

Hosted NVIDIA API or local Docker Evo 2 NIM?

  • Hosted generation: https://health.api.nvidia.com/v1/biology/arc/evo2-40b/generate
  • Local base URL: $EVO2_NIM_URL, falling back to http://localhost:8000
  • Local generation: $EVO2_NIM_URL/biology/arc/evo2/generate
  • Local forward/layer outputs: $EVO2_NIM_URL/biology/arc/evo2/forward

Always resolve local health and inference routes from EVO2_NIM_URL when it is present. localhost works only when the caller and NIM share a network namespace; a caller in a separate container usually needs a service URL such as http://evo2-nim:8000. Do not silently switch modes when the selected endpoint is unavailable. Report the failed endpoint and fix its configuration.

The hosted docs expose generation. /forward is documented for local Docker; do not invent a hosted /forward endpoint. Hosted requests use Authorization: Bearer $NGC_API_KEY. Supported local Docker startup uses NGC_API_KEY (or NVIDIA_API_KEY via the preflight) for registry login, entitlement checks, and first-run model downloads; pass it into the container with -e NGC_API_KEY. Local inference requests use no auth header after readiness. Warm-cache key-free startup varies by image/version and should not be assumed.

Examples

Normalize prompts before sending. Use A/C/G/T unless ambiguous bases are a deliberate modeling choice and clearly reported.

For a hosted generation request, run the bundled client with the user's inputs (the script path below is relative to the skill directory):

bash
python scripts/generate.py \
  --mode hosted \
  --sequence ACTGACTGACTGACTG \
  --num-tokens 64 --seed 1 \
  --temperature 0.7 --top-k 3 --top-p 0.0 \
  --output-dir /path/to/workspace/evo2-output

For an already-ready local NIM, use --mode local; the client resolves EVO2_NIM_URL and sends no Authorization header. It never switches endpoints after a failed request. Set --timeout for a longer read if the user requests a larger generation; failed requests are not automatically resubmitted.

The client saves request.json, the actual response.json, generated.fasta, and metrics.json in the chosen output directory. It also saves the exact response body in response.raw before checking HTTP status or parsing JSON, so diagnostics survive malformed JSON and non-finite probability/timing values. It validates the requested number of generated bases, A/C/G/T alphabet, finite sampled probabilities in [0, 1], and nonnegative timing before printing a successful summary. Existing directories are never reused, even if empty. Choose an output directory that does not exist; the client creates it atomically so concurrent runs cannot overwrite each other's artifacts. The FASTA contains generated bases only, not the input prompt prepended again.

sampled_probs is requested by the client and summarized with count/min/max/mean; the full values stay in the saved response. A missing or malformed probability array is a validation failure, not permission to invent confidence values. Only request enable_logits in a custom request when needed; logits can make responses large. See references/api.md for custom payloads. random_seed supports development reproducibility, not biological certainty.

Local Docker Requirements

Evo 2 local deployment requires FP8-capable GPUs. Do not present A100 as compatible; A100 can pull the image but fails warmup because FP8 requires compute capability 8.9 or higher.

  • Default 40B: 2x H100 80 GB or 1x H200 141 GB. Use NIM_TEST_GPUS=0,1 for 2x H100, or NIM_TEST_GPUS=0 for one H200.
  • 7B fallback: set NIM_VARIANT=7b; supported GPUs include H100, H200, RTX 6000 Ada, and L40S.
  • Approximate disk: 110 GB for 40B, 50 GB for 7B.

Use shell env first; source repo-root .env only if present. Do not invent a cache default or drop the NVIDIA_API_KEY fallback.

bash
set -a
[ -f .env ] && . ./.env
set +a

if [ -z "${NGC_API_KEY:-}" ] && [ -n "${NVIDIA_API_KEY:-}" ]; then
  export NGC_API_KEY="$NVIDIA_API_KEY"
fi
: "${NGC_API_KEY:?Set NGC_API_KEY or NVIDIA_API_KEY}"
: "${LOCAL_NIM_CACHE:?Set LOCAL_NIM_CACHE}"

echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin

# 40B default: 0,1 for 2x H100; set 0 for a single H200.
export NIM_TEST_GPUS="${NIM_TEST_GPUS:-0,1}"
mkdir -p "${LOCAL_NIM_CACHE}"
chmod 700 "${LOCAL_NIM_CACHE}"   # owner-only; if the NIM runs as a different UID, add -u "$(id -u)" to docker run

# For 7B: export NIM_VARIANT=7b; export NIM_TEST_GPUS="${NIM_TEST_GPUS:-0}"
docker run --rm -it --name evo2-nim \
  --runtime=nvidia \
  --gpus "\"device=${NIM_TEST_GPUS}\"" \
  -e NGC_API_KEY \
  -e NIM_VARIANT \
  -v "${LOCAL_NIM_CACHE}:/opt/nim/.cache" \
  -p 8000:8000 \
  nvcr.io/nim/arc/evo2:2

Readiness:

bash
evo2_nim_url="${EVO2_NIM_URL:-http://localhost:8000}"
until curl -sf "${evo2_nim_url%/}/v1/health/ready"; do sleep 10; done

If RTX PRO 6000 Blackwell Workstation fails with no Transformer Engine attention backend, treat it as outside the current validated matrix and rerun on a documented GPU/runtime.

Local Forward Pass

Forward returns base64-encoded NPZ tensors.

python
import base64
import io
import os
import numpy as np
import requests

mode = os.getenv("NIM_API_MODE", "local")
if mode != "local":
    raise RuntimeError("Evo 2 /forward is available only in local mode")
nim_url = os.getenv("EVO2_NIM_URL", "http://localhost:8000").rstrip("/")
sequence = "ACTGACTGACTG"  # Replace with the user's DNA sequence.
sequence = "".join(sequence.upper().split())
if not sequence or set(sequence) - set("ACGT"):
    raise ValueError("Expected nonempty A/C/G/T DNA")
payload = {
    "sequence": sequence,
    "output_layers": ["output_layer", "decoder.layers.3.self_attention"],
}
response = requests.post(
    f"{nim_url}/biology/arc/evo2/forward",
    headers={"Content-Type": "application/json"},
    json=payload,
    timeout=300,
)
response.raise_for_status()
npz_bytes = base64.b64decode(response.json()["data"])
with open("evo2_forward_outputs.npz", "wb") as handle:
    handle.write(npz_bytes)
arrays = np.load(io.BytesIO(npz_bytes), allow_pickle=False)
for name in arrays.files:
    arr = arrays[name]
    print(name, arr.shape, arr.dtype, bool(np.isfinite(arr).all()), float(arr.mean()))

Validate And Report

Save request/response JSON, generated FASTA, and a metrics JSON with sequence length, GC fraction, ambiguous-base fraction, homopolymer length, sampled-prob checks, and elapsed timing. Treat invalid schema or alphabet as hard failures; treat extreme GC, low complexity, duplicates, and missing motifs as warnings. For deeper checks, read references/validation.md.

Key fields: sequence, num_tokens, temperature, top_k (0-6), top_p (0-1), random_seed, enable_sampled_probs, enable_elapsed_ms_per_token, and optional enable_logits.

Troubleshooting

  • 401/403: hosted key missing/expired or not sent as Bearer token.
  • 422: wrong field names such as max_tokens instead of num_tokens.
  • Local endpoint confusion: print NIM_API_MODE and EVO2_NIM_URL; do not replace a configured service URL with localhost.
  • Local auth confusion: do not send Authorization to local inference.
  • Local startup: first run downloads model assets; poll $EVO2_NIM_URL/v1/health/ready before inference.
  • FP8 failure: use hosted, 7B on a supported FP8 GPU, or documented 40B GPUs.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Evo2 Nim AI 技能有什么作用?

Generate and analyze DNA sequences using NVIDIA's Evo 2 BioNeMo NIM microservice. Use for Evo2/Evo 2, DNA generation, genomic sequence generation, hosted generation, local Docker deployment, local forward passes, layer outputs, logits, sampled probabilities, and BioNeMo NIM workflows.

为什么在 TypingMind 中使用 Evo2 Nim?

因为您只需安装一次,就能搭配任何模型使用。Evo2 Nim 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Evo2 Nim?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/NVIDIA-BioNeMo/bionemo-agent-toolkit/tree/main/nim-skills/evo2-nim。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Evo2 Nim?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Evo2 Nim 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Evo2 Nim 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Evo2 Nim AI 技能免费吗?

NVIDIA-BioNeMo 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇