IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Python class

WeightsAdapter

WeightsAdapter​

max.graph.weights.WeightsAdapter

source

Type alias for functions that adapt weight formats to WeightData dictionaries.

WeightsAdapter functions are used by pipeline architectures to convert between different checkpoint formats (for example, HuggingFace, PyTorch) and MAX’s internal format. They take model configuration and return a dictionary mapping weight names to WeightData objects.

alias of Callable[[…], dict[str, WeightData]]