pub struct KvLayerVerdict {
pub layer: usize,
pub stream: &'static str,
pub n_vectors: usize,
pub recon_int8: f64,
pub int8_bits: f64,
pub recon_dict: f64,
pub dict_code_bits: f64,
pub matched_bits: u32,
pub recon_uniform_matched: f64,
pub go: bool,
}Expand description
Per-(layer, stream) rate-distortion comparison. int8 (the W5a incumbent, 8 bits/elem) is a strong, accurate baseline; a sparse dictionary trades accuracy for a much smaller footprint. So the decision isn’t “does the dictionary beat int8’s accuracy” (it won’t — int8 has ~4× the bits) but “at the dictionary’s OWN low bit rate, does the learned basis beat NAIVE uniform quantization?” — i.e. is the learned codebook worth more than just quantizing more coarsely.
Fields§
§layer: usize§stream: &'static str“K” or “V”.
n_vectors: usize§recon_int8: f64int8 incumbent (8-bit) reconstruction error and footprint — context, not the gate.
int8_bits: f64§recon_dict: f64k-sparse dictionary reconstruction error and asymptotic code footprint (bits/vec, dictionary amortized away as at deployment scale).
dict_code_bits: f64§matched_bits: u32Naive uniform quantization at the dictionary’s matched bit rate — the head-to-head baseline.
recon_uniform_matched: f64§go: boolGO here: the learned dictionary reconstructs at least as well as uniform quantization AT THE SAME bit rate (the learned basis earns its keep).
Trait Implementations§
Source§impl Clone for KvLayerVerdict
impl Clone for KvLayerVerdict
Source§fn clone(&self) -> KvLayerVerdict
fn clone(&self) -> KvLayerVerdict
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for KvLayerVerdict
impl RefUnwindSafe for KvLayerVerdict
impl Send for KvLayerVerdict
impl Sync for KvLayerVerdict
impl Unpin for KvLayerVerdict
impl UnsafeUnpin for KvLayerVerdict
impl UnwindSafe for KvLayerVerdict
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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