pub struct GgufLoader {
pub ep_rank: usize,
pub ep_world_size: usize,
pub num_experts: usize,
pub peak_memory_multiplier: Option<f64>,
}Expand description
Loads weights from a GGUF file, dequantizing every tensor to BF16 on the GPU.
Mirrors super::SafetensorsLoader so the two are interchangeable behind the
super::WeightLoader trait and the serve call-site can pick one on file
type.
Fields§
§ep_rank: usizeEP rank (0-based). Only used when ep_world_size > 1.
ep_world_size: usizeEP world size. When > 1, remote expert slices are skipped.
num_experts: usizeTotal number of MoE experts in the model (for EP partitioning).
peak_memory_multiplier: Option<f64>Override for the peak-memory multiplier in the pre-flight OOM check.
Implementations§
Trait Implementations§
Source§impl Default for GgufLoader
impl Default for GgufLoader
Source§impl WeightLoader for GgufLoader
impl WeightLoader for GgufLoader
fn load( &self, model_dir: &Path, gpu: &dyn GpuBackend, oom_reserve_bytes: usize, ) -> Result<WeightStore>
Auto Trait Implementations§
impl Freeze for GgufLoader
impl RefUnwindSafe for GgufLoader
impl Send for GgufLoader
impl Sync for GgufLoader
impl Unpin for GgufLoader
impl UnwindSafe for GgufLoader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more