domain-ml

Map ML design constraints to Rust implementation patterns with crates.

1.4k|110|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/actionbook/rust-skills --skill domain-ml
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-ml
Source: https://github.com/actionbook/rust-skills/tree/main/skills/domain-ml
Command: npx skills add https://github.com/actionbook/rust-skills --skill domain-ml

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides domain-aware guidance to transform ML challenges in Rust into scalable, well-architected solutions by tracing constraints into concrete design and implementation patterns.

Core Features & Use Cases

  • Domain-guided design: translate constraints such as memory, GPU utilization, and reproducibility into architecture decisions and safe Rust code patterns.
  • Inference server patterns: lazy initialization, singleton model loading, batched inference, and streaming data handling for low-latency Rust services.
  • Data processing integration: leverage crates like ndarray and polars for tensor and data-frame operations, and integrate ONNX/tch-rs models for inference.

Quick Start

Prompt the AI with: Design a Rust-based ML inference service that loads an ONNX model with tract, uses batched input, and keeps a lazy singleton in memory.

Frequently Asked Questions about domain-ml

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

FAQPage Schema
How do I design a Rust ML inference server with lazy model loading and batching?

Designing a Rust ML inference server involves using patterns like OnceLock for lazy singleton model loading and batched input handling to achieve low-latency, memory-efficient tensor processing with tract or tch-rs.

What is the best way to integrate ONNX models into a Rust application?

Integrating ONNX models in Rust is best achieved by using the tract crate for inference, combined with ndarray for tensor handling and design patterns that satisfy deterministic execution and memory efficiency constraints.

Does tch-rs support GPU acceleration for machine learning workloads in Rust?

Yes, tch-rs supports GPU acceleration and concurrency for machine learning workloads in Rust. It allows mapping GPU utilization constraints into concrete architecture decisions for training pipelines and inference.

How do I handle tensor and dataframe operations for data processing in Rust?

Handling tensor and dataframe operations in Rust data processing is done by leveraging the ndarray crate for tensor operations and polars for dataframe operations, ensuring memory-efficient integration with ML pipelines.

Can I use Rust for reproducible machine learning pipelines with deterministic design?

Yes, Rust is suitable for reproducible machine learning pipelines because it enables deterministic design by translating reproducibility constraints into safe code patterns and memory-efficient architecture decisions.

What are the limitations of using candle versus tract for ONNX inference in Rust?

Candle focuses on native Rust GPU acceleration, while tract specializes in running ONNX models deterministically without external dependencies, making your choice dependent on GPU utilization versus ONNX-specific inference constraints.