Skip to main content

brainwires_training/
lib.rs

1#![deny(missing_docs)]
2//! # Brainwires Training
3//!
4//! Model training and fine-tuning for the Brainwires Agent Framework.
5//!
6//! Supports cloud fine-tuning (OpenAI, Together, Fireworks, Anyscale, Bedrock, Vertex)
7//! and local adapter training (LoRA, QLoRA, DoRA) via Burn framework.
8
9// Re-export burn_core as `burn` so that Burn's derive macros (Module, Config) can resolve
10// their internal `burn::` paths when using individual burn-* crates.
11#[cfg(feature = "local")]
12extern crate burn_core as burn;
13
14/// Training configuration and hyperparameters.
15pub mod config;
16/// Training error types.
17pub mod error;
18/// Training job types and status.
19pub mod types;
20
21/// Cloud fine-tuning providers.
22#[cfg(feature = "cloud")]
23pub mod cloud;
24
25/// Local adapter training (LoRA/QLoRA/DoRA).
26#[cfg(feature = "local")]
27pub mod local;
28
29/// Training job management.
30pub mod manager;
31
32// Re-export core types (always available)
33pub use config::{AdapterMethod, AlignmentMethod, LoraConfig, LrScheduler, TrainingHyperparams};
34pub use error::TrainingError;
35pub use types::{
36    DatasetId, TrainingJobId, TrainingJobStatus, TrainingJobSummary, TrainingMetrics,
37    TrainingProgress,
38};
39
40#[cfg(feature = "cloud")]
41pub use cloud::{CloudFineTuneConfig, FineTuneProvider, FineTuneProviderFactory};
42
43#[cfg(feature = "local")]
44pub use local::{ComputeDevice, LocalTrainingConfig, TrainedModelArtifact, TrainingBackend};
45
46pub use manager::TrainingManager;