Skip to main content

detect_format

Function detect_format 

Source
pub fn detect_format(head: &[u8]) -> SourceFormat
Expand description

Sniff the container format from the first bytes. GGUF starts with the ASCII magic GGUF; safetensor starts with an 8-byte LE header length immediately followed by a { (the JSON).