coli doctor: read-only setup/health diagnostics (path, config, shards, disk, RAM budget, placement) (#33)

* Add read-only coli doctor diagnostics

* Fix doctor JSON output assertion
This commit is contained in:
ZacharyZcR
2026-07-12 01:39:13 +08:00
committed by GitHub
parent 1bdaeee82e
commit 8f5f3e3a2b
4 changed files with 357 additions and 2 deletions
+15
View File
@@ -110,6 +110,21 @@ sets the RAM budget and context immediately; the VRAM tier is enabled only when
the current `glm` binary is linked with CUDA. Explicit flags and environment
variables keep precedence over automatic values.
Before loading the model, `coli doctor` performs a read-only readiness check and
explains whether the selected Disk/RAM/VRAM placement is runnable:
```bash
COLI_MODEL=/nvme/glm52_i4 ./coli doctor
COLI_MODEL=/nvme/glm52_i4 ./coli doctor --gpu 0 --ram 128 --json
```
Doctor validates the model directory, config, tokenizer, safetensors headers,
engine executable, available RAM, requested NVIDIA devices, CUDA linkage, and the
same placement budget used by `coli plan`. It never starts `glm`, reads tensor
payloads, imports a model framework, or creates a CUDA context. The versioned JSON
report uses stable check IDs for automation. Warnings keep exit status 0; missing
requirements or an unsafe RAM projection return 1, while invalid CLI values return 2.
The engine at runtime is pure C — python is only used by the one-time converter.
### Windows 11 (native, no WSL)