Logo Cuequivariance

Cuequivariance

Tổ chức
NVIDIA-BioNeMo
cuequivariance

Build and debug cuEquivariance irreps, custom Irrep subclasses, Clebsch-Gordan tensor products, and equivariant or segmented polynomials. Use for cuequivariance core descriptors and IrDictPolynomial layout or shape questions; framework execution requires the matching JAX or PyTorch API.

Tổng quan

Nhà phát hànhNVIDIA-BioNeMo
Kho mãbionemo-agent-toolkit
Tên kỹ năngcuequivariance
Sao
495
Bản fork
77
Tệp đi kèm
5
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được NVIDIA-BioNeMo công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Cuequivariance trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/NVIDIA-BioNeMo/bionemo-agent-toolkit/tree/main/library-skills/cuequivariance
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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/library-skills/cuequivariance .claude/skills/cuequivariance
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Cuequivariance trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Cuequivariance ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Cuequivariance với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

cuEquivariance core

Use cuequivariance (import cuequivariance as cue) to describe group representations and tensor contractions. Prefer a built-in descriptor when it expresses the requested operation; construct a SegmentedTensorProduct only for a custom contraction. Core polynomials can be evaluated with NumPy on CPU. They do not create trainable framework parameters or select a GPU kernel.

Choose the workflow

  • For built-in groups and dense descriptors, use the examples below.
  • For a new group, read custom irreps.
  • For custom contractions, CG paths, or polynomial inspection, read segmented polynomials.
  • For dictionaries keyed by irrep, read the ir_dict workflow. It includes a CPU example and the boundary with JAX execution.

For explanations or requests to show runnable code, adapt the closest example; installing packages is not a prerequisite to answering. Read the reference for the selected workflow. Execute code when the user requests a run or when an integration or correctness question needs a runtime check. Inspect upstream source when the installed API differs or a numerical check fails.

Check the execution environment

These examples were checked with cuEquivariance 0.12.0. When executing, check the selected interpreter and the APIs needed for that workflow together:

python
from importlib.metadata import PackageNotFoundError, version
import sys

print("Python:", sys.executable)
try:
    installed = version("cuequivariance")
except PackageNotFoundError:
    print("cuequivariance is not installed in this interpreter")
else:
    import cuequivariance as cue

    print("cuEquivariance:", installed)
    print("IrDictPolynomial available:", hasattr(cue, "IrDictPolynomial"))

Reuse a compatible project environment and its dependency constraints. If execution needs missing packages, use isolated example execution. Preserve existing virtual environments and the system/user Python installation; do not delete environments or bypass package-manager protections to repair setup. When installation is unavailable or disallowed, provide the runnable code and state which checks were not executed. Core examples need NumPy but neither CUDA nor JAX/PyTorch. If an API is unavailable, use a supported dense descriptor when it satisfies the task; do not invent a method or force an environment upgrade.

For a framework task, inspect the installed cuequivariance_jax or cuequivariance_torch signature and its version's backend requirements. Official documentation and the 0.12.0 source cover those separate packages.

Groups, multiplicities, and layout

GroupConstructionDimension and meaning
SO(3)cue.SO3(l)2*l + 1; rotations; nonnegative integer l
O(3)cue.O3(l, p)2*l + 1; also parity p=+1 or -1, e.g. 0e, 1o
SU(2)cue.SU2(j)2*j + 1; nonnegative integer or half-integer spin

cue.Irreps("SO3", "16x0 + 4x1 + 2x2") has dimension 38. Iterating it yields (multiplicity, irrep) blocks. Multiplying an Irreps by an integer scales multiplicities; ir1 * ir2 on individual irreps gives the selection rule. For SO(3), allowed output angular momenta run from abs(l1-l2) to l1+l2. For O(3), output parity must also equal p1*p2.

Layout is defined within each irrep block, not across the whole vector:

