pub struct MemoryRequirement {
pub model_bytes: u64,
pub adapter_bytes: u64,
pub optimizer_bytes: u64,
pub activation_bytes: u64,
pub total_bytes: u64,
pub savings_percent: f64,
}Expand description
Memory requirement estimation.
Fields§
§model_bytes: u64Base model memory in bytes
adapter_bytes: u64Adapter memory in bytes
optimizer_bytes: u64Optimizer state memory in bytes
activation_bytes: u64Activation memory in bytes
total_bytes: u64Total memory in bytes
savings_percent: f64Memory savings compared to full fine-tuning (percentage)
Implementations§
Source§impl MemoryRequirement
impl MemoryRequirement
Sourcepub fn to_human_readable(&self) -> String
pub fn to_human_readable(&self) -> String
Format as human-readable string.
Trait Implementations§
Source§impl Clone for MemoryRequirement
impl Clone for MemoryRequirement
Source§fn clone(&self) -> MemoryRequirement
fn clone(&self) -> MemoryRequirement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MemoryRequirement
impl RefUnwindSafe for MemoryRequirement
impl Send for MemoryRequirement
impl Sync for MemoryRequirement
impl Unpin for MemoryRequirement
impl UnsafeUnpin for MemoryRequirement
impl UnwindSafe for MemoryRequirement
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