GLM-5.3-Flash EXL3 on 2x DGX Spark with TensorFold
Python
WORKER / FABRIC_PEER as host names; WORKER_HF_CACHE
Alexbob05e1bf2743ab5
diff --git a/README.md b/README.mdindex dcaf512..386fefa 100644--- a/README.md+++ b/README.md@@ -274,7 +274,8 @@ sets a value wins: the environment, then `scripts/local.sh`, then `.env`, then t| Variable | Default | Meaning || --- | --- | --- |-| `WORKER` / `FABRIC_PEER` | empty | the worker's ssh target (`user@<address>`), and its CX7 address when `WORKER` is on another network |+| `WORKER` / `FABRIC_PEER` | empty | the worker's ssh target (`user@<address>` or `user@<host name>`), and its CX7 address when `WORKER` is on another network |+| `WORKER_HF_CACHE` | the worker's `HF_HOME` | the worker's Hugging Face cache, when it is not its `HF_HOME` (e.g. a shared models folder) || `MASTER_PORT` | `29551` | the ranks' rendezvous port (keep it on the private link) || `PARALLEL` | `4` (`1` with `DRAFTER=mtp`) | requests decoded together, 1 to 4 (above 1 needs `DRAFTER=dflash2`) || `CONTEXT` | `1048576` | prompt + reply window per request (with `KV=fp8`; other defaults in [KV pool and memory](#kv-pool-and-memory)); `0`: the largest that fits |diff --git a/scripts/nodes.sh b/scripts/nodes.shindex 24265fa..e08fb2d 100644--- a/scripts/nodes.sh+++ b/scripts/nodes.sh@@ -6,7 +6,10 @@ worker() { ssh -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=15 "# The worker's Hugging Face cache: its own HF_HOME, else ~/.cache/huggingface there. prepare.sh copies the checkpoint# into it and start.sh mounts it into rank 1.-worker_hf_cache() { worker 'echo "${HF_HOME:-$HOME/.cache/huggingface}"'; }+worker_hf_cache() { # WORKER_HF_CACHE wins: a worker whose cache is not its HF_HOME (e.g. a shared models disk)+ if [[ -n "${WORKER_HF_CACHE:-}" ]]; then echo "$WORKER_HF_CACHE"; return; fi+ worker 'echo "${HF_HOME:-$HOME/.cache/huggingface}"'+}# An image's identity by content (its layers' diffIDs and runtime config), the same under Docker's overlay2 and# containerd image stores: .Id is the config digest under one and the manifest digest under the other, so it never@@ -102,6 +105,11 @@ cx7_peer() {}detect_link() {local peer=${FABRIC_PEER:-${WORKER#*@}} cx7+ # a host name (an /etc/hosts alias of the CX7 address, say) is resolved first: ``ip route get`` takes addresses only+ if [[ ! "$peer" =~ ^[0-9]+(\.[0-9]+){3}$ ]]; then+ peer=$(getent ahostsv4 "$peer" | awk 'NR == 1 {print $1}') || true+ [[ -n "$peer" ]] || die "cannot resolve ${FABRIC_PEER:-${WORKER#*@}} to an IPv4 address"+ firead -r HEAD_ADDR HEAD_DEV HEAD_HCA HEAD_GID <<<"$(link_info "$peer")" || true[[ -n "${HEAD_ADDR:-}" ]] || die "no route from this node to $peer"# WORKER given by a LAN address (the route goes out a port without RoCE): use the worker's CX7 address instead