Skip to content

Commit ac91518

Browse files
committed
docs(server): explain how to queue streaming requests
1 parent 98c25a5 commit ac91518

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

‎docs/server.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,31 @@ python3 -m llama_cpp.server \
3131
--chat_template_kwargs '{"enable_thinking": true}'
3232
```
3333

34+
### Queue streaming requests
35+
36+
By default, an incoming request can interrupt an in-progress streaming completion.
37+
To let the active stream finish before the next request is processed, start the server with:
38+
39+
```bash
40+
python3 -m llama_cpp.server --model ./model.gguf --interrupt_requests false
41+
```
42+
43+
If you use a [configuration file](#configuration-and-multi-model-support), set `interrupt_requests` at the top level alongside `models`:
44+
45+
```json
46+
{
47+
"interrupt_requests": false,
48+
"models": [
49+
{
50+
"model": "./model.gguf"
51+
}
52+
]
53+
}
54+
```
55+
56+
The setting changes how requests wait for the model.
57+
Inference still runs one request at a time in the server process.
58+
3459
### Server options
3560

3661
For a full list of options, run:

0 commit comments

Comments
 (0)