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 function

header_only_weight_files

header_only_weight_files()​

max.pipelines.weights.hf_utils.header_only_weight_files(huggingface_model_id, filenames, revision=None, max_workers=8)

source

Stands in header-only stubs for a model’s safetensors files.

Fetches each remote file’s header and writes a sparse stub of the full file size, instead of downloading the weights. Compilation reads only tensor names, shapes, dtypes and the file-level __metadata__, all of which the header carries, so a compile-only run never needs the bytes.

Parameters:

  • huggingface_model_id (str) – The Hugging Face model identifier, that is, MiniMaxAI/MiniMax-M3-MXFP8.
  • filenames (list[str]) – Safetensors file paths relative to the root of the Hugging Face repo.
  • revision (str | None) – The Hugging Face revision to read headers from. Defaults to the Hub’s default revision.
  • max_workers (int) – The number of worker threads to concurrently fetch headers.

Returns:

Absolute stub paths, in the order of filenames.

Raises:

ValueError – If any filename is not a safetensors file.

Return type:

list[Path]