Quickstart¶
This page installs qix, starts it on one GPU, sends one chat request and one completion request, and shows how to read the lines the launcher prints at start.
0. Install¶
There are two ways. Both give you the qix-serve command this page uses.
Install the wheel with uv (recommended) or pip. No C++ compiler is needed, but the serving
machine must have a CUDA toolkit with nvcc: FlashInfer may compile an attention kernel at warm-up:
uv venv --python 3.12 && source .venv/bin/activate
uv pip install iturai-qix --find-links ./wheels/
./wheels/ is a folder that holds the qix wheel files; the installer picks the one for your
Python, so you type no version. The wheel is not on PyPI yet: once it is, the line is
uv pip install iturai-qix alone. installation.md lists what
the machine needs and how to fill that folder.
Or build from source, for development: build-from-source.md. A build
does not put qix-serve on your PATH. Either install it (cmake --install build), or run it
from the build tree: every qix-serve below is then PYTHONPATH=$PWD/build ./build/tnd-serve.
The example model is Qwen/Qwen2.5-7B-Instruct. Any model on
supported-models.md works the same way.
1. See the plan without starting anything¶
qix-serve --dry-run --model Qwen/Qwen2.5-7B-Instruct
--dry-run probes the GPUs, reads the checkpoint's config.json, picks a serving profile and
prints the commands it would run. It loads no weights and opens no port. Exit code 0 means the
plan resolved; 2 means it was refused (the reason is in the log).
2. Start the server¶
qix-serve --model Qwen/Qwen2.5-7B-Instruct
--modeltakes a Hugging Face repository id or a local directory.- The server listens on
127.0.0.1:8000by default. Pass--host 0.0.0.0to listen on every interface, and--portto change the port. Read trusted-network.md before you open the port to a network: qix has no authentication of its own. - You pass no other flag.
qix-serveand the rank derive the layout, batch size, KV-cache size and kernel choices themselves (configuration.md).
The server is ready when the rank logs:
TND server listening on http://127.0.0.1:8000 (model=Qwen/Qwen2.5-7B-Instruct) -- start-up <N> s from process start to ready
GET /health answers {"status":"ok","model":"..."} from then on.
3. Send a chat request¶
curl -s http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "Qwen/Qwen2.5-7B-Instruct",
"messages": [{"role": "user", "content": "Name three prime numbers."}],
"max_tokens": 64
}'
The reply has the OpenAI shape: choices[0].message.content holds the text, and usage holds
prompt_tokens, completion_tokens and total_tokens.
Add "stream": true to receive server-sent events instead. The stream ends with
data: [DONE].
4. Send a completion request¶
curl -s http://127.0.0.1:8000/v1/completions \
-H 'Content-Type: application/json' \
-d '{"model": "Qwen/Qwen2.5-7B-Instruct", "prompt": "The capital of France is", "max_tokens": 16}'
/v1/completions sends the prompt as text, with no chat template. The reply carries
choices[0].text.
Every route and every request field is on openai-server.md.
5. Read the start-up log¶
qix-serve prints its decisions on stderr, one line each, prefixed [tnd-serve] auto-config:.
The lines come from csrc/serve_auto/tnd_serve_main.cpp:390-398. Their shape is:
[tnd-serve] auto-config: model <model> -> profile <profile> (config.json: <where it was read>; <n> profile(s) in <dir>)
[tnd-serve] auto-config: node <count>x <GPU name> (sm_<cc>, <memory> GiB, ...)
[tnd-serve] auto-config: layout = <layout> -- <reason>
| Line | What it tells you |
|---|---|
profile |
Which serving profile matched the checkpoint. default means none matched: the model runs as one process. |
node |
What the probe found: the GPU count, the first GPU's name, compute capability and memory, and the host memory, driver and CUDA version when known. |
layout |
How the GPUs are used, and the rule's reason. single GPU is one process; <n> replicas, one per GPU, behind tnd-node-router is one copy per GPU; <g> EP group(s) of <n> ranks is expert parallelism. |
refused -- |
The profile has no working layout for this node. qix-serve exits with code 2 and starts nothing. |
override |
A flag you passed replaced a value the profile would have set. The line names both values. |
Every reason is copied from the profile's rule. A rule with no measurement behind it says
unmeasured in its reason.
After qix-serve hands over to the rank, the rank logs its own auto-config: lines (for example
the batch cap max_num_seqs and the prompt-token budget per step), each with its reason.
6. Stop the server¶
Send SIGTERM to the qix-serve process. On one GPU that process is the rank itself: qix-serve replaces itself with the rank (exec). What the server does with requests still in flight is on
operations.md.