pymllm.mobile.convertor

Submodules

Attributes

Functions

load_model(file_path[, include_prefixes])

Load a model from file. Supports safetensors and torch formats.

Package Contents

pymllm.mobile.convertor.MLLM_FIND_SAFETENSORS_AVAILABLE
pymllm.mobile.convertor.load_model(file_path, include_prefixes=())

Load a model from file. Supports safetensors and torch formats. For safetensors, also supports model.index.json files.

Parameters:
  • file_path (str) – Path to the model file or a directory containing a safetensors model

  • include_prefixes (Sequence[str]) – Optional parameter-name prefixes to load. Filtering an indexed model before opening its shards avoids loading unrelated vision or MTP tensors.

Returns:

Dictionary containing the model parameters

Return type:

Dict