Skip to main content

rlx_voxtral_tts_train/
lib.rs

1// RLX — versatile ML compiler + runtime.
2// Copyright (C) 2026 Eugene Hauptmann, Nataliya Kosmyna.
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, version 3.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16//! Native RLX training for Voxtral voice cloning.
17//!
18//! Phase 1: codec encoder (reconstruction + VQ auxiliary losses).
19//! Phase 2: LoRA adapters on the 4B LM (embedding distillation).
20//! Export/inject weights into `consolidated.safetensors` for inference.
21
22pub mod adam;
23pub mod asr_loss;
24pub mod audio_metrics;
25pub mod backward_prep;
26pub mod checkpoint;
27pub mod codec_graph;
28pub mod compile;
29pub mod config;
30pub mod dataset;
31pub mod device;
32pub mod discriminator;
33pub mod distill_dataset;
34pub mod distill_text;
35pub mod early_stop;
36pub mod encoder_loss;
37pub mod encoder_report;
38pub mod encoder_train;
39pub mod lm_lora_graph;
40pub mod lora_train;
41pub mod teacher;
42pub mod train_pipeline;
43pub mod weights;
44
45pub use backward_prep::{needs_portable_backward_prep, prepare_backward_for_device};
46pub use checkpoint::{
47    export_encoder_weights, export_lora_weights, inject_weights, load_encoder_weights,
48    load_lora_weights,
49};
50pub use compile::{TrainSession, backward_cpu_only_from_env, compile_train_session};
51pub use config::{EncoderTrainConfig, LoraTrainConfig, TrainProfile};
52pub use device::{pick_auto_device, resolve_train_device};
53pub use encoder_train::{EncoderTrainResult, train_encoder};
54pub use lora_train::train_lora;
55pub use train_pipeline::{TrainAllConfig, TrainAllResult, default_train_all, train_all};
56pub use weights::{codec_has_encoder, merge_codec_encoder_overlay};