Docs
Sign in

LLM Service

The LLM Service page lets administrators host their own AI models. You browse models on HuggingFace or Ollama, ask a connected model server to pull one, test it, and hand out personal keys so people and apps can call it.

Screenshot to add: The LLM Models page with the hardware strip and the Model Catalog, Active, Servers and Naming & Order tabs.

Open the page

Go to Administration → LLM Service (/admin/llm). The menu item shows a small "llm-ready" badge. The page heading is LLM Models, with the subtitle "Search HuggingFace Hub · Deploy to any inference backend · Issue per-user API keys." You need the apex.admin.llm permission.

At the top you see counters such as "N server(s) online" and "N active" (models that are ready, idle or downloading).

The hardware strip

A strip that refreshes every 30 seconds shows free disk, free memory and how much is used, the memory used by the Ollama container, and free graphics memory ("CPU-only" if there is no GPU). It also lists how many models are loaded. Before the first reading: "Hardware metrics not yet collected — available after 30s".

Tabs

Model Catalog, Active (n), Servers (n) and Naming & Order.

Servers

Start here. The Servers (n) tab lists the inference servers TAO can talk to: "Pre-configured inference backends — enable the ones you're running and test connectivity."

ControlWhat it does
Enable switchTurns the server on or off
Health dotShows whether it answers
Name, type chip, model countIdentifies it
URLClick to edit, press Enter to save
Test"Healthy!" or "Unhealthy: (reason)"
Trash iconRemove "(name)"? and "This backend server will be removed from the LLM service."

Click Add custom to add one: Name (for example "My Server"), URL (for example http://ollama:11434) and an Auth header (password field, for example "Bearer …"). Add stays disabled until name and URL are filled. Message: "Server added." TAO works out the server type by itself and stores the auth header encrypted.

If the list is empty: "No servers found / Run database migrations to seed the pre-configured backends."

Model Catalog

Server typeModel formats it accepts
Ollama, llama.cpp, LM StudioGGUF
vLLMfull (safetensors), AWQ, GPTQ
TGIfull, AWQ
LocalAIGGUF, full, AWQ
Generic OpenAI-compatibleall of these (the model is pre-loaded)

Find a model

  • Pull from Ollama Registry (a collapsible panel linking to ollama.com/search): type a model name such as llama3.2:8b and click Pull.
  • Search HuggingFace Hub… searches the HuggingFace catalogue. Typing author/name works. Sort by Most downloaded, Most liked, Recently updated or Newest, and filter with the chips All, Text Gen, Embeddings, Vision-LM and Seq2Seq.
  • A line says which formats match your servers, for example "Showing GGUF · FULL … — matches your connected servers".
  • Each card shows the name, author, format, type, downloads and age, plus a status pill if it is already deployed. Load more shows the next 24. If it fails: "Could not reach HuggingFace".

Hub source and token

  • Hub source shows the address used (default https://huggingface.co). The gear icon (Change Hub URL) lets you point to a mirror; message "HuggingFace Hub URL updated".
  • HF token: "✓ set — gated models (Gemma, Llama…) enabled" or "not set — public models only". The gear icon (Set HF token) opens a password box (hf_...). Message: "HuggingFace token saved".

Deploy a model

  1. Click a model card

    A drawer opens on the right. If the model is already deployed, a green note says "Already deployed as …".

  2. Choose the server

    Under Deploy to a connected server, pick a healthy server. With none: "No healthy servers connected. Add one below, then come back to deploy."

  3. Pick a size (Ollama and GGUF models)

    Quantization lists each file as "tag — size", with "✓ recommended" on the common good choices (Q4_K_M and Q5_K_M). A Display name defaults to the repository name. A read-only box shows the pull reference.

  4. Set advanced options (optional)

    For Ollama only: context length (num_ctx), temperature, a local name and an editable Modelfile ("(edited)", Reset to auto). Setting any of these creates a customised model instead of a plain pull.

  5. Click Deploy

    Progress reads "Queued…", "Pulling…", "Downloading…", "Assembling…", "Verifying…", "Warming model…" and "Ready". Failures read "Failed: …", "Stalled — check server connection" or "Cancelled". On success: "Deployed! Go to Settings → APEX Model Keys to create per-user API keys." Click Done.

Special cases: a server that is not Ollama shows "Non-Ollama backend: model must already be loaded on the server. This registers it in APEX." Ollama with a non-GGUF model shows "Ollama only runs GGUF models." and Deploy is disabled.

The drawer also has Set up an inference server, with copy-and-paste setup commands for Ollama, vLLM, TGI, llama.cpp, LM Studio, LocalAI and the HF Inference API (tagged "GPU" or "CPU ok"). Each has + Register when it's running with Name, URL and Auth header (optional), then Connect.

Active models

Active (n) lists deployed models. A Currently loaded in memory panel shows what Ollama has loaded. Empty: "No deployed models / Browse the catalog and deploy a model to get started."

Each card shows the name, a status (ready, idle, pulling, starting, paused, stopped, error or pull failed), a fit badge (Fits, Tight, Exceeds limit, Exceeds RAM or Unknown), the server, the source, and chips for context size, parameters, quantisation and disk size.

ButtonWhenWhat it really does
Testready or idleOpens Live test chat: type a prompt ("Enter a test prompt…") and see OK or failure, speed and a sample. On a 404 it can suggest the server's real model name.
Configureready or idle (Ollama)Model Configuration: Context Length (num_ctx) (more RAM, "Qwen 9B needs ~7GB for 8k"), Temperature, Custom Modelfile. "Overwriting this will replace the entire manifest in Ollama." Apply Changes shows "Model reconfigured and restarted".
Syncmost statesReads the status from the server ("Status synced from backend")
Stopready or idleOllama: unloads the model. Other servers: only changes the status.
Pause and Resumeready, idle, pausedOnly change a status flag. Nothing is unloaded.
Play iconstopped"Starting". Ollama is warmed up; failures are only logged, and the status still becomes ready.
Retry Pullpulling or pull failedTries the download again
Add to Providers (or Re-sync to Catalog)ready or idleAdds the model to the admin AI Providers list so people can pick it in their settings
Keys & URLalwaysSee below
Trash iconalwaysDelete "(name)"? and "This hosted model will be removed and can no longer be served." Ollama also deletes the downloaded files.

Keys & URL

Shows two addresses, each with a copy button: an external one (http://(host):(gateway port)/llm/v1/(model id)) and an internal one (http://llm-gateway:8010/llm/v1/(model id)).

To let someone use the model, type a Label (for example "Alice, Team A, App key…") and click Generate Key, then Create. The key appears once: Key "(label)" — copy now, shown once. Only a fingerprint and the last four characters are stored. The API Keys (n) list has Revoke ("Key revoked"). Empty: "No keys yet — generate one to enable access." People then use the address as the base_url under Settings → AI Credentials → Private LLMs (see AI Model Keys).

Naming & Order

A table with Model ID, Type (Custom, Private or Platform), Display name, Sort order and Actions. The banner "Custom display names & ordering" explains: "Lower numbers appear first. Org-hosted custom models default to sort=50 (above external providers)." Leave Sort order as "auto" for default, then Save ("Saved override for (id)") or Reset ("Override cleared").

Known gaps