pub struct EngramLayerWeights {
pub layer: usize,
pub wkv: DevicePtr,
pub qk: DevicePtr,
pub raw: DevicePtr,
pub rows: DevicePtr,
pub wkv_q2k: DevicePtr,
}Expand description
2026-09-25: One engram layer’s resident weights on the device.
Fields§
§layer: usize§wkv: DevicePtr2026-09-25: [dim * (hc + 1), cols * head_dim] bf16.
qk: DevicePtr2026-09-25: [hc, dim] f32, the elementwise product q_weight * k_weight.
raw: DevicePtr2026-09-25: This layer’s row workspace (add_layer allocates it): the raw
Q2_K rows and their bf16 expansion, so every engram layer’s rows for a
step can be resident at once.
rows: DevicePtr§wkv_q2k: DevicePtr2026-09-25: wkv as the GGUF ships it, [out, in / 256] Q2_K blocks of
ENGRAM_ROW_BYTES (84 bytes per 256 weights, against 512 in bf16). The
single-token projection reads it instead of wkv; the two GEMVs agree
bit for bit (checked on a GPU by
gpu_engram_wkv_q2k_gemv_is_bitwise_the_bf16_gemv_over_the_expansion).
Null: bf16 only.
Auto Trait Implementations§
impl Freeze for EngramLayerWeights
impl RefUnwindSafe for EngramLayerWeights
impl Send for EngramLayerWeights
impl Sync for EngramLayerWeights
impl Unpin for EngramLayerWeights
impl UnwindSafe for EngramLayerWeights
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