Skip to main content
A model is a set of files from storage, running in a cluster, ready to answer prompts. To create one you need:
  • the model files in a storage entry,
  • a cluster with the status ACTIVE,
  • a spending limit per hour.
As soon as you create a model, Rivvr load-tests it, chooses suitable GPU machines and settings, and starts it. You don’t need to run anything else.

Create a model from storage

  • hello is the model’s name.
  • --storage is the ID of the storage entry with the model files.
  • --cluster is where the model runs.
  • --max-cost-per-hour is the most it may spend per hour, in USD.
  • --wait makes the command wait until the model is running (DEPLOY_READY). Without it, the command ends as soon as Rivvr accepts the request, and the work continues in the background.
You can leave out --cluster if you picked one earlier with rivvr cluster use. If you didn’t, and the project has exactly one ACTIVE cluster, Rivvr uses it. If there are several, rivvr asks you to choose. Scripts can’t answer that question, so always pass --cluster in scripts. Model names are 3 to 128 characters long. Use lowercase letters, digits, and hyphens (-), and start and end with a letter or digit.

Copy and create in one command

If the files are on Hugging Face or S3, deploy copies them into storage and creates the model:
--name is used for both the model and the new storage entry. deploy always waits for the copy to finish. With --wait, it also waits for the model to start. Both waits together are limited by one --timeout, 30 minutes by default. For files on your own computer there’s no single command. Upload them first, then run model create.

Add LoRA adapters

A LoRA adapter is a small add-on that changes how a model answers, for example to fit one kind of task. One model can use several adapters. Copy or upload each adapter into storage with --type lora. Then add them when you create the model, each with a name:
In billing=BILLING_ADAPTER_ID, billing is the name you choose and the part after = is the adapter’s storage entry ID. Adapter names can use lowercase letters, digits, ., _, and -. They must start and end with a letter or digit, and each name can be used only once per model. The model and all its adapters must be in the same project.

Serving settings

Serving settings control how the model runs. model create and deploy accept the same ones. Only --max-cost-per-hour is required. The rest have defaults, so you can ignore them at first. The glossary explains the terms. The default context length, 300 tokens, is only enough for short tests. For real use, raise it and tell Rivvr how long your prompts and answers usually are:
Rivvr refuses settings that contradict each other:
  • Average prompt tokens plus average answer tokens can’t be more than --max-model-length.
  • The p90 wait for the first token must be at least the p50 wait.
  • The p90 writing speed can’t be higher than the p50 speed.
  • --max-qps must be at least --min-qps.
  • Token counts, request rates, and time targets must be above zero.
rivvr doesn’t check whether your model files support the number format or compression you choose. Check that in the model’s documentation.

What the cost limit covers

--max-cost-per-hour limits what this one model spends on serving. It doesn’t limit the cluster. Setting it to 0 with scale to zero also doesn’t mean your infrastructure bill will be zero. Costs and billing explains how costs are counted. Later, with model update, you can change the cost limit, SLO mode, expected prompt and answer lengths, and targets. You can’t change the model files, adapters, number formats, compression, or context length after the model is created. For those, create a new model.