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 package

max.experimental

Experimental APIs for building, sharding, and running ML workloads.

Built on top of max.graph and max.driver, in three layers that each consume the one below:

  • nn – the Module base class plus ahead-of-time compilation to a CompiledModel.
  • functional – a one-function-per-op distributed dispatcher (F.matmul, F.add, …).
  • sharding – placements, the device mesh, the action data model, a cost model, and pluggable per-op solvers.

The distributed Tensor ties them together.

Example:

from max.experimental import Tensor
from max.experimental import functional as F

x = Tensor.ones((4, 8))
y = F.matmul(x, x.T)

The max.experimental package contains eager-execution APIs. These APIs provide a PyTorch-style interface for tensor operations, neural network modules, and functional operations.

Modules​