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).

max

The max command line tool runs, benchmarks, and quantizes MAX pipelines. Use max serve to host an OpenAI-compatible endpoint, max generate or max encode to run a model directly, max benchmark to load-test a running server, and max list to discover the architectures MAX supports.

To prepare a deployment, use max warm-cache to compile and cache a model, max warm-interpreter-cache to compile the eager interpreter's operations for the current machine, and max export to write a compiled pipeline artifact. Use max quantize to write a quantized checkpoint and max quantize-report to print the per-layer quantization error from the directory a run with --error-report-dir wrote.

To install the max CLI, follow the install guide.

Usage​

max [OPTIONS] COMMAND [ARGS]...

Options​

  • --log-level <log_level>​

    Set logging level explicitly (ignored if --verbose or --quiet is used).

    Options:

    DEBUG | INFO | WARNING | ERROR

  • --version​

    Show the MAX version and exit.

Commands​

  • benchmark:

    Run benchmark tests on a serving model.

  • encode:

    Encode text input into model embeddings.

  • export:

    Build the pipeline and export it as a...

  • generate:

    Generate text or images using the...

  • list:

    List available pipeline configurations and...

  • quantize:

    Quantize the specified model and write a...

  • serve:

    Start a model serving endpoint for inference.

  • warm-cache:

    Load and compile the model to prepare caches.