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
//! Adaptive Memory Tiering System
//!
//! Intelligent memory allocation that maximizes inference quality within hardware
//! constraints, regardless of model size.
//!
//! Unlike fixed layer-swapping (designed for 405B+ models), this system:
//! - Analyzes the gap between model size and available memory
//! - Scores tensor importance based on inference impact
//! - Selects optimal precision per tensor (BF16, INT8, INT4)
//! - Places tensors in optimal memory tier (VRAM, RAM, NVMe)
//! - Minimizes or eliminates runtime swapping when possible
//!
//! # Example
//!
//! ```ignore
//! use abaddon::adaptive_tiering::{
//! AdaptiveTieringConfig, AllocationPlanner, ModelProfile,
//! };
//!
//! let config = AdaptiveTieringConfig::default();
//! let planner = AllocationPlanner::new(config);
//! let profile = ModelProfile::from_directory(model_dir)?;
//! let plan = planner.plan(&profile)?;
//!
//! println!("VRAM usage: {} GB", plan.vram_usage / (1024 * 1024 * 1024));
//! println!("Swap count: {}", plan.swap_count);
//! ```
pub use AdaptiveTieringConfig;
pub use ;
pub use ;
pub use ;
pub use ;