pub enum CompressedTensor {
Full {
data: Vec<f32>,
},
Half {
data: Vec<u16>,
scale: f32,
dim: usize,
},
PQ8 {
codes: Vec<u8>,
codebooks: Vec<Vec<f32>>,
subvector_dim: usize,
dim: usize,
},
PQ4 {
codes: Vec<u8>,
codebooks: Vec<Vec<f32>>,
outliers: Vec<(usize, f32)>,
subvector_dim: usize,
dim: usize,
},
Binary {
bits: Vec<u8>,
threshold: f32,
dim: usize,
},
}Expand description
Compressed tensor data
Variants§
Full
Uncompressed full precision data
Half
Half precision data
PQ8
8-bit product quantization
PQ4
4-bit product quantization with outliers
Fields
Binary
Binary quantization
Trait Implementations§
Source§impl Clone for CompressedTensor
impl Clone for CompressedTensor
Source§fn clone(&self) -> CompressedTensor
fn clone(&self) -> CompressedTensor
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 moreSource§impl Debug for CompressedTensor
impl Debug for CompressedTensor
Source§impl<'de> Deserialize<'de> for CompressedTensor
impl<'de> Deserialize<'de> for CompressedTensor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompressedTensor
impl RefUnwindSafe for CompressedTensor
impl Send for CompressedTensor
impl Sync for CompressedTensor
impl Unpin for CompressedTensor
impl UnwindSafe for CompressedTensor
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