Expand description
§zuna-rs — ZUNA EEG Foundation Model inference in Rust
Pure-Rust inference for the ZUNA EEG foundation model. Two inference engines are available behind Cargo features:
FIF preprocessing is shared (preprocess_fif_cpu) via exg.
§Backends
Burn (with --features burn,ndarray): ndarray, blas-accelerate,
wgpu, burn-mlx / mlx.
RLX (with --features rlx): cpu, metal, mlx, gpu, cuda,
rocm, tpu, and BLAS variants.
Compare both engines (add --features burn,ndarray for the Burn side):
cargo run --example backend_compare --release \
--no-default-features \
--features burn,rlx,ndarray,rlx-cpu,rlx-metal,metal,wgpu,mlx,rlx-mlxRe-exports§
pub use rlx::EpochEmbedding;pub use rlx::EpochOutput;pub use rlx::InferenceResult;pub use rlx::ZunaDecoder;pub use rlx::ZunaEncoder;pub use rlx::ZunaInference;pub use config::DataConfig;pub use config::InferConfig;pub use config::ModelConfig;pub use data::FifInfo;pub use data::PreprocessedEpoch;pub use data::PreprocessedFif;pub use data::invert_reshape;pub use data::preprocess_fif_cpu;pub use channel_positions::MontageLayout;pub use channel_positions::channel_xyz;pub use channel_positions::montage_channels;pub use channel_positions::nearest_channel;pub use channel_positions::normalise;pub use csv_loader::CsvInfo;pub use csv_loader::CsvLoadOptions;pub use csv_loader::PaddingStrategy;pub use csv_loader::load_from_csv;pub use csv_loader::load_from_named_tensor;pub use csv_loader::load_from_raw_tensor;pub use csv_export::fif_to_csv;
Modules§
- channel_
positions - EEG channel position lookup from embedded standard montage files.
- config
- csv_
export - Export FIF recordings to CSV files.
- csv_
loader - CSV and raw-tensor loading for ZUNA inference.
- data
- Data preparation for ZUNA inference.
- rlx
- RLX-backed ZUNA inference (
rlx::Graph+rlx::Session).
Functions§
- init_
threads - Configure the global Rayon thread pool (Burn NdArray + RLX CPU).