Skip to main content

Module facade

Module facade 

Source
Expand description

High-level unified API facade.

The RustAI struct provides a simplified interface for common AI engineering tasks, orchestrating multiple ecosystem crates automatically. High-level unified API for the rust-ai ecosystem.

The RustAI struct provides a facade over all rust-ai ecosystem crates, offering a simplified interface for common AI engineering tasks.

§Design Philosophy

Rather than requiring users to understand each individual crate’s API, RustAI provides high-level workflows that compose the right crates automatically based on the task at hand.

§Example

use rust_ai_core::{RustAI, RustAIConfig};

// Initialize with sensible defaults
let ai = RustAI::new(RustAIConfig::default())?;

// Fine-tune a model with LoRA
let config = ai.finetune()
    .model("meta-llama/Llama-2-7b")
    .rank(64)
    .build()?;

// Quantize for deployment
let quant_config = ai.quantize()
    .method(QuantizeMethod::Nf4)
    .bits(4)
    .build();

Structs§

FinetuneBuilder
Builder for fine-tuning workflows.
FinetuneConfig
Configuration for fine-tuning.
QuantizeBuilder
Builder for quantization workflows.
QuantizeConfig
Configuration for quantization.
RustAI
Unified facade for the rust-ai ecosystem.
RustAIConfig
Configuration for the RustAI facade.
RustAIInfo
Information about the RustAI environment.
TrainBuilder
Builder for Axolotl training pipelines.
TrainConfig
Configuration for Axolotl training.
VsaBuilder
Builder for VSA workflows.
VsaConfig
Configuration for VSA operations.

Enums§

AdapterType
Type of PEFT adapter.
QuantizeMethod
Quantization method.