pub struct EngramTables {
pub layer_ids: Vec<usize>,
pub max_ngram: usize,
pub n_heads: usize,
pub head_dim: usize,
pub num_embeddings: Vec<usize>,
pub pad_id: i64,
pub token_map: Vec<i64>,
pub multipliers: Vec<Vec<i64>>,
pub primes: Vec<Vec<Vec<i64>>>,
pub offsets: Vec<Vec<i64>>,
pub scale_block: usize,
pub scales: Vec<Vec<f32>>,
}Expand description
The hash tables and geometry, exactly as the loader will read them from the GGUF.
Fields§
§layer_ids: Vec<usize>§max_ngram: usize§n_heads: usize§head_dim: usize§num_embeddings: Vec<usize>§pad_id: i64token_map[engram_pad_id]: the pad in the COMPRESSED id space.
token_map: Vec<i64>§multipliers: Vec<Vec<i64>>[layer][lookback]
primes: Vec<Vec<Vec<i64>>>[layer][ngram_size - 2][head]
offsets: Vec<Vec<i64>>[layer][(ngram_size - 2) * n_heads + head]
scale_block: usizeElements per e8m0 scale block along head_dim.
scales: Vec<Vec<f32>>[layer][row * (head_dim / scale_block) + block], each a power of two.
Implementations§
Source§impl EngramTables
impl EngramTables
pub fn n_hash_cols(&self) -> usize
pub fn from_golden(g: &Golden) -> Self
Auto Trait Implementations§
impl Freeze for EngramTables
impl RefUnwindSafe for EngramTables
impl Send for EngramTables
impl Sync for EngramTables
impl Unpin for EngramTables
impl UnwindSafe for EngramTables
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