pub struct LogQuantizedConfig {
pub enabled: bool,
pub compression_ratio: usize,
pub min_magnitude: f64,
}Expand description
Configuration for logarithmic quantization.
Replaces linear scalar bins with log-scaled bins for skewed distributions (exp / ReLU / log-normal style embeddings).
Fields§
§enabled: boolWhether logarithmic quantization is enabled.
compression_ratio: usizeCompression ratio target (4 ≈ 8-bit codes). Used as documentation of intended density; codes are always u8 today.
min_magnitude: f64Floor magnitude before log (avoids log(0)).
Implementations§
Source§impl LogQuantizedConfig
impl LogQuantizedConfig
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
True when operators enabled this path. Implementation is in-tree.
Trait Implementations§
Source§impl Clone for LogQuantizedConfig
impl Clone for LogQuantizedConfig
Source§impl Debug for LogQuantizedConfig
impl Debug for LogQuantizedConfig
Source§impl Default for LogQuantizedConfig
impl Default for LogQuantizedConfig
Source§impl<'de> Deserialize<'de> for LogQuantizedConfig
impl<'de> Deserialize<'de> for LogQuantizedConfig
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 LogQuantizedConfig
impl RefUnwindSafe for LogQuantizedConfig
impl Send for LogQuantizedConfig
impl Sync for LogQuantizedConfig
impl Unpin for LogQuantizedConfig
impl UnsafeUnpin for LogQuantizedConfig
impl UnwindSafe for LogQuantizedConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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