Tutorial: chat with a local model from the terminal
By the end of this tutorial, you will have the server running in one terminal and rzb tui in another, you will have chatted with a model on your Mac's GPU, and you will have watched the server load it and answer on the Dashboard.
No knowledge of the HTTP API is required.
Prerequisites
- A Mac with Apple Silicon and macOS 14 or later.
rzbinstalled withscripts/install.sh, as described in How to build rzb on the Mac, so thatrzbruns from any folder.- Two terminal windows, about 400 MB of free disk space, and an internet connection for the download.
Step 1 — Download a small model and describe the server
In the first terminal, type:
rzb models pull mlx-community/Qwen3-0.6B-4bit
mkdir -p ~/rzb-tutorial && cd ~/rzb-tutorial
cat > server.yaml <<'YAML'
models:
- id: qwen
source: mlx-community/Qwen3-0.6B-4bit
YAML
The download shows its progress and ends with a line saying the model is downloaded. We now have a model in the cache, and a configuration file that gives it the short name qwen.
Step 2 — Open rzb tui before the server
Still in the first terminal, type:
rzb tui --config server.yaml
The terminal turns into a full screen. You should see:
No razorbill server answers at http://127.0.0.1:7920.
Start one in another terminal:
rzb serve --config server.yaml
and, on the last row, ○ no server at http://127.0.0.1:7920. rzb tui is only a window on a server: we start the server next.
Step 3 — Start the server
In the second terminal, type:
cd ~/rzb-tutorial
rzb serve --config server.yaml
Look at the first terminal: within a second the screen changes to the Dashboard, with a line starting with Server rzb, the engine's memory, and none loaded under Models. The last row now starts with ●. We have the server and its window side by side.
Step 4 — Send a message
In the first terminal, press F1. The Chat screen says Model: qwen. Type:
Say hi in five words.
and press Enter. The first answer takes a few seconds while the server loads the model: you see ⋯ waiting for the model…. Then Qwen3 thinks before answering: a line ⋯ thinking (… words) · Ctrl-R to show appears, then the answer, under the model's name qwen, then a dim line such as 23+41 tokens · 85.3 tok/s. The exact words and numbers differ on your Mac.
We have chatted with a model on the GPU, through the server's OpenAI API.
Step 5 — Look at the reasoning
Press Ctrl-R twice. The first press hides the reasoning line; the second shows the reasoning in full, in dim lines starting with ⋯. Send a second message: the conversation is sent again whole. When the server could reuse what it had already read, the line under the answer also shows … cached.
Step 6 — Watch the server
Press F2. Under Models, qwen is loaded, with its size and the time before the server unloads it if nobody uses it. Under Last requests, your two POST /v1/chat/completions are listed with their tokens, speed and duration.
Step 7 — Leave
Press Ctrl-Q: the terminal comes back as it was. In the second terminal, press Ctrl-C to stop the server.
What now?
You have run the server and its terminal interface, chatted with a model and watched it work. To go further:
- To download or remove models from
rzb tui: manage models from rzb tui. - To change the server's configuration while it runs: change the server's configuration from rzb tui.
- Every screen and key: rzb tui reference.
- Why it is a separate program: the terminal interface.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|