LayoutBlock shape before flattening
cue.ir_mul(..., ir.dim, mul)
cue.mul_ir(..., mul, ir.dim)

Read e.inputs[i].layout and e.outputs[i].layout from the descriptor. The tensor-product examples here use ir_mul; many PyTorch layers default to mul_ir and accept explicit layout options. JAX dictionary features often use mul_ir, while polynomial execution can require ir_mul. Convert the actual data block by block with a transpose before flattening; changing metadata or calling reshape alone does not change the element order. Similarly, sorting or simplifying irreps metadata does not reorder an existing tensor. Preserve the descriptor's block order when evaluating it.

Runnable dense tensor product

When the user asks for all output irreps, start with full_tensor_product. It has two inputs and no weights. This example includes all input definitions:

python
import numpy as np
import cuequivariance as cue

irreps1 = cue.Irreps("SO3", "2x0 + 1x1 + 1x2")
irreps2 = cue.Irreps("SO3", "1x0 + 1x1")
e = cue.descriptors.full_tensor_product(irreps1, irreps2)
rng = np.random.default_rng(0)
x1 = rng.normal(size=(4, e.inputs[0].dim))
x2 = rng.normal(size=(4, e.inputs[1].dim))
[out] = e(x1, x2)
assert out.shape == (4, 40)
assert np.isfinite(out).all()

# A multiplicity summary for display; keep e.outputs[0] for out's actual layout.
summary = e.outputs[0].irreps.sort().irreps.simplify()
assert summary == cue.Irreps("SO3", "3x0 + 5x1 + 3x2 + 1x3")

Select a descriptor

All names below are under cue.descriptors. Inspect the returned input/output metadata to allocate arrays, including weights; do not guess the weight count.

DescriptorUse and operand order
linear(irreps_in, irreps_out)Mix multiplicities of matching irreps; weights, input → output
fully_connected_tensor_product(a, b, out)Choose exact output multiplicities; weights, input1, input2 → output
full_tensor_product(a, b)All allowed couplings, no weights; input1, input2 → output
channelwise_tensor_product(a, b, irreps3_filter=...)Weighted channel pairs; output multiplicity per path is mul1*mul2
elementwise_tensor_product(a, b)Paired channels without weights; inputs need equal numbers of irrep copies and compatible block boundaries
spherical_harmonics(cue.O3(1, -1), [0, 1, 2, 3])Vector → harmonics with parity; normalize input vectors separately if unit-sphere values are required
symmetric_contraction(irreps_in, irreps_out, (1, 2, 3))MACE-style polynomial correlations; inspect descriptor shapes and multiplicity constraints

The third argument to a channelwise product filters irrep types; it does not set output multiplicities. Channelwise retains pairs of channels (u, v), unlike elementwise's matched channel (u). Use simplify_irreps3=True when a dense channelwise descriptor should consolidate repeated output irreps.

EquivariantPolynomial stores dense representation metadata in inputs and outputs, and its contraction in polynomial. Calling it returns a list of NumPy outputs, even for one output. The corresponding _ir_dict variants return metadata plus a polynomial already split by irrep; see the linked workflow.

For a custom implementation, check output dimensions and finite values, then verify covariance under a nontrivial group transformation. Use the same group, basis, block order, and layout for both the inputs and expected output.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Cuequivariance làm được gì?

Build and debug cuEquivariance irreps, custom Irrep subclasses, Clebsch-Gordan tensor products, and equivariant or segmented polynomials. Use for cuequivariance core descriptors and IrDictPolynomial layout or shape questions; framework execution requires the matching JAX or PyTorch API.

Vì sao nên dùng Cuequivariance trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Cuequivariance là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Cuequivariance trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/NVIDIA-BioNeMo/bionemo-agent-toolkit/tree/main/library-skills/cuequivariance. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Cuequivariance?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Cuequivariance với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Cuequivariance với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Cuequivariance có miễn phí không?

Kỹ năng này được NVIDIA-BioNeMo phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