#[non_exhaustive]pub struct DeviceMemoryHyperParams {
pub n_gpu_layers: u32,
pub n_gpu_layers_skipped: u32,
pub n_ctx_train: u32,
pub n_expert: u32,
}Expand description
Hyper-parameters discovered while estimating device memory.
This crate builds it; callers read it. #[non_exhaustive] because upstream
reports more of these over time — n_gpu_layers_skipped arrived in
b12388 — and each addition would otherwise break every struct literal
downstream.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.n_gpu_layers: u32Model n_gpu_layers hyper-parameter used for the estimate.
n_gpu_layers_skipped: u32NextN layers excluded from n_gpu_layers.
0 when the MTP head is being loaded; otherwise the model’s
n_layer_nextn, since those layers are not offloaded. New in
b12388, where upstream began reporting it alongside the rest.
n_ctx_train: u32Model training context length.
n_expert: u32Number of MoE experts (0 when dense).
Trait Implementations§
Source§impl Clone for DeviceMemoryHyperParams
impl Clone for DeviceMemoryHyperParams
impl Copy for DeviceMemoryHyperParams
Source§impl Debug for DeviceMemoryHyperParams
impl Debug for DeviceMemoryHyperParams
impl Eq for DeviceMemoryHyperParams
Source§impl PartialEq for DeviceMemoryHyperParams
impl PartialEq for DeviceMemoryHyperParams
impl StructuralPartialEq for DeviceMemoryHyperParams
Auto Trait Implementations§
impl Forget for DeviceMemoryHyperParams
impl Freeze for DeviceMemoryHyperParams
impl Move for DeviceMemoryHyperParams
impl RefUnwindSafe for DeviceMemoryHyperParams
impl Send for DeviceMemoryHyperParams
impl Sync for DeviceMemoryHyperParams
impl Unpin for DeviceMemoryHyperParams
impl UnsafeUnpin for DeviceMemoryHyperParams
impl UnwindSafe for DeviceMemoryHyperParams
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