xinfer-ai 0.14.1 → 0.14.2
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 +1 -0
- package/docs/precision_probes.md +66 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -483,6 +483,7 @@ xinfer --m Qwen/Qwen3.6-27B-FP8 --ui-server --enable-tool-grammar
|
|
|
483
483
|
| [Rust Crate](docs/rust_crate.md) | Use as a library |
|
|
484
484
|
| [Add a Model](docs/add_model.md) | Port a new architecture (AI-assisted) |
|
|
485
485
|
| [Test a Model](docs/test_model.md) | Validate model quality (AI-assisted) |
|
|
486
|
+
| [CUDA Precision Probes](docs/precision_probes.md) | Isolate CUDA kernel precision problems |
|
|
486
487
|
|
|
487
488
|
**Using Agents under xInfer backend:** [xbot](docs/xbot.md) · [OpenCode](docs/opencode.md) · [Kilo Code](docs/kilocode.md) · [Claude Code](docs/claude_code.md) · [Goose](docs/goose.md)
|
|
488
489
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# CUDA Precision Probe Suite
|
|
2
|
+
|
|
3
|
+
The precision suite is a kernel-level differential test harness. Use it to isolate a CUDA precision problem before attributing the symptom to a full model or sampler.
|
|
4
|
+
|
|
5
|
+
## Run the complete suite
|
|
6
|
+
|
|
7
|
+
From the xInfer repository root:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
./tests/run_precision_suite.sh
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The runner:
|
|
14
|
+
|
|
15
|
+
1. Detects every visible GPU's compute capability with `nvidia-smi` and uses the lowest capability for a safe multi-GPU build.
|
|
16
|
+
2. Builds all Rust probes once with the release CUDA configuration.
|
|
17
|
+
3. Runs each Rust probe followed by its paired Python comparator.
|
|
18
|
+
|
|
19
|
+
The probes cover Candle CUDA/PTX operations, ISQ/GGUF Q4_K and Q6_K, attention.rs kernels, FP8, GDN, paged FlashInfer attention, and the NVFP4 paths supported by the detected GPU. Python comparisons use independent PyTorch references and official Python FlashInfer when available. vLLM and sglang comparisons are attempted when those packages are installed.
|
|
20
|
+
|
|
21
|
+
The suite prints a retained result directory such as:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
/tmp/xinfer_precision_suite_sm120_<pid>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Read the first `FAIL` line and the corresponding stage's `[FAIL]` marker. The failing stage identifies the subsystem; the operation name identifies the kernel family or operation.
|
|
28
|
+
|
|
29
|
+
## Rerun one comparator
|
|
30
|
+
|
|
31
|
+
Probe binaries and their output files are retained, so a Python comparator can be rerun without rebuilding or executing the GPU probe again:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python3 tests/probes/compare_candle_probe.py \
|
|
35
|
+
/tmp/xinfer_precision_suite_sm120_<pid>/candle.bin
|
|
36
|
+
|
|
37
|
+
python3 tests/probes/compare_flashinfer_probe.py \
|
|
38
|
+
/tmp/xinfer_precision_suite_sm120_<pid>/flashinfer
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use the corresponding comparator in `tests/probes/` for the failed stage:
|
|
42
|
+
|
|
43
|
+
| Stage | Comparator |
|
|
44
|
+
|---|---|
|
|
45
|
+
| Candle and Q4_K/Q6_K | `compare_candle_probe.py` |
|
|
46
|
+
| attention.rs common kernels | `compare_attention_misc_probe.py` |
|
|
47
|
+
| FP8 | `compare_fp8_probe.py` |
|
|
48
|
+
| GDN | `compare_gdn_probe.py` |
|
|
49
|
+
| FlashInfer attention | `compare_flashinfer_probe.py` |
|
|
50
|
+
| NVFP4 | `compare_nvfp4_probe.py` |
|
|
51
|
+
|
|
52
|
+
## Optional GDN audit
|
|
53
|
+
|
|
54
|
+
The SM90 persistent FlashInfer GQA path is opt-in and excluded by default. Audit it explicitly with:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
./tests/run_precision_suite.sh --include-optin-gdn
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This flag is only for auditing that optional path; it does not enable or change the production routing.
|
|
61
|
+
|
|
62
|
+
## Interpreting SM capability results
|
|
63
|
+
|
|
64
|
+
For SM70 and SM75, the runner automatically builds the legacy CUDA path with only `cuda,nccl`. FlashInfer and CUTLASS-dependent attention and hardware-NVFP4 cases are skipped, but the software FP8 and software NVFP4 GEMM/MoE/helper cases still run and are compared with the independent PyTorch golden. Since attention.rs disables BF16 CUDA kernels below SM80, the legacy software probes use F16 there. The CUDA toolkit must also provide an `nvcc` that supports `compute_70`/`compute_75`; CUDA 12.6 is the recommended legacy-toolkit choice. CUDA 13 `nvcc` rejects these targets before Rust compilation begins.
|
|
65
|
+
|
|
66
|
+
On SM90, Blackwell-only NVFP4 hardware helpers are reported as `SKIP` because they cannot execute on that GPU. Run the suite on SM100/SM120 hardware to exercise hardware NVFP4 dense, GEMM, and MoE paths. Missing optional Python packages are reported explicitly; install versions matching the CUDA and PyTorch environment when those golden comparisons are required.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xinfer-ai",
|
|
3
|
-
"version": "0.14.
|
|
4
|
-
"assetVersion": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
|
+
"assetVersion": "0.14.2",
|
|
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",
|