Skip to content

GLM-5.3-Flash EXL3 on 2x DGX Spark with TensorFold

Python

start.sh: DISPLAY_KV_MIB on a headless Spark no longer ends the start silently; without nvidia_drm modeset it says so

MiaAI-Lab09578196f6fe
diff --git a/CREDITS.md b/CREDITS.md
index 6906352..f483dd8 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -95,7 +95,8 @@ checkpoint's ShapleyMcg attribution and the drafter's license).
applied as contributed, with `tools/prompt_reuse.py`.
- `0072-glm-display-kv` (`DISPLAY_KV_MIB`, the display reservation in the shared pool, issue #55): by
[ezoushen](https://github.com/ezoushen), [pull request #56](https://github.com/MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks-TensorFold/pull/56),
- applied as contributed, with `tools/display_kv_check.py`. It applies to TensorFold's pool the display-reserve KV
+ applied as contributed, with `tools/display_kv_check.py` (one review fix in its `start.sh` check, which ended a headless
+ Spark's start without a message). It applies to TensorFold's pool the display-reserve KV
technique that [gabewillen](https://github.com/gabewillen) proposed for the vLLM kit in
[MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks#234](https://github.com/MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks/pull/234).
- `0073-glm-queued-cancellation` (requests waiting for a slot are dropped when their client leaves): by
diff --git a/start.sh b/start.sh
index c2dfe00..573aab1 100755
--- a/start.sh
+++ b/start.sh
@@ -70,7 +70,10 @@ for v in SPLIT SHARED_PREFIX KDA_CHUNKED COPY_CODE MULTI_PREFILL STREAM_SMOOTH;
(( DISPLAY_KV_MIB == 0 || PARALLEL > 1 )) || die "DISPLAY_KV_MIB adds to the shared pool, which needs PARALLEL above 1"
(( DISPLAY_KV_MIB == 0 )) || [[ -e /dev/dri/card0 ]] || die "DISPLAY_KV_MIB needs /dev/dri/card0, which this Spark lacks"
if (( DISPLAY_KV_MIB )); then # headless only: a monitor's framebuffer lives in the reservation
- _shown=$(grep -lx connected /sys/class/drm/card0-*/status 2>/dev/null | sed 's|.*/\(card0-[^/]*\)/status|\1|' | paste -sd, -)
+ # no outputs under card0 at all: nvidia_drm runs without modeset, which has no dumb buffers for the span
+ compgen -G '/sys/class/drm/card0-*/status' >/dev/null ||
+ die "DISPLAY_KV_MIB needs nvidia_drm with modeset=1, and card0 shows no display outputs (an /etc/modprobe.d file may set modeset=0); set it to 0"
+ _shown=$(grep -lx connected /sys/class/drm/card0-*/status 2>/dev/null | sed 's|.*/\(card0-[^/]*\)/status|\1|' | paste -sd, - || true)
[[ -z "$_shown" ]] || die "DISPLAY_KV_MIB is for headless Sparks, and $_shown has a display connected; set it to 0"
fi
[[ "$WORKER_WEIGHTS" == copy || "$WORKER_WEIGHTS" == nfs ]] || die "WORKER_WEIGHTS is copy or nfs, not $WORKER_WEIGHTS"