pub struct GGUFFile {
pub metadata: Vec<(String, GGUFMetaValue)>,
pub tensors: Vec<GGUFTensorInfo>,
pub data_start: u64,
}Fields§
§metadata: Vec<(String, GGUFMetaValue)>§tensors: Vec<GGUFTensorInfo>§data_start: u64Absolute file offset of the tensor data section.
Implementations§
Source§impl GGUFFile
impl GGUFFile
pub fn read(reader: &mut (impl Read + Seek)) -> Result<Self>
Sourcepub fn tensor_bytes(
&self,
reader: &mut (impl Read + Seek),
info: &GGUFTensorInfo,
) -> Result<Vec<u8>>
pub fn tensor_bytes( &self, reader: &mut (impl Read + Seek), info: &GGUFTensorInfo, ) -> Result<Vec<u8>>
Raw stored bytes of one tensor.
Sourcepub fn tensor_f32(
&self,
reader: &mut (impl Read + Seek),
info: &GGUFTensorInfo,
) -> Result<Vec<f32>>
pub fn tensor_f32( &self, reader: &mut (impl Read + Seek), info: &GGUFTensorInfo, ) -> Result<Vec<f32>>
Tensor decoded to f32 (dequantizing Q8_0).
Auto Trait Implementations§
impl Freeze for GGUFFile
impl RefUnwindSafe for GGUFFile
impl Send for GGUFFile
impl Sync for GGUFFile
impl Unpin for GGUFFile
impl UnsafeUnpin for GGUFFile
impl UnwindSafe for GGUFFile
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