Realm

oa::ml::SafeTensorsSource

Validated, host-owned SafeTensors source used by explicit model translators.

StRust public API

Declaration

pub struct SafeTensorsSource { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn names(&self) -> impl Iterator<Item = &str>
pub fn shape(&self, name: &str) -> Option<&[usize]>
pub fn f32_bytes(&self, name: &str) -> Result<&[u8]>
pub fn metadata(&self) -> &HashMap<String, String>

Associated Functions

pub fn open(path: &Path) -> Result<Self>

Public Method Documentation

pub fn names( &self ) -> impl Iterator<Item = &str>
No public source comment is attached to this declaration.
pub fn shape( &self, name: &str ) -> Option<&[usize]>
No public source comment is attached to this declaration.
pub fn f32_bytes( &self, name: &str ) -> Result<&[u8]>
No public source comment is attached to this declaration.
pub fn metadata( &self ) -> &HashMap<String, String>
No public source comment is attached to this declaration.
pub fn open( path: &Path ) -> Result<Self>
No public source comment is attached to this declaration.