Python class
WeightsFormat
WeightsFormatโ
class max.graph.weights.WeightsFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Enumeration of supported weight file formats.
MAX supports multiple weight formats to accommodate different model sources and use cases.
ggufโ
gguf = 'gguf'
GGUF (GPT-Generated Unified Format) for quantized models.
File extension: .gguf
Optimized for quantized large language models, particularly those from the
llama.cpp ecosystem. Supports multiple quantization schemes (Q4_K,
Q5_K, Q8_0, etc.) and includes model metadata in the file.
safetensorsโ
safetensors = 'safetensors'
Safetensors format for secure and efficient tensor storage.
File extension: .safetensors
Designed by Hugging Face for safe serialization that prevents arbitrary code execution. Uses memory-mapped files for fast loading and supports sharding across multiple files.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!