pub struct Q8Activations {
pub q: Vec<i8>,
pub d: Vec<f32>,
}Expand description
An activation vector quantized to signed 8-bit in 32-element blocks,
each with its own f32 scale (d), so it can feed the integer
vec_dot paths against Q8_0 weights. This mirrors llama.cpp’s
quantize_row_q8_1 (minus the block sum, which is only needed for
asymmetric weight formats): quantizing the shared activation once per
matvec turns every weight-row dot into an int8×int8 → int32 reduction
(vdotq_s32 / _mm256_maddubs-class ops) plus a single scale, which
is what lets llama.cpp’s CPU matmul stay in integer SIMD.
Fields§
§q: Vec<i8>Signed 8-bit quantized values, n_blocks * 32 long.
d: Vec<f32>Per-block scale, n_blocks long. x ≈ q * d.
Implementations§
Trait Implementations§
Source§impl Clone for Q8Activations
impl Clone for Q8Activations
Source§fn clone(&self) -> Q8Activations
fn clone(&self) -> Q8Activations
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Q8Activations
impl RefUnwindSafe for Q8Activations
impl Send for Q8Activations
impl Sync for Q8Activations
impl Unpin for Q8Activations
impl UnsafeUnpin for Q8Activations
impl UnwindSafe for Q8Activations
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