Inference CLI reference#
areno serve
Start an OpenAI-compatible HTTP server backed by the native AReno runtime.
The server exposes /v1/chat/completions, accepts standard chat-completion
tools fields, and keeps one rollout session open for the process lifetime
so rollout and scheduler state can be reused across requests. Linux selects
CUDA; Apple Silicon selects MLX.
areno serve \
--model-path /path/to/hf/checkpoint \
--tp-size 1 \
--world-size 1 \
--host 0.0.0.0 \
--port 8000
areno serve#
Serve chat completions.
Options:
--model-path TEXTLocal checkpoint/tokenizer path or remote model repo ID. Required.
--model-hub [hf|modelscope]Remote hub used when
--model-pathis not a local path. Use--model-hub hffor Hugging Face and--model-hub modelscopefor ModelScope. Default:modelscope.--tp-size INTEGERTensor parallel size. Default:
1. MLX requires1.--world-size INTEGERTotal number of local worker ranks. Default:
1. MLX requires1.--host TEXTHTTP bind host. Default:
0.0.0.0.--port INTEGERHTTP bind port. Default:
8000.--max-running-prompts INTEGERMaximum concurrent rollout prompts per request chunk. Default:
16.--default-max-tokens INTEGERDefault max generated tokens when requests omit a token budget. Default:
1024.--decode-progress-interval-s FLOATWorker decode progress log interval. Default:
0.0.--eager-decodeDisable decode CUDA graph and run rollout decode eagerly. CUDA only; MLX does not use this setting.
--attn-backend [flash|native]Attention backend. Default:
flash. Usenativeto run withoutflash-attnon the areno_accel native compatibility path. AReno automatically falls back tonativeon flash-attn-unsupported GPUs such as Tesla T4 and prints a warning.nativeis slower thanflashon supported GPUs. This setting is CUDA only; MLX uses the attention implementation supplied by the loaded MLX model.--disable-thinkingPass
enable_thinking=Falseto tokenizer chat templates when supported. Use this when serving a model whose chat template supports a thinking-mode switch and you want normal responses without reasoning spans. Tokenizers that do not acceptenable_thinkingautomatically fall back to their normal chat-template call.
world-size must be divisible by tp-size.
Examples#
Single-rank server#
areno serve \
--model-path /path/to/model \
--tp-size 1 \
--world-size 1 \
--port 8000
TP4 server#
areno serve \
--model-path /path/to/model \
--tp-size 4 \
--world-size 4 \
--port 8000
Chat completion request#
curl http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "areno",
"messages": [
{"role": "user", "content": "Solve 12 * 13."}
],
"max_tokens": 128,
"temperature": 0.0
}'
Request fields#
POST /v1/chat/completions
Field |
Type |
Description |
|---|---|---|
|
|
Optional model name echoed by the client. |
|
|
Required chat messages. |
|
|
Generated token budget. |
|
|
Alternative generated token budget. |
|
|
Sampling temperature. Defaults to |
|
|
Nucleus sampling threshold. |
|
|
Top-k sampling threshold. Defaults to |
|
|
Number of completions per prompt. |
|
|
Streaming flag. |
|
|
Stop string or list of stop strings. |
|
|
Deterministic sampling seed when sampling is enabled. |
|
|
OpenAI-compatible function tools. The same model-native tool-call
parser used by agentic rollout converts generated tool-call text into
|
|
|
Optional tool-choice directive, including a forced function name. |
ChatMessage fields:
roleUsually
system,user,assistant, ortool.contentMessage content as
str | list | None.
Multimodal content#
For a checkpoint with a compatible processor, content may be a list of
text, image, audio, and video parts. AReno accepts OpenAI-style *_url
parts and forwards normalized media references to the checkpoint processor:
{
"role": "user",
"content": [
{"type": "video_url", "video_url": {"url": "/data/clip.mp4"}},
{"type": "audio_url", "audio_url": {"url": "/data/clip.wav"}},
{"type": "text", "text": "Describe the synchronized event."}
]
}
Supported part types are image_url, audio_url, video_url, and
input_audio. The direct processor forms image, audio, and
video are also accepted. input_audio contains base64 data and a format
such as wav or mp3. Local paths are resolved on the server, not on the
client, so the media files must be visible to the serving process. Data URLs
can be used when the client and server do not share a filesystem.
Media support depends on the loaded model processor. See Multimodal inputs for serving and training guidance.
Continuous batching behavior#
The server runs inside a long-lived rollout session. Compatible requests can be admitted into an active worker decode loop through continuous batching; requests with different generation settings are scheduled separately. Requests are compatible when these fields match:
generated token budget
temperature
top-p
top-k
seed
stop token ids
EOS token id
Requests with different generation settings are scheduled separately.
On MLX, the long-lived scheduler is in process and uses one model on unified memory. Continuous batching is not established merely by sending concurrent HTTP requests: a black-box test should submit short probes while earlier long requests are active and verify that a probe completes before the earlier group has drained.
Decode progress logs#
Set --decode-progress-interval-s to a positive value to print worker decode
progress:
rollout decode progress: dp=0/4 active=32 cuda_graph=True tokens_per_second=2810.7
tokens_per_second is the scheduled decode throughput for that DP worker in
the reporting window. It excludes prefill and is not the same as end-to-end
request throughput. cuda_graph=True means the worker used CUDA graph replay
for at least one decode step in that window; False means the window ran
eagerly.
The cuda_graph field and DP-worker interpretation apply to CUDA logs. MLX
does not report CUDA graph state.
Tool calls#
areno serve supports the Chat Completions tool-call shape and reuses the
same tool-call parser as agentic rollout:
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="unused")
response = client.chat.completions.create(
model="areno",
messages=[{"role": "user", "content": "Choose a move: left or right."}],
tools=[
{
"type": "function",
"function": {
"name": "choose_move",
"parameters": {
"type": "object",
"properties": {
"direction": {"type": "string", "enum": ["left", "right"]},
},
"required": ["direction"],
},
},
}
],
tool_choice={"type": "function", "function": {"name": "choose_move"}},
)
print(response.choices[0].message.tool_calls)
Tool-call parsing is selected from the model/tokenizer family. Current parsers
cover Qwen/Qwen3.5/MiniCPM-style <tool_call> blocks, Gemma4 tool-call
blocks, and generic JSON tool-call output.
Help#
areno serve --help