pub enum CompressionMethod {
None,
Quantize8Bit,
Quantize16Bit,
TopK {
k: usize,
},
RandomSparsify {
p: f64,
},
QuantizeThenSparsify {
bits: u8,
sparsity: f64,
},
}Expand description
Compression method for gradients
Variants§
None
No compression
Quantize8Bit
8-bit quantization
Quantize16Bit
16-bit quantization
TopK
Keep only top-k largest gradients by magnitude
RandomSparsify
Random sparsification with probability p
QuantizeThenSparsify
Combined: quantize then sparsify
Trait Implementations§
Source§impl Clone for CompressionMethod
impl Clone for CompressionMethod
Source§impl Debug for CompressionMethod
impl Debug for CompressionMethod
Source§impl PartialEq for CompressionMethod
impl PartialEq for CompressionMethod
impl StructuralPartialEq for CompressionMethod
Auto Trait Implementations§
impl Forget for CompressionMethod
impl Freeze for CompressionMethod
impl RefUnwindSafe for CompressionMethod
impl Send for CompressionMethod
impl Sync for CompressionMethod
impl Unpin for CompressionMethod
impl UnsafeUnpin for CompressionMethod
impl UnwindSafe for CompressionMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more