1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Safe, idiomatic Rust bindings to the hmll library.
//!
//! This crate provides a safe, high-level interface to the hmll C library for
//! high-performance loading of machine learning model files.
//!
//! # Features
//!
//! - **`io_uring`** (default): High-performance I/O using io_uring on Linux
//! - **`safetensors`**: Native support for safetensors format
//! - **`cuda`**: CUDA memory support for GPU operations
//!
//! # Example
//!
//! ```no_run
//! use hmll::{Source, WeightLoader, Device, LoaderKind};
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Open a model file
//! let source = Source::open("model.safetensors")?;
//! let sources = [source];
//!
//! // Create a weight loader
//! let mut loader = WeightLoader::new(&sources, Device::Cpu, LoaderKind::Auto)?;
//!
//! // Fetch a range of bytes
//! let data = loader.fetch(0..1024, 0)?;
//! println!("Fetched {} bytes", data.len());
//! # Ok(())
//! # }
//! ```
pub use ;
pub use Device;
pub use ;
pub use ;
pub use Source;
pub use DType;
pub use ;