Skip to content

Commit e2f079e

Browse files
committed
docs: add server model configs
1 parent 10219a1 commit e2f079e

6 files changed

Lines changed: 150 additions & 10 deletions

File tree

‎examples/server/README.md‎

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ The server is a [`uv` inline script](https://docs.astral.sh/uv/guides/scripts/),
99

1010
```bash
1111
cd examples/server
12-
uv run --script server.py -C config.json
12+
uv run --script server.py -C configs/qwen3.5-0.8b.json
1313
```
1414

15-
Use `uv run --index` to pull a pre-built `llama-cpp-python` binary wheel instead of building from source.
15+
Use `uv run --extra-index-url` to pull a pre-built `llama-cpp-python` binary wheel instead of building from source.
1616

1717
```bash
1818
cd examples/server
1919
uv run \
20-
--index https://abetlen.github.io/llama-cpp-python/whl/cpu \
21-
--script server.py -C config.json
20+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
21+
--script server.py -C configs/qwen3.5-0.8b.json
2222
```
2323

2424
Pick the wheel index that matches the backend you want.
@@ -40,6 +40,20 @@ Pick the wheel index that matches the backend you want.
4040

4141
See the repository installation section for the full [pre-built wheel requirements](../../README.md#supported-backends).
4242

43+
## Model Configs
44+
45+
The smallest checked-in example uses Qwen3.5 0.8B so the server can be started on a normal development machine.
46+
47+
| Config | Model | Notes |
48+
| --- | --- | --- |
49+
| [`configs/qwen3.5-0.8b.json`](configs/qwen3.5-0.8b.json) | [`lmstudio-community/Qwen3.5-0.8B-GGUF`](https://huggingface.co/lmstudio-community/Qwen3.5-0.8B-GGUF) | Default small multimodal example. |
50+
| [`configs/gemma-4-12b-it-qat.json`](configs/gemma-4-12b-it-qat.json) | [`unsloth/gemma-4-12B-it-qat-GGUF`](https://huggingface.co/unsloth/gemma-4-12B-it-qat-GGUF) | Larger Gemma 4 QAT multimodal config with projector. |
51+
| [`configs/qwen3.6-27b.json`](configs/qwen3.6-27b.json) | [`unsloth/Qwen3.6-27B-GGUF`](https://huggingface.co/unsloth/Qwen3.6-27B-GGUF) | Larger Qwen3.6 multimodal config. |
52+
| [`configs/qwen3.6-35b-a3b.json`](configs/qwen3.6-35b-a3b.json) | [`unsloth/Qwen3.6-35B-A3B-GGUF`](https://huggingface.co/unsloth/Qwen3.6-35B-A3B-GGUF) | Larger Qwen3.6 MoE multimodal config. |
53+
| [`configs/gpt-oss-120b.json`](configs/gpt-oss-120b.json) | [`ggml-org/gpt-oss-120b-GGUF`](https://huggingface.co/ggml-org/gpt-oss-120b-GGUF) | Large text-only split-GGUF config. |
54+
55+
The larger model configs default to `n_gpu_layers: -1` and `flash_attn: true`.
56+
4357
## Client Examples
4458

4559
Point an OpenAI-compatible client at the local `/v1` base URL.
@@ -52,7 +66,7 @@ from openai import OpenAI
5266
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="not-used")
5367

5468
response = client.chat.completions.create(
55-
model="gpt-4o-mini",
69+
model="qwen3.5-0.8b-vl",
5670
messages=[{"role": "user", "content": "What is the capital of France?"}],
5771
)
5872
print(response.choices[0].message.content)
@@ -66,7 +80,7 @@ from openai import OpenAI
6680
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="not-used")
6781

6882
response = client.responses.create(
69-
model="gpt-4o-mini",
83+
model="qwen3.5-0.8b-vl",
7084
input="Write one sentence about why prefix caching helps batched inference.",
7185
)
7286
print(response.output_text)
@@ -86,7 +100,7 @@ print(response.output_text)
86100

87101
## Config Overview
88102

89-
`config.json` has three top-level sections.
103+
Config files have three top-level sections.
90104

91105
```json
92106
{
@@ -127,7 +141,7 @@ Load a local GGUF with `path` or download a GGUF from Hugging Face with `from_pr
127141
```json
128142
{
129143
"model": {
130-
"alias": "gpt-4o-mini",
144+
"alias": "qwen3.5-0.8b-vl",
131145
"from_pretrained": {
132146
"repo_id": "lmstudio-community/Qwen3.5-0.8B-GGUF",
133147
"filename": "Qwen3.5-0.8B-Q8_0.gguf"
@@ -222,7 +236,7 @@ Use an array of strings when the template is too large to read or edit as one JS
222236
}
223237
```
224238

225-
The checked-in `config.json` includes a Qwen3.5 template with reasoning text, tool calls, forced tool choice, image markers, and video markers.
239+
The checked-in [`configs/qwen3.5-0.8b.json`](configs/qwen3.5-0.8b.json) includes a Qwen3.5 template with reasoning text, tool calls, forced tool choice, image markers, and video markers.
226240

227241
## Response Parsing
228242

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"server": {
3+
"host": "0.0.0.0",
4+
"port": 8000
5+
},
6+
"model": {
7+
"alias": "gemma-4-12b-it-qat",
8+
"from_pretrained": {
9+
"repo_id": "unsloth/gemma-4-12B-it-qat-GGUF",
10+
"filename": "gemma-4-12B-it-qat-UD-Q4_K_XL.gguf"
11+
},
12+
"mtmd": {
13+
"mmproj_from_pretrained": {
14+
"repo_id": "unsloth/gemma-4-12B-it-qat-GGUF",
15+
"filename": "mmproj-BF16.gguf"
16+
}
17+
},
18+
"n_ctx": 32768,
19+
"max_output_tokens": 4096,
20+
"n_seq_max": 8,
21+
"n_batch": 512,
22+
"n_ubatch": 512,
23+
"threads": 8,
24+
"threads_batch": 8,
25+
"kv_unified": true,
26+
"store_logits": false,
27+
"use_mmap": true,
28+
"use_mlock": false,
29+
"n_gpu_layers": -1,
30+
"flash_attn": true
31+
}
32+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"server": {
3+
"host": "0.0.0.0",
4+
"port": 8000
5+
},
6+
"model": {
7+
"alias": "gpt-oss-120b",
8+
"from_pretrained": {
9+
"repo_id": "ggml-org/gpt-oss-120b-GGUF",
10+
"filename": "gpt-oss-120b-mxfp4-00001-of-00003.gguf",
11+
"additional_files": [
12+
"gpt-oss-120b-mxfp4-00002-of-00003.gguf",
13+
"gpt-oss-120b-mxfp4-00003-of-00003.gguf"
14+
]
15+
},
16+
"n_ctx": 32768,
17+
"max_output_tokens": 4096,
18+
"n_seq_max": 4,
19+
"n_batch": 512,
20+
"n_ubatch": 512,
21+
"threads": 8,
22+
"threads_batch": 8,
23+
"kv_unified": true,
24+
"store_logits": false,
25+
"use_mmap": true,
26+
"use_mlock": false,
27+
"n_gpu_layers": -1,
28+
"flash_attn": true
29+
}
30+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"port": 8000
55
},
66
"model": {
7-
"alias": "gpt-4o-mini",
7+
"alias": "qwen3.5-0.8b-vl",
88
"from_pretrained": {
99
"repo_id": "lmstudio-community/Qwen3.5-0.8B-GGUF",
1010
"filename": "Qwen3.5-0.8B-Q8_0.gguf"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"server": {
3+
"host": "0.0.0.0",
4+
"port": 8000
5+
},
6+
"model": {
7+
"alias": "qwen3.6-27b",
8+
"from_pretrained": {
9+
"repo_id": "unsloth/Qwen3.6-27B-GGUF",
10+
"filename": "Qwen3.6-27B-Q8_0.gguf"
11+
},
12+
"mtmd": {
13+
"mmproj_from_pretrained": {
14+
"repo_id": "unsloth/Qwen3.6-27B-GGUF",
15+
"filename": "mmproj-BF16.gguf"
16+
}
17+
},
18+
"n_ctx": 32768,
19+
"max_output_tokens": 4096,
20+
"n_seq_max": 8,
21+
"n_batch": 512,
22+
"n_ubatch": 512,
23+
"threads": 8,
24+
"threads_batch": 8,
25+
"kv_unified": true,
26+
"store_logits": false,
27+
"use_mmap": true,
28+
"use_mlock": false,
29+
"n_gpu_layers": -1,
30+
"flash_attn": true
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"server": {
3+
"host": "0.0.0.0",
4+
"port": 8000
5+
},
6+
"model": {
7+
"alias": "qwen3.6-35b-a3b",
8+
"from_pretrained": {
9+
"repo_id": "unsloth/Qwen3.6-35B-A3B-GGUF",
10+
"filename": "Qwen3.6-35B-A3B-Q8_0.gguf"
11+
},
12+
"mtmd": {
13+
"mmproj_from_pretrained": {
14+
"repo_id": "unsloth/Qwen3.6-35B-A3B-GGUF",
15+
"filename": "mmproj-BF16.gguf"
16+
}
17+
},
18+
"n_ctx": 32768,
19+
"max_output_tokens": 4096,
20+
"n_seq_max": 8,
21+
"n_batch": 512,
22+
"n_ubatch": 512,
23+
"threads": 8,
24+
"threads_batch": 8,
25+
"kv_unified": true,
26+
"store_logits": false,
27+
"use_mmap": true,
28+
"use_mlock": false,
29+
"n_gpu_layers": -1,
30+
"flash_attn": true
31+
}
32+
}

0 commit comments

Comments
 (0)