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 class

ModelConfig

ModelConfig

class max.pipelines.kv_cache.ModelConfig(*args, **kwargs)

source

Bases: Protocol

Structural protocol for model configuration consumed by MemoryPlanner.

Any object that exposes devices satisfies this protocol. Planners that also need KV-cache parameters check for get_kv_params via isinstance or guard it with hasattr.

devices

property devices: list[Device]

source

Returns the list of devices on which the model runs.