IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python module

max.graph.weights

Weight containers​

WeightDataContainer for weight tensor data with metadata.
WeightsProtocol for managing and accessing model weights hierarchically.
WeightsAdapteralias of Callable[[...], dict[str, WeightData]]

Format-specific loaders​

GGUFWeightsImplementation for loading weights from GGUF (GPT-Generated Unified Format) files.
SafetensorWeightsImplementation for loading weights from safetensors files.

Loading functions​

load_weightsLoads neural network weights from checkpoint files.
weights_formatDetect the format of weight files based on their extensions.

Enums​

WeightsFormatEnumeration of supported weight file formats.