pub struct RustAI { /* private fields */ }Expand description
Unified facade for the rust-ai ecosystem.
Provides high-level APIs that orchestrate multiple ecosystem crates to accomplish common AI engineering tasks.
§Capabilities
| Workflow | Description |
|---|---|
finetune() | LoRA, DoRA, AdaLoRA adapter creation |
quantize() | 4-bit (NF4/FP4) and 1.58-bit (BitNet) quantization |
vsa() | VSA-based operations and optimization |
train() | YAML-driven training pipelines |
§Example
use rust_ai_core::{RustAI, RustAIConfig};
let config = RustAIConfig::new()
.with_verbose(true);
let ai = RustAI::new(config).unwrap();
println!("Device: {:?}", ai.device());
println!("Ecosystem: {:?}", ai.ecosystem());Implementations§
Source§impl RustAI
impl RustAI
Sourcepub fn new(config: RustAIConfig) -> Result<Self>
pub fn new(config: RustAIConfig) -> Result<Self>
Create a new RustAI instance.
Initializes the device and ecosystem information.
§Arguments
config- Configuration options
§Returns
A configured RustAI instance.
§Errors
Returns CoreError::DeviceNotAvailable if device initialization fails.
§Example
use rust_ai_core::{RustAI, RustAIConfig};
let ai = RustAI::new(RustAIConfig::default())?;Sourcepub fn ecosystem(&self) -> &EcosystemInfo
pub fn ecosystem(&self) -> &EcosystemInfo
Get ecosystem information.
Sourcepub fn config(&self) -> &RustAIConfig
pub fn config(&self) -> &RustAIConfig
Get the configuration.
Sourcepub fn finetune(&self) -> FinetuneBuilder<'_>
pub fn finetune(&self) -> FinetuneBuilder<'_>
Sourcepub fn quantize(&self) -> QuantizeBuilder<'_>
pub fn quantize(&self) -> QuantizeBuilder<'_>
Sourcepub fn vsa(&self) -> VsaBuilder<'_>
pub fn vsa(&self) -> VsaBuilder<'_>
Sourcepub fn train(&self) -> TrainBuilder<'_>
pub fn train(&self) -> TrainBuilder<'_>
Sourcepub fn info(&self) -> RustAIInfo
pub fn info(&self) -> RustAIInfo
Get information about the RustAI environment.
Returns a struct containing version info, ecosystem, and device details.
Auto Trait Implementations§
impl Freeze for RustAI
impl RefUnwindSafe for RustAI
impl Send for RustAI
impl Sync for RustAI
impl Unpin for RustAI
impl UnwindSafe for RustAI
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more