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

# SELF-HOST A MODEL

> Export a model from Oumi as an adapter or merged weights, and serve it with vLLM on your own infrastructure

Export a model to serve it outside Oumi, on your own hardware or a cloud GPU instance. The export uses standard Hugging Face files, so common inference engines such as vLLM can serve it without conversion.

## WHEN TO SELF-HOST

An [Oumi deployment](https://docs.oumi.ai/guides/deployment/deploy-a-model.md) is the faster path for most teams, and it is the only path with inference logs, serving metrics, and quality monitoring in Oumi. Self-host when a requirement rules it out:

* Your data can't leave your own infrastructure, or your network is air-gapped.
* The model must fit into a serving stack you already run.
* You want to run the model on hardware you already own.

You can also export a model to keep a copy of its weights outside the platform.

## EXPORT A MODEL

1. On the **Models** page, open the model's actions menu and select `Export`.
2. For a model trained with LoRA, choose the **Format**:
   * `Adapter only` exports the small LoRA adapter. Serve it together with the base model. Choose it when your serving stack loads adapters, or to serve several adapters on one base model.
   * `Merged full weights` merges the adapter into the base model and exports a standalone model. Choose it when your serving stack needs a single model. Merging can take a few hours, and you must keep the browser tab open until it finishes.
3. Click `Continue Export`, and download the archive.

The archive holds the weights, the tokenizer, and the configuration files that an inference engine needs.

## SERVE THE MODEL WITH VLLM

[vLLM](https://github.com/vllm-project/vllm) runs an OpenAI-compatible server from the exported files. Install it, and unpack the archive:

```bash theme={null}
pip install vllm
mkdir exported_model && tar -xzf model.tar.gz -C exported_model
```

For merged or full weights, serve the directory:

```bash theme={null}
vllm serve ./exported_model --port 8000
```

For an adapter, serve the base model and load the adapter on top of it. Replace the base model with the one you trained from:

```bash theme={null}
vllm serve Qwen/Qwen3-4B-Instruct-2507 --enable-lora --lora-modules my-model=./exported_model --port 8000
```

Then call the server with the OpenAI SDK. For an adapter, use the name you gave it as the model:

```python theme={null}
from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="unused")

response = client.chat.completions.create(
    model="my-model",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
```

To serve from a cloud GPU instance, copy the exported files to it and run the same commands there. Don't expose a vLLM server to the internet without authentication in front of it.

## OTHER PLATFORMS

An exported model also works with other serving options:

* **Hugging Face `transformers`:** Load the model in Python, or serve it with the `transformers` CLI. See its [serving documentation](https://huggingface.co/docs/transformers/serving).
* **Amazon Bedrock:** Import the model as a Bedrock custom model. See the [AWS walkthrough](https://aws.amazon.com/blogs/machine-learning/accelerate-custom-llm-deployment-fine-tune-with-oumi-and-deploy-to-amazon-bedrock/).

A self-hosted model doesn't report back to Oumi, so plan your own logging and evaluation for it.


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