Models & GPU
Every agent calls a language model. On-premises, the model runs on a model server inside your network. This page covers which models to load, how to size the host, and how to add a GPU host with a fallback.
The three models
| Model | Setting | Default | Used for |
|---|---|---|---|
| Text | OLLAMA_MODEL | gemma2:2b (chart) / chosen at bundle download (Compose) | Every agent step |
| Embedding | OLLAMA_EMBED_MODEL | nomic-embed-text | Knowledge collections: finding the tenant's own records to cite |
| Vision | VISION_MODEL | gemma3:4b | Images, video frames and camera snapshots attached to a run |
All three must be on the model server before the first run. The chart's model-pull job pulls them; in air-gapped mode, copy them onto the volume yourself.
Healthcare vision model (optional)
The Healthcare Agent can use a separate medical vision-language model (lingsante-3.1-air-vl, open weights under the MIT licence) for its drafts and for the clinical photos and lab reports attached to its runs. It runs on its own GPU server with an OpenAI-compatible API (vLLM), not on the model server above.
| Setting | What it is |
|---|---|
HEALTHCARE_VLM_URL | The server. Unset: healthcare runs use the models above |
HEALTHCARE_VLM_TOKEN | Bearer token the server requires |
HEALTHCARE_VLM_RESIDENCY | us, eu or apac, when the server is outside your network |
It needs about four 24 GB GPUs for the 4-bit weights. Patient data is restricted, so the model reads none until it has passed the healthcare checks and the result is recorded in the model registry; until then healthcare runs use the models above. A server on your own network is then used for every organisation. A server outside it is used only for an organisation whose owner has switched on Restricted data on the platform's rented GPU in Workspace → Compliance, and whose residency allows the server's region. If the model fails or is not permitted, the run uses the models above. Setup: runpod/healthcare-vlm/README.md.
CPU hosts (Tier A)
What we measured on our hosted service, with a 2-billion-parameter model on CPU:
| Measurement | Result |
|---|---|
| Generation speed, thread count pinned | About 6 tokens per second (5 to 8.5 across runs) |
| Same model, thread count not pinned | 0.02 to 0.27 tokens per second; requests timed out |
| One agent call, end to end | 10 to 102 seconds; most 20 to 45 |
| Requests at once per model instance | One |
A 12-billion-parameter model on the same CPU host produced about 1.7 tokens per second, and an answer took 5 to 7 minutes. More cores did not fix it.
Pin the thread count. Inside a container with a CPU quota, the model server otherwise starts one thread per physical core of the host and is throttled. Set OLLAMA_NUM_THREAD (8 was best on our host; 12, 16 and 24 were slower) and test values on yours.
Images on a CPU host. The vision model streams its answer. A model that is still producing is allowed to finish (up to 10 minutes per image); one that goes silent is stopped. The private model looks at up to 4 images per run. If the first image is too slow, the run says so instead of waiting on every image.
GPU hosts (Tier B and C)
Point the platform at a GPU model server on your network. It is treated like the in-cluster one: a host on a private address (RFC 1918, loopback, or a cluster-internal name) is always permitted, including in air-gapped mode.
| Setting | Value |
|---|---|
OLLAMA_ENDPOINT | The GPU host, e.g. http://gpu-models.yourcompany.internal:11434. With the chart: ollama.externalEndpoint |
OLLAMA_AUTH_TOKEN | A bearer token, if the GPU host sits behind a proxy that requires one |
OLLAMA_FALLBACK_ENDPOINT | The in-cluster CPU model server, used only when the GPU host cannot be reached |
Put OLLAMA_AUTH_TOKEN in the Secret, and the endpoints in config.extra. The chart can keep its in-cluster model server running as the fallback. A GPU host outside the cluster must also be allowed in networkPolicy.extraEgress (see Kubernetes Install).
When it falls back. Only when the GPU host cannot be reached (connection refused, DNS failure, reset) or its proxy answers 502 to 504. A slow answer is not a reason to start again on a slower host. After three such failures in a row, the GPU host is skipped for two minutes. The agent service follows whichever host the backend chose for that call.
Threads. With a fallback configured, OLLAMA_NUM_THREAD is sent to the fallback (CPU) host only.
Sizing (estimate). For a 4-bit quantised 70-billion-parameter model: 40 to 48 GB of GPU memory (one 48 GB card or two 24 GB cards), 64 GiB RAM, 16+ cores, 100 GB of fast SSD. Plan for a few simultaneous requests per GPU. Smaller models on a smaller GPU are faster, at lower answer quality. Confirm in the pilot.
The GPU-pod budget guard (RUNPOD_* settings) is for our hosted service's rented GPU. Leave it unset on-premises.
Hosted models and residency
On-premises, the simplest position is no hosted models at all: run in air-gapped mode, or set the organisation's inference residency to self-hosted. Either one stops every step from going to an outside model, whatever keys are configured.
If you do allow hosted models (connected installs only), the self-hosted model still comes first. A step goes to a hosted model only when no self-hosted model can serve it, for one of two reasons:
- the self-hosted model cannot be reached, or
- the prompt is too large for every self-hosted model you have installed.
The reason is recorded with the run. Being allowed to leave is not a reason to leave. An operator who wants the earlier behaviour, where every step the rules below allow goes to the hosted model, sets MODEL_POLICY=fitness.
A step that has a reason to leave must then pass every one of these:
PUBLICsteps may go to a hosted model, under a hard monthly spend cap.SENSITIVEsteps may go only with a signed data processing agreement.RESTRICTEDsteps never leave your network.- Organisation residency (
us,eu,apac) and EU/UK jurisdiction are respected, and failures fall back to the self-hosted model.
For vision, an organisation can choose its own OpenAI, Google or Anthropic key in the run form. A self-hosted-only organisation cannot.