Skip to main content

write

Function write 

Source
pub fn write(
    path: &Path,
    meta: &[(String, MetaValue)],
    tensors: &[TensorOut],
    data: impl FnMut(usize) -> Result<Vec<u8>>,
) -> Result<()>
Expand description

Write a GGUF v3 file: the metadata in the order given, the tensor directory, then each tensor’s bytes — asked of data one tensor at a time, so a checkpoint is never held whole — each aligned to general.alignment (32 when absent).