Deploy and run self-hosted models
A model you host yourself only answers while it runs, and while it runs it holds a GPU or a good share of a server's memory. You want it ready when people use it, out of the way when they don't, and you want to know at a glance whether it is downloading, starting, serving or broken. In Rational AI you add an open-source model from Hugging Face, decide how many copies of it run and when it gives its hardware back, and follow every step from the AI Model Registry.
A self-hosted model in the registry describes what to run: the weights (for example a Hugging Face repository) and its deploy settings. Its deployment is the running copy on your hosting platform: on your own servers for an on-premises installation, or on Rational AI's infrastructure in the cloud. A deployment has a phase, which says where it is in its lifecycle, and replicas, the running instances of the model that answer requests. Each model has at most one deployment.
Prerequisites
Before you start, make sure you have:
- Permissions: Create on the AI Model Registry row of your role to add and deploy a model, Update to change its scale, Delete to remove its deployment.
- Hardware for the model: on your own servers, GPUs or enough memory for the model (see Run models on your own servers); on Rational AI's cloud, a license that includes self-hosted models (listed on the Licence page as Self-hosted models on this machine (enterprise)). Without it, the deployment is refused with "This workspace's plan does not include hosting your own models on our GPUs."
- A Hugging Face token, for gated models only: models such as Llama or Gemma need your own token on the installation. Public models need none.
Add an open-source model
The model picker searches Hugging Face live, so you see the current catalog rather than a fixed list.
-
Go to Settings → AI Model Registry and select New (Add new when the registry is empty).
-
Select Choose an open source model ("Install a model available open source via Hugging Face") and select Next.
-
Search by name, or browse. Narrow the list with:
Control What it does Sort Best match, Most downloads (the default), Most likes or Recently updated Formats The weight formats to list: Safetensors, GGUF, AWQ. Only the formats your hosting platform can run are offered Curated picks Only the models Rational AI has selected and tested Only models that fit Leaves out the models estimated to be too large for the hardware -
Select a model to read its card on the right: publisher, architecture, parameters, weights, popularity, last update, and its Hugging Face model card. Icons on each entry mark a model that accepts images, a curated pick, and a model Already registered.
-
Select Confirm. The model is added to the registry, but not deployed yet.
Where the installation can estimate it, a chip says whether a model Fits, Fits with FP8 (it fits once quantized to 8 bits), or is Too large, by comparing its size with the memory it would be given. It does not check whether a GPU is free right now, so a model that fits can still wait for room when you deploy it.
Upload a model file
Where your hosting platform accepts uploaded weights, the same dialog also offers Install your own fine tuned model:
- Choose Install your own fine tuned model and select Next.
- Pick the model file (a
.gguffile) and check the Name, which is taken from the file name. - Select Confirm. The file is uploaded and the model deployed; a large file can take several minutes.
The option is hidden when the hosting platform accepts no uploads.
Review the deploy settings
Each self-hosted model has Deploy settings, read when it is deployed: what hardware it gets and how its runner starts. Open them from the model's row menu with Edit details.
- Context Length: the most tokens the model processes in one request. A longer context needs more memory.
- The number of GPUs: listed first where the platform has GPUs.
0runs the model on the CPU, much more slowly. - The runner's settings: such as the GPU memory budget and the tool-call and reasoning parsers. The form lists the ones your hosting platform supports, with the rarely needed ones under Advanced settings.
Each field shows Default: and the value this model gets when you leave it alone. Choose Custom to set your own value, or, for a flag, Don't pass to leave it out entirely. Defaults are chosen for each model and your hardware.
Saving the deploy settings changes what should run, not what runs. The deployment shows Settings not deployed and lists the fields that changed until you deploy them, and when the model is running you are asked right after saving whether to deploy them now.
Deploy a model
- Open the model from the registry. The Deployment section says "The model is not deployed: requests to it fail until it is."
- Select Deploy and confirm. You can also use Deploy model in the row menu.
- Follow the phase in the chip next to Deployment. A spinning line shows what the platform is doing, for example downloading the image or the weights.
A first deployment can take several minutes: the weights download once, and stay cached for later starts.
Read the phase
| Phase | What it means |
|---|---|
| Provisioning | First start of these settings: downloading, creating, starting |
| Starting | Starting again after it was ready before |
| Ready | At least one replica answers requests |
| Idle | No replica runs to save hardware; the next request starts one |
| Stopping | Going down to zero replicas |
| Stopped | No replica runs, and requests don't start one |
| Failed | The settings cannot run; the notice says why |
| Deleting | The deployment is being removed |
| Not deployed | The model has no deployment yet |
The section also shows Replicas ("1 of 1 ready"), In this phase since and Last request. The models list shows the same phase in its Status column and updates as it changes.
A notice under the phase explains a delay without changing it: "Waiting for the platform to find room for it", "Starting much more slowly than it usually does", "The hosting platform cannot be reached; retrying". Only problems that retrying cannot fix move the deployment to Failed: it ran out of memory, it crashed repeatedly, it took too long to start, or the platform found no room in time. A failed deployment is not retried and releases its hardware; fix its settings and select Deploy again.
Decide how many replicas run
The scale says how much hardware the model holds, and when.
- Open the model and go to Deployment.
- Set Minimum replicas: the replicas kept running without requests.
- 0: on demand. The model gives back its hardware when idle, and the next request waits while it starts.
- 1 or more: always on. The model answers at once, and keeps its hardware.
- With a minimum of 0, set Release after: the minutes without requests before it releases its hardware. Leave it empty to use the installation's default, shown in the field (ten minutes unless your installation changed it).
- Where shown, set Running now: how many replicas run at this moment.
0releases the hardware until the next request. - Select Set scale. The change applies at once, without restarting running replicas.
Maximum replicas appears only where the hosting platform scales a model by load. Elsewhere the maximum is the most the platform allows, and Running now chooses how many run.
| Option | When to use it |
|---|---|
| Minimum 0, short Release after | Models used now and then, on hardware shared with other models |
| Minimum 0, long Release after | Models used in bursts, where a cold start in the middle of a session would annoy people |
| Minimum 1 or more | Models people rely on all day, or that take long to start |
An idle model starts when a request arrives, and that request waits up to a couple of minutes for it. If the model takes longer, the request fails with a message that the model is warming up, and the next one gets through once it is ready. Raise the minimum, or warm the model up before people need it, when that wait matters.
Stop, resume or warm up a model
- Stop: releases the hardware and keeps it released: requests to the model fail until you resume it. Use it from Deployment or Stop model in the row menu.
- Resume: "it answers requests again, and the first one starts it." Also Resume model in the row menu.
- Warm up: "it starts now, so the first request does not wait." Offered where the platform does not start models on its own.
- Restart: deploys the same settings again on a running model.
- Delete deployment: removes the deployment. The model stays in the registry and can be deployed again.
Enable or disable a model
Disabling a model is the quickest way to take it out of service without deleting it, for example while you check a problem.
- In the registry, open the model's row menu and select Disable.
- Read the dialog. It lists what still uses the model (touchpoints, default models, Knowledges and generation settings) and whose requests will fail, and offers to move those uses to another enabled model with the same purpose.
- Choose whether to stop its deployment too. It is not stopped by default, so the model can keep running and serve as soon as you enable it again.
- Confirm.
A disabled model refuses every request at once, disappears from model pickers, shows Disabled in the Status column, and its details say "Requests to it are refused, and model pickers do not offer it." A chat that uses it says it was refused because its model is disabled. To bring it back, select Enable in the row menu or in the details; enabling leaves the deployment as it is, so resume it if it was stopped.
A model with billing history cannot be deleted, because that history stays attached to it. Disabling it keeps the records and stops its use.
Next steps
- Manage AI models in the registry: capabilities, default models and approval.
- Set how long data is kept: decide whether each model stores prompts and answers, and for how long.