pub struct Sam3 { /* private fields */ }Implementations§
Source§impl Sam3
impl Sam3
pub fn open(path: &str) -> Result<Self>
Sourcepub fn directory(&self) -> Vec<String>
pub fn directory(&self) -> Vec<String>
Debug: "name dtype shape" lines for every tensor in the CMF
directory (the parity tests filter them by section).
Sourcepub fn raw_tensor(&self, name: &str) -> Option<Vec<u8>>
pub fn raw_tensor(&self, name: &str) -> Option<Vec<u8>>
Debug: raw payload bytes of one directory tensor.
Sourcepub fn bad_scales(&self) -> Vec<String>
pub fn bad_scales(&self) -> Vec<String>
Debug: every q8_row row scale and every f16 payload element
whose bit pattern is non-finite, as "name@idx bad=0x…" lines.
Sourcepub fn forward(
&mut self,
pixels: &[f32],
ids: &[u32],
attn: &[u8],
) -> Result<Sam3Out>
pub fn forward( &mut self, pixels: &[f32], ids: &[u32], attn: &[u8], ) -> Result<Sam3Out>
pixels [3,1008,1008] preprocessed; ids/attn length 32
(Sam3Processor, padding to max_length=32).
Debug knobs (unset in normal runs): SAM3_ONLY=trunk,... runs only
the listed stages and returns empty tensors for the rest (the
parity test skips while it is set); SAM3_DUMP_DIR makes trunk
write its stage outputs (trunk_patch.f32, trunk_pre.f32,
trunk_b{l}.f32) for reference bisection; SAM3_TEXT_DEBUG=1
prints per-stage finiteness stats of the text tower.
Auto Trait Implementations§
impl !RefUnwindSafe for Sam3
impl !UnwindSafe for Sam3
impl Freeze for Sam3
impl Send for Sam3
impl Sync for Sam3
impl Unpin for Sam3
impl UnsafeUnpin for Sam3
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