pub struct Engram {Show 16 fields
pub table: String,
pub table_scale: String,
pub hd: usize,
pub lookup: Vec<u32>,
pub mult: Vec<u64>,
pub moduli: Vec<u64>,
pub offsets: Vec<u64>,
pub head_norms: Vec<f32>,
pub key: Vec<QTensor>,
pub key_b: Vec<Vec<f32>>,
pub value: QTensor,
pub value_b: Vec<f32>,
pub norm_key: Vec<Vec<f32>>,
pub norm_query: Vec<Vec<f32>>,
pub gamma: Vec<f32>,
pub hc_scales: Vec<f32>,
}Fields§
§table: String§table_scale: String§hd: usize§lookup: Vec<u32>§mult: Vec<u64>§moduli: Vec<u64>Hash modulus and table row offset of every head (orders major).
offsets: Vec<u64>§head_norms: Vec<f32>§key: Vec<QTensor>§key_b: Vec<Vec<f32>>§value: QTensor§value_b: Vec<f32>§norm_key: Vec<Vec<f32>>§norm_query: Vec<Vec<f32>>§gamma: Vec<f32>§hc_scales: Vec<f32>[hc, hidden].
Implementations§
Source§impl Engram
impl Engram
Sourcepub fn rows(&self, tokens: &[u32], pos: usize, cfg: &Cfg) -> Vec<u64>
pub fn rows(&self, tokens: &[u32], pos: usize, cfg: &Cfg) -> Vec<u64>
The table rows (one per hash head) of the n-gram ending at pos.
Auto Trait Implementations§
impl Forget for Engram
impl Freeze for Engram
impl Move for Engram
impl RefUnwindSafe for Engram
impl Send for Engram
impl Sync for Engram
impl Unpin for Engram
impl UnsafeUnpin for Engram
impl UnwindSafe for Engram
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