pub struct Ternary {
pub rows: usize,
pub cols: usize,
/* private fields */
}Expand description
A ternary-weight matrix (BitNet b1.58 family): weights ∈ {−1,0,+1} packed 16 per u32 (2 bits each), with a per-output-channel scale (absmean). The matmul is effectively multiply-free — each weight just adds, subtracts, or skips an activation. 1.58 bits/weight ≈ 1/16 the memory of f32.
Fields§
§rows: usize§cols: usizeImplementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Ternary
impl !UnwindSafe for Ternary
impl Freeze for Ternary
impl Send for Ternary
impl Sync for Ternary
impl Unpin for Ternary
impl UnsafeUnpin for Ternary
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