> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rivvr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# rivvr deploy

> Import weights and create a model in one command.

Import weights from Hugging Face or S3, then create a model from them. The command always waits for the import; add `--wait` to also wait for the model. If it stops partway, nothing is rolled back. Continue from the IDs it printed instead of running it again.

The [quickstart](https://docs.rivvr.ai/get-started/quickstart.md) walks through it, and [create models](https://docs.rivvr.ai/guides/create-models.md#serving-settings) explains the serving settings.

```bash Usage theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr deploy <hf://...|s3://...> [flags]
```

```bash Example theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr deploy hf://HuggingFaceTB/SmolLM2-135M-Instruct --name hello --max-cost-per-hour 3 --wait
```

## Flags

| Flag | Default | Description |
| - | - | - |
| `--automatic-optimization` | `true` | Let Rivvr tune how the model runs. Add `=false` to turn it off |
| `--average-decode-tokens <n>` | `100` | How long you expect a typical answer to be, in tokens |
| `--average-prefill-tokens <n>` | `200` | How long you expect a typical prompt to be, in tokens |
| `--kv-cache-dtype <dtype>` | `AUTO` | Number format for the KV cache: `AUTO` or `FP8` |
| `--lora <name=entry>` | | Attach a LoRA adapter from storage under a name. Repeatable |
| `--max-cost-per-hour <usd>` | required | Maximum serving cost in USD per hour. At least 0.01, or 0 with scale to zero |
| `--max-model-length <n>` | `300` | Context length: the most tokens one request can use, prompt and answer together |
| `--max-qps <n>` | | Highest number of requests per second you expect |
| `--min-qps <n>` | | Lowest number of requests per second you expect |
| `--model-dtype <dtype>` | `AUTO` | Number format for the weights: `AUTO`, `FLOAT16`, `BFLOAT16`, `FLOAT`, or `FLOAT32` |
| `--name <name>` | required | Model name. The new storage entry gets the same name |
| `--progress-json` | | With `--json --error-json`, also print progress events as JSON on stderr |
| `--quantization <method>` | `NONE` | How the weights are compressed (quantization): `NONE`, `AWQ`, `GPTQ`, `GGUF`, `INT4`, `INT8`, or `FP8` |
| `--scale-to-zero` | | Let the model use no GPUs while nobody sends it requests. The lowest allowed cost becomes 0 |
| `--slo-mode <mode>` | `BALANCED` | What to favor: lower cost (`ECONOMY`), speed (`SPEED`), or a mix (`BALANCED`) |
| `--timeout <duration>` | `30m` | One timeout for the import and the model wait together |
| `--tps-p50 <n>` | | Target writing speed in tokens per second: half of requests should be at least this fast (p50) |
| `--tps-p90 <n>` | | Target writing speed in tokens per second: 90% of requests should be at least this fast (p90) |
| `--ttft-p50-ms <n>` | | Target wait for the first token in milliseconds: half of requests should wait no longer (p50) |
| `--ttft-p90-ms <n>` | | Target wait for the first token in milliseconds: 90% of requests should wait no longer (p90) |
| `--wait` | | Also wait for the model to reach `DEPLOY_READY`. The import is always waited for |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.