pub struct LayerView<'a> {
pub layer_idx: usize,
pub weights: &'a [u8],
pub rows: usize,
pub cols: usize,
}Expand description
A single layer’s raw weight data, borrowed from the mmap.
Fields§
§layer_idx: usize§weights: &'a [u8]Raw byte slice pointing into the mmap. Caller is responsible for interpreting as the correct element type (f32, f16, etc.).
rows: usizeNumber of rows (hidden_dim for gate/up/down projections).
cols: usizeNumber of columns (ffn_dim for gate/up, hidden_dim for down).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LayerView<'a>
impl<'a> RefUnwindSafe for LayerView<'a>
impl<'a> Send for LayerView<'a>
impl<'a> Sync for LayerView<'a>
impl<'a> Unpin for LayerView<'a>
impl<'a> UnsafeUnpin for LayerView<'a>
impl<'a> UnwindSafe for LayerView<'a>
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