> For the complete documentation index, see [llms.txt](https://docs.modular.com/llms.txt).
> Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

# max

The `max` command line tool runs and benchmarks MAX pipelines from one
binary. 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, `max warm-cache` to compile and cache a model ahead of
deployment, and `max list` to discover the architectures MAX supports.

To install the `max` CLI, install the `modular` package as shown
in the [install guide](https://docs.modular.com/max/packages.md#install).

## Usage

```shell
max [OPTIONS] COMMAND [ARGS]...
```

## Options

<ul class='cli-option-list'><li>

### `--log-level <log_level>`

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

<dl class='field-list'><dt>

**Options:**

</dt><dd>

DEBUG | INFO | WARNING | ERROR

</dd></dl>

</li></ul>

<ul class='cli-option-list'><li>

### `--version`

Show the MAX version and exit.

</li></ul>

## Commands

<ul class='cli-object-list'><li>

[`benchmark`](https://docs.modular.com/max/cli/benchmark.md):

Run benchmark tests on a serving model.

</li></ul>

<ul class='cli-object-list'><li>

[`encode`](https://docs.modular.com/max/cli/encode.md):

Encode text input into model embeddings.

</li></ul>

<ul class='cli-object-list'><li>

[`generate`](https://docs.modular.com/max/cli/generate.md):

Generate text using the specified model.

</li></ul>

<ul class='cli-object-list'><li>

[`list`](https://docs.modular.com/max/cli/list.md):

List available pipeline configurations and...

</li></ul>

<ul class='cli-object-list'><li>

[`serve`](https://docs.modular.com/max/cli/serve.md):

Start a model serving endpoint for inference.

</li></ul>

<ul class='cli-object-list'><li>

[`warm-cache`](https://docs.modular.com/max/cli/warm-cache.md):

Load and compile the model to prepare caches.

</li></ul>
