How to run Domino IQ in Local mode

You want to add AI to a Domino database, but the data is confidential and should not be sent anywhere. Domino IQ has a mode for that: the model runs on the Domino server itself, and the text never leaves it.

Local mode is designed for servers with an NVIDIA GPU. If you only want to try it out, it runs on an ordinary CPU too, with a smaller model. That is how we set it up on Domino 14.5.0 FP1, and this is the path, step by step.

Local or Remote

In Remote mode, Domino IQ sends each request to an AI service at an address you configure. In Local mode, Domino IQ starts an AI engine on the Domino server, loads a model file into it, and talks to it on the same machine.

  • No provider and no API key. Nothing goes out over HTTPS, so the certificate problem we hit in Remote mode on 14.5.0 does not come up.

  • You run the engine. You install HCL’s engine package, choose a model, and keep both up to date.

  • You need the hardware. Enough memory for the model, and a GPU if people should not wait for the answers.

Everything below is Linux, CPU only, one server and one model. For the Remote route, see How to enable Domino IQ on your server.

Before you start

  • Domino IQ enabled for the server. The Directory Profile change and the restart are the same as for Remote mode. That restart also creates an llm_models folder in the data directory.

  • The Llama Server package from My HCLSoftware. This is the engine. Ours was LlamaServerforDominoIQ_061726_Linux.zip. Of its 1.31 GB, 1.26 GB are libraries for NVIDIA GPUs.

  • A model file in GGUF format. We used Phi-4-mini-instruct, quantized to Q4_K_M: a small model that a CPU can run, in a 2.5 GB file under the MIT license. Write down where it came from and its SHA-256.

  • Memory. With the settings below, the engine used about 6 GB. Our machine had a 6-core Intel desktop CPU and 8 GB of memory. For real use, HCL recommends an NVIDIA GPU with at least 8 GB of its own.

  • On Linux, the GNU OpenMP library, libgomp1 on Ubuntu. A minimal install may not have it.

Step 1: Install the engine

Stop the Domino server and unpack the package into the Domino program directory, as HCL’s installation page describes. Ours is /opt/hcl/domino/notes/latest/linux. Keep the files owned by root and executable, like the rest of that directory. With no GPU we left out the NVIDIA libraries (libcublas*, libcudart*, libggml-cuda.so), and the engine ran on the CPU.

Tip: llama-server --version printing a version does not prove the engine can run. Without libgomp1 it prints the version and then fails every model with no backends are loaded.

Step 2: Put the model in place

Copy the GGUF file into llm_models, owned by the user Domino runs as, and check its SHA-256 after copying. The Model document can also download the file for you. We did not try that.

Step 3: Add a Model document

Open dominoiq.nsf on the Domino IQ administration server, go to Models and create a Model document:

  • Model name: a short name you will pick in the next step. Ours: phi-4-mini.

  • Description: required.

  • File name: the file name in llm_models, exactly. Ours: Phi-4-mini-instruct-Q4_K_M.gguf.

  • Download model: Disabled, since the file is already there.

Do this first. In Local mode the Configuration document picks its model from a list of Model documents, and without one it refuses to save: A model must be selected before saving.

Tip: the Model document’s status will read Model not yet available, and it keeps saying so after the model is running. With download disabled, nothing updates it. The Configuration document is the one to check.

Step 4: Add the Configuration document

Go to Configurations and click Add Configuration. On the Basic tab:

  • AI endpoint mode: Local. The form starts there.

  • Domino server name: pick the server with the Servers button. Each Domino IQ server needs its own Configuration document.

  • Model: the Model document’s name. Ours: phi-4-mini.

  • Status: Enabled. The form starts on Disabled.

  • Port and Use TLS: leave them at 8080 and off. The engine listens only on 127.0.0.1, and Domino IQ starts it with a key of its own, so it answers Domino IQ and nothing else.

There is no API key field. In Local mode the server generates the key itself, gives it to the engine, and stores it in this document.

Step 5: Set the context size

This is the setting that decides whether anything longer than a few paragraphs works, and it is on the Advanced tab, in a field marked “do not change these unless you know what you are doing”.

The engine holds each request, the input and the answer together, in a context of a fixed number of tokens, and divides that context evenly between the requests it can serve at once.

  • Leave Special parameters empty, and the engine reserves room for the model’s full context, 131,072 tokens for Phi-4-mini. Ours asked for 16 GB and was killed.

  • Set only -c 8192, and the default Number of concurrent requests, 20, leaves each request 512 tokens. Short commands still work. A 550-word document does not: the application gets Invalid response from Domino IQ AI engine, and the console shows nothing.

The real reason is only in the engine log, IBM_TECHNICAL_SUPPORT/dominoiq_server.log:

request (811 tokens) exceeds the available context size (512 tokens), try increasing it

What worked for us: Number of concurrent requests 4 and Special parameters -c 16384. That is 4,096 tokens per request, enough for a long document and the answer. Concurrent requests times tokens per request gives the number after -c, and memory grows with it.

GPU offloading is enabled by default. Without a GPU it did no harm.

Step 6: Restart, then wait

Restart the server. Domino answers before the model is loaded, so wait for this line on the console before testing. Ours came up to 35 seconds after the rest of the server:

DominoIQTask: AI engine running, model loaded = Phi-4-mini-instruct-Q4_K_M.gguf

Domino IQ reads its configuration only at startup. Change a document, restart, wait for that line, then test.

Check that it works

  • show tasks lists DominoIQ : Running : Model - Phi-4-mini-instruct-Q4_K_M. In Remote mode there is no such row. In Local mode the task stays to look after the engine.

  • The Configuration document shows Model availability: Model copy succeeded; model is available.

  • A short test with StdSummarizeEmailThread, the summary command HCL ships, returns a summary of whatever text you give it. Applications do not change between modes: they call a command, not a model.

What it was like on a CPU

  • A short command, setting priorities on three todos: 14 to 16 seconds.

  • A summary of a 550-word contract discussion: 54 seconds. Amounts and dates were right. Two people were given another person’s surname.

  • A drafted response to the same text: 69 seconds. It wrote as one of the people in it and accepted the training cost Finance had advised against.

  • A one-sentence input: 20 seconds, and the summary was a paragraph of invented background.

The engine read about 35 tokens a second and wrote about 6.5. Writing is what you wait for.

All of that was one request at a time, with the prompt paraphrase off. With it on, as HCL recommends, each command makes two requests to the model.

Worth remembering: Local mode keeps the text on your server and hands you the engine. Set the context size yourself, wait for the model after every restart, and check every answer before you use it: a small model is wrong with the same confidence as it is right.

Got a question, or a problem this post does not cover? Leave a comment below.

Sources