pub struct CompressedEmbedding {
pub quantized_values: Vec<u8>,
pub scale: f32,
pub offset: f32,
pub dimension: usize,
pub compression_ratio: f32,
}Expand description
Compressed embedding representation
Fields§
§quantized_values: Vec<u8>Quantized embedding values
scale: f32Quantization parameters
offset: f32§dimension: usizeOriginal dimension
compression_ratio: f32Compression ratio achieved
Trait Implementations§
Source§impl Clone for CompressedEmbedding
impl Clone for CompressedEmbedding
Source§fn clone(&self) -> CompressedEmbedding
fn clone(&self) -> CompressedEmbedding
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 CompressedEmbedding
impl Debug for CompressedEmbedding
Source§impl<'de> Deserialize<'de> for CompressedEmbedding
impl<'de> Deserialize<'de> for CompressedEmbedding
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 CompressedEmbedding
impl RefUnwindSafe for CompressedEmbedding
impl Send for CompressedEmbedding
impl Sync for CompressedEmbedding
impl Unpin for CompressedEmbedding
impl UnwindSafe for CompressedEmbedding
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