Self-hosted inference
Have emma install vLLM or Ollama on one of your VMs to serve an open model, and what you can and can't do with the result.
emma can install an inference server on a VM you already run, so an open model serves from hardware under your control. It supports two engines — vLLM (the default) and Ollama. The server it installs is not added to the copilot's model picker: it listens on the VM itself, and you use it from there.
In a nutshell:
- vLLM — the default, higher-throughput engine; needs an NVIDIA GPU and pulls models from Hugging Face with a stored Hugging Face credential
- Ollama — the quick-start path; pulls from the Ollama library (no Hugging Face credential) and also runs on a VM without a GPU
- Both serve on the VM's localhost only — nothing is opened to the internet
- Or bring an existing endpoint — point emma at an OpenAI-compatible
httpsURL you already run
Before you start you need a VM with a public IP that emma can reach over SSH with a key stored in Settings → SSH Keys. For vLLM you also need a Hugging Face token stored under Settings → Cloud Providers (as a Hugging Face credential) — vLLM always fetches the model through it, not only for gated models.
1. Choose an engine
Ask emma to set up an inference server on the VM and pick the engine that fits.
The default. Higher throughput. The model is a Hugging Face repo id including its owner, such as
meta-llama/Llama-3.1-8B-Instruct. emma checks the GPU first and stops if it has less memory than an 8B-class
model needs in FP16, unless you tell it to proceed anyway. Serves on port 8000 by default.
Try this
Set up a vLLM inference server for meta-llama/Llama-3.1-8B-Instruct on my GPU VM
The no-Hugging-Face, quick-start path. Installs Ollama, pulls the model from the Ollama library (a name
such as llama3.1:8b), and serves it on port 11434. The port can't be changed.
Try this
Set up an Ollama server for llama3.1:8b on my VM
2. Let emma install it
emma connects to the VM over SSH, installs the engine, fetches the model, and waits until the server answers. The whole run has a 15-minute hard cap; if it isn't healthy by then, emma reports where it stopped. If the VM already runs an emma-installed server with the same engine and model, emma reuses it instead of reinstalling.
Each run stores a new inference credential in emma for that server and reports the engine, model, and port. For
vLLM, the matching API key is written to /etc/emma/inference.token on the VM, and the server requires it
as a Bearer token.
A self-hosted model runs on infrastructure you pay for. Size the VM to the model, and remember the server keeps running (and costing) until you remove it or the VM.
3. Use the model
The server binds to 127.0.0.1 on the VM, so it answers only on the VM itself, even if the reply shows
the VM's public IP. To reach it from your machine, open an SSH tunnel
(ssh -L 8000:127.0.0.1:8000 <user>@<vm-ip> for vLLM, port 11434 for Ollama). It speaks an
OpenAI-compatible API under /v1.
It does not show up in the model picker, and you can't add it as a self-hosted endpoint as it stands:
self-hosted endpoints must be https URLs on a public address, and emma refuses localhost and private
addresses. To use a model from the copilot, run it behind your own public https endpoint and add that
endpoint — see Bring your own model keys. Self-hosted endpoints
are part of multi-provider support, which is not enabled by default; contact emma to enable it for your
company.
What's next
- Choosing models — the models the copilot can use
- Bring your own model keys — point at an endpoint you run
- The copilot — what the model powers
Last updated on 24 Sept 2026