xinfer-ai 0.13.1 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -9
- package/docs/docker.md +2 -2
- package/docs/get_started.md +14 -6
- package/docs/performance.md +1 -1
- package/package.json +2 -2
- package/scripts/install.js +4 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ xinfer --m Qwen/Qwen3.6-27B-FP8 --kvcache-dtype turbo4 --ui-server
|
|
|
46
46
|
|
|
47
47
|
**Using local model path:**
|
|
48
48
|
```bash
|
|
49
|
-
xinfer --
|
|
49
|
+
xinfer --m /home/Qwen3.6-35B-A3B --d 0,1 --ui-server
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
**Python usage:**
|
|
@@ -226,7 +226,7 @@ xinfer --m Qwen/Qwen3.6-35B-A3B --isq q4k --kvcache-dtype fp8
|
|
|
226
226
|
xinfer --m Qwen/Qwen3.6-35B-A3B --isq q4k --kvcache-dtype turbo4
|
|
227
227
|
|
|
228
228
|
# Metal ISQ
|
|
229
|
-
xinfer --
|
|
229
|
+
xinfer --m /path/Qwen3-4B --isq q6k
|
|
230
230
|
```
|
|
231
231
|
|
|
232
232
|
</details>
|
|
@@ -239,7 +239,7 @@ xinfer --w /path/Qwen3-4B --isq q6k
|
|
|
239
239
|
xinfer --m unsloth/Qwen3.5-27B-GGUF --f Qwen3.5-27B-Q4_K_M.gguf
|
|
240
240
|
|
|
241
241
|
# Multi-GPU — GGUF
|
|
242
|
-
xinfer --d 0,1 --
|
|
242
|
+
xinfer --d 0,1 --m /path/Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf
|
|
243
243
|
```
|
|
244
244
|
|
|
245
245
|
</details>
|
|
@@ -354,7 +354,7 @@ Split prefill (prompt processing) and decode (token generation) across GPUs or m
|
|
|
354
354
|
xinfer --d 0,1 --m Qwen/Qwen3-30B-A3B-Instruct-2507 --pd-server
|
|
355
355
|
|
|
356
356
|
# PD Client (decode GPU + API)
|
|
357
|
-
xinfer --d 2,3 --
|
|
357
|
+
xinfer --d 2,3 --m /path/Qwen3-30B-A3B-Instruct-2507 --isq q4k --ui-server --port 8000 --pd-client
|
|
358
358
|
```
|
|
359
359
|
|
|
360
360
|
**Multinode** (tcp mode)
|
|
@@ -363,7 +363,7 @@ xinfer --d 2,3 --w /path/Qwen3-30B-A3B-Instruct-2507 --isq q4k --ui-server --por
|
|
|
363
363
|
target/release/xinfer --d 0,1 --m Qwen/... --pd-server --pd-url tcp://0.0.0.0:8100
|
|
364
364
|
|
|
365
365
|
# Client machine
|
|
366
|
-
target/release/xinfer --d 0,1 --
|
|
366
|
+
target/release/xinfer --d 0,1 --m /path/... --pd-client --pd-url tcp://192.168.1.100:8100 --ui-server --port 8000
|
|
367
367
|
```
|
|
368
368
|
|
|
369
369
|
> Metal/macOS requires `--pd-url` (no LocalIPC support).
|
|
@@ -380,7 +380,7 @@ target/release/xinfer --d 0,1 --m Qwen/... --pd-server --pd-url file:///sockets
|
|
|
380
380
|
|
|
381
381
|
# Client container
|
|
382
382
|
docker run --gpus '"device=2,3"' -v /tmp/pd-sockets:/sockets ...
|
|
383
|
-
target/release/xinfer --d 0,1 --
|
|
383
|
+
target/release/xinfer --d 0,1 --m /path/... --pd-client --pd-url file:///sockets --ui-server --port 8000
|
|
384
384
|
```
|
|
385
385
|
|
|
386
386
|
</details>
|
|
@@ -432,9 +432,9 @@ Constraint-based generation via llguidance — Lark grammars, regex, JSON Schema
|
|
|
432
432
|
|
|
433
433
|
| Flag | Description |
|
|
434
434
|
|---|---|
|
|
435
|
-
| `--m` | HuggingFace model ID
|
|
436
|
-
| `--w` |
|
|
437
|
-
| `--f` | GGUF file
|
|
435
|
+
| `--m` | Model source: HuggingFace model ID, local Safetensors directory, or local GGUF file |
|
|
436
|
+
| `--w` | Legacy alias for local Safetensors directory; prefer `--m <local_dir>` |
|
|
437
|
+
| `--f` | Local GGUF file when used alone; remote GGUF filename when paired with `--m <model_id>` |
|
|
438
438
|
| `--d` | Device IDs (e.g. `--d 0,1`) |
|
|
439
439
|
| `--ui-server` | API server + built-in ChatGPT-style web UI |
|
|
440
440
|
| `--server` | API server only (no web UI) |
|
|
@@ -460,6 +460,17 @@ Constraint-based generation via llguidance — Lark grammars, regex, JSON Schema
|
|
|
460
460
|
| `--mcp-config` | MCP servers JSON config |
|
|
461
461
|
| `--mcp-command` / `--mcp-args` | Single MCP server command + args |
|
|
462
462
|
|
|
463
|
+
### Environment Variables
|
|
464
|
+
|
|
465
|
+
| Variable | Description |
|
|
466
|
+
|---|---|
|
|
467
|
+
| `XINFER_NVFP4_FORCE_LUT=1` | Force software NVFP4 decode to use the LUT-based dequantization path (higher precision) instead of hardware FP4 intrinsics on Blackwell (SM100+). Useful when decode precision matters more than peak throughput. |
|
|
468
|
+
|
|
469
|
+
**Example (Blackwell with high-precision NVFP4 decode):**
|
|
470
|
+
```bash
|
|
471
|
+
XINFER_NVFP4_FORCE_LUT=1 xinfer --m nvidia/Qwen3-30B-A3B-FP4 --ui-server
|
|
472
|
+
```
|
|
473
|
+
|
|
463
474
|
---
|
|
464
475
|
|
|
465
476
|
## 📽️ Demo
|
package/docs/docker.md
CHANGED
|
@@ -67,7 +67,7 @@ docker run --rm -it --gpus all --network host -v /home:/home -v /data:/data xinf
|
|
|
67
67
|
```
|
|
68
68
|
Start the UI + API server
|
|
69
69
|
```bash
|
|
70
|
-
xinfer --
|
|
70
|
+
xinfer --m /home/path/Qwen3-Coder-30B-A3B-Instruct-FP8 --ui-server
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
**Note:** if `Ctrl+C` not working in docker, you need `Ctrl+P` then `Ctrl+Q` to stop the server.
|
|
73
|
+
**Note:** if `Ctrl+C` not working in docker, you need `Ctrl+P` then `Ctrl+Q` to stop the server.
|
package/docs/get_started.md
CHANGED
|
@@ -20,9 +20,9 @@ cargo build --release --features metal
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Model formats
|
|
23
|
-
- **Safetensors (HF layout)**: `--m <hf_id>` for cached download, or `--
|
|
23
|
+
- **Safetensors (HF layout)**: `--m <hf_id>` for cached download, or `--m <local_dir>` for offline weights + configs. `--w <local_dir>` still works as a legacy alias.
|
|
24
24
|
- **Safetensors (HF layout) + ISQ**: in-situ quantize into GGUF with args `--isq <q4k|q2k|q6k|...>`.
|
|
25
|
-
- **GGUF**: `--f <
|
|
25
|
+
- **GGUF**: `--m <local.gguf>` or `--f <local.gguf>` for a local file. Use `--m <hf_id> --f <remote_file.gguf>` for a GGUF file hosted in a Hugging Face repo.
|
|
26
26
|
- **Vision-Language** (Qwen3-VL, Gemma3, Mistral3-VL): require image tokens; use `--ui-server` for uploads or send image_url/base64 in the request.
|
|
27
27
|
|
|
28
28
|
|
|
@@ -38,7 +38,12 @@ cargo build --release --features metal
|
|
|
38
38
|
```
|
|
39
39
|
- **GGUF quantized**
|
|
40
40
|
```bash
|
|
41
|
-
target/release/xinfer --
|
|
41
|
+
target/release/xinfer --m /path/model-Q4_K_M.gguf --max-model-len 65536
|
|
42
|
+
```
|
|
43
|
+
- **Remote GGUF quantized**
|
|
44
|
+
```bash
|
|
45
|
+
target/release/xinfer --m unsloth/Qwen3-0.6B-GGUF --f Qwen3-0.6B-Q4_K_M.gguf --ui-server
|
|
46
|
+
```
|
|
42
47
|
- **Embeddings** (same server; OpenAI `/v1/embeddings`)
|
|
43
48
|
```bash
|
|
44
49
|
target/release/xinfer --m Qwen/Qwen2.5-7B-Instruct # curl -d '{"input":"hello","embedding_type":"mean"}' http://localhost:8000/v1/embeddings
|
|
@@ -46,7 +51,8 @@ cargo build --release --features metal
|
|
|
46
51
|
- **Multimodal**
|
|
47
52
|
```bash
|
|
48
53
|
# Update image in the Chat UI
|
|
49
|
-
target/release/xinfer --m Qwen/Qwen3-VL-8B-Instruct --ui-server
|
|
54
|
+
target/release/xinfer --m Qwen/Qwen3-VL-8B-Instruct --ui-server
|
|
55
|
+
```
|
|
50
56
|
|
|
51
57
|
Common runtime knobs: `--max-model-len`, `--max-num-seqs`, `--kv-fraction` (CUDA KV share), `--cpu-mem-fold` (CPU swap ratio), `--port`, `--kvcache-dtype` (fp8/turbo8/turbo4/turbo3), `--prefix-cache`, `--prefix-cache-max-tokens`, `--ui-server`, `--batch` (perf test).
|
|
52
58
|
|
|
@@ -63,11 +69,13 @@ Reasoning defaults to enabled when a request omits `thinking` / `enable_thinking
|
|
|
63
69
|
- **PD server (prefill host, usually memory-rich)**
|
|
64
70
|
```bash
|
|
65
71
|
target/release/xinfer --pd-server --port 8000 \
|
|
66
|
-
--m Qwen/Qwen3-30B-A3B-Instruct-2507
|
|
72
|
+
--m Qwen/Qwen3-30B-A3B-Instruct-2507
|
|
73
|
+
```
|
|
67
74
|
- **PD client (decode host)**
|
|
68
75
|
```bash
|
|
69
76
|
target/release/xinfer --server --pd-client --pd-url 0.0.0.0:8000 \
|
|
70
|
-
--m Qwen/Qwen3-30B-A3B-Instruct-2507
|
|
77
|
+
--m Qwen/Qwen3-30B-A3B-Instruct-2507
|
|
78
|
+
```
|
|
71
79
|
- Same weights/config on both ends; Local IPC used automatically on same node CUDA, TCP when `--pd-url` is set. Monitor logs for transfer and swap events.
|
|
72
80
|
|
|
73
81
|
## Prefix cache
|
package/docs/performance.md
CHANGED
|
@@ -50,7 +50,7 @@ xinfer --m AxionML/Qwen3.5-4B-NVFP4 --kvcache-dtype turbo4 --ui-server
|
|
|
50
50
|
|
|
51
51
|
## 📊 Performance Notes
|
|
52
52
|
|
|
53
|
-
- **HW NVFP4**: Hardware-accelerated FP4 on Blackwell (
|
|
53
|
+
- **HW NVFP4**: Hardware-accelerated FP4 on Blackwell: SM100 (B100/B200), SM120 (RTX 5090/RTX PRO 6000), and SM121 (DGX Spark)
|
|
54
54
|
- **HW FP8**: Hardware-accelerated FP8 on Hopper (SM90, H800/H200)
|
|
55
55
|
- **SW FP4/NVFP4**: Software-emulated FP4 on Hopper (SM90) and V100 (SM70)
|
|
56
56
|
- V100 + NVFP4 + TurboQuant is a first-ever combination — no other engine has achieved this
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xinfer-ai",
|
|
3
|
-
"version": "0.13.
|
|
4
|
-
"assetVersion": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
|
+
"assetVersion": "0.13.3",
|
|
5
5
|
"description": "xInfer — a high-performance LLM inference engine in Rust with CUDA/Metal acceleration",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/guoqingbao/xinfer#readme",
|
package/scripts/install.js
CHANGED
|
@@ -75,11 +75,14 @@ function detectCudaComputeCap() {
|
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Map detected SM version to the build variant name.
|
|
78
|
-
* Build variants match CI matrix: sm70, sm75, sm80, sm89, sm90,
|
|
78
|
+
* Build variants match CI matrix: sm70, sm75, sm80, sm89, sm90, sm100,
|
|
79
|
+
* sm120, and sm121 (GB10/DGX Spark).
|
|
79
80
|
*/
|
|
80
81
|
function smToVariant(sm) {
|
|
81
82
|
const n = parseInt(sm, 10);
|
|
83
|
+
if (n >= 121) return "sm121";
|
|
82
84
|
if (n >= 120) return "sm120";
|
|
85
|
+
if (n >= 100) return "sm100";
|
|
83
86
|
if (n >= 90) return "sm90";
|
|
84
87
|
if (n >= 89) return "sm89";
|
|
85
88
|
if (n >= 80) return "sm80";
|