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 module

max.engine

Modular engine provides methods to load and execute AI models.

Model inferenceโ€‹

CompilationStoppedRaised by InferenceSession.compile() when pre_jit stopped it.
CompiledModelA compiled model artifact, ready for initialization with weights.
CompileOnlyExecutionErrorA model compiled under virtual devices was asked to do something real.
CompileOnlyModelStands in for a Model compiled under virtual devices.
InferenceSessionManages an inference session in which you can load and run models.
ModelA loaded model that you can execute.

Configurationโ€‹

DebugConfigUnified debug configuration for MAX inference.
GPUProfilingModealias of Literal['off', 'on', 'detailed']
LogLevelVerbosity of Mojo logging in the compiled model.
TensorSpecDefines the properties of a tensor, including its name, shape and data type.

Typesโ€‹

CustomExtensionsTypeRepresent a PEP 604 union type