domain-ml

Implement ML/AI workflows in Rust from model loading to inference.

1|2|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/dojoengine/torii-core --skill domain-ml-dojoengine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-ml
Source: https://github.com/dojoengine/torii-core/tree/main/.agents/skills/domain-ml
Command: npx skills add https://github.com/dojoengine/torii-core --skill domain-ml-dojoengine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and implement robust ML/AI workflows in Rust, focusing on memory efficiency and portable inference.

Core Features & Use Cases

  • Design patterns for model loading, batching, streaming, and GPU-backed inference.
  • Guidance on choosing crates (ndarray, ONNX runtimes, tch-rs, candle, burn) and data processing tools.
  • End-to-end blueprint for building inference servers, training pilots, and data pipelines.

Quick Start

Start by loading a sample ONNX model and run a simple inference to verify end-to-end serve.

Frequently Asked Questions about domain-ml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run ONNX model inference in Rust with GPU support?

Running ONNX inference in Rust with GPU support involves loading the model and executing tensors across GPU backends. This workflow applies design patterns like lazy initialization and batching to ensure memory-safe, portable inference.

What is the best way to build a scalable machine learning inference server in Rust?

Building a scalable ML inference server in Rust requires modular data paths, batching, and streaming. Using crates like candle or tch-rs, you can manage memory efficiently while serving predictions across CPU and GPU backends.

How do I choose between candle, burn, and tch-rs for a Rust machine learning pipeline?

Choosing between candle, burn, and tch-rs depends on your backend needs and memory constraints. Candle offers lightweight Rust-native inference, burn provides a flexible neural network framework, and tch-rs binds to PyTorch C++ APIs for training and inference.

Can I use Rust for machine learning training pipelines or is it just for inference?

Rust supports both ML training pipelines and inference. By leveraging crates like burn and tch-rs alongside deterministic seeds and streaming data paths, you can build robust training pilots and data processing tools.

What design patterns should I use for memory-safe tensor processing in Rust?

Memory-safe tensor processing in Rust requires lazy initialization, batching, and streaming design patterns. Enforcing modular data paths and deterministic seeds ensures safe memory management during model loading and inference.

Does tract support ONNX models for CPU-based inference in Rust?

Tract supports ONNX models for CPU-based inference in Rust. It allows you to load and run models without external dependencies, fitting into modular data paths for portable, memory-efficient execution.