interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

ollm: GB10 gserve for the Omega Node (logits read before CE); draft, stacked on #76

open 80f0923667fa0342 #78 · opened 2026-11-07 06:02 UTC

Imported from GitHub aien-dev/aien-train#78, by drakestapleton

Base 9edd881cd7d7338c8722fda95b09e656b5c96b36 · Head edf39b0fc53ce02ee945e6e0a3ca40bce3a076b0

drakestapleton wrote on 2026-11-07 06:02 UTC

GB10 own-model serving for the Omega Node (DRA-292): ollm gserve, gsample, gscmp, with the chip forward run once per token. Stacked on #76 (feat/ollm-serve-completions). Draft; not for merge by its author.

What changes

  • gg.om: global ggnoce uint 1. When it is set, ggfwd returns after the logits GEMM instead of running kernel 21 (cross-entropy). oglast sets it to 1 around ggfwd and back to 0 afterwards. Without this, CE overwrote the logits in slot 11 with (softmax − onehot)/(T·B) before sampling read them. That was the root cause of the gserve-w1 failure: greedy decoding matched the CPU, and every temperature-sampled serve-check failed. A global is a zero-filled pool, so the training and eval paths, which never set it, are unchanged.
  • gserve / gsample / gscmp verbs for the gb10 build. gscmp compares chip and CPU logits per token.
  • docs/omegallm/README.md: the x86efi omc pin now matches build.sh (3ad9f10f…, omega-mv #1022 cf9fbda1). b4f45121 built the older efi and imac receipts.

Evidence so far

ItemResult
Builds (omega-mv e5b32567 omc 2c824805…)gb10 ce194d27…, mutant z 6985d78e…, aarch64 ollm b5dd5042…
CPU eval, round40 checkpoint 7c7b5b52…, v1 held.tok 8f6ac61a…, 16 windowsE 600 16 1242962 460964
GB10 window w1 (pre-fix binary 2257e6a0…, 2026-11-07 04:59Z, non-quiet)greedy output matched the CPU (sha 0cb1e218b2ffb02d); 5 serve-check failures, all temperature sampling, which led to the CE root cause above; decode 117 ms / 32 tokens = 3.66 ms/token (WolframLanguageEvaluator N[(126-9)/32] -> 3.65625)

Pending

GB10 window w2 (preregistered P1–P7: chip-vs-CPU parity on the fixed binary, sampled serve-check, geval identical before and after ggnoce and within 10 µnats of the CPU, and the live Omega Node release acceptance on gserve). It is staged and held until the queen's restart drain ends. Until then GB10 parity for this head is NOT_RUN. Nothing here is QUALIFIED or DEPLOYED; :18091 is untouched.

Apply it

git checkout -b patch-80f0923667fa0342 9edd881cd7d7338c8722fda95b09e656b5c96b36
curl -fsSL https://interplane.io/drakestapleton/aien-train/patches/80f0923667fa0342.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aien-train
78
edf39b0fc53ce02ee945e6e0a3ca40bce3a076b0
{"kind":"github-import","owner":"aien-dev","repo":"aien-train","number":78,"url":"https://github.com/aien-dev/aien-train/pull/78","export_sha256":"e2d49089563cb3d01f7a323b1228844868dc3e2c89531906e1b60f6b775ad91a","imported_utc":"2026-11-18T16:40:28Z"}

Changes

diff --git a/docs/omegallm/README.md b/docs/omegallm/README.md
index 9f08acb..6b8cdb0 100644
--- a/docs/omegallm/README.md
+++ b/docs/omegallm/README.md
@@ -107,9 +107,10 @@ The build script does four things:
      (omega-mv `e5b32567`, `../omega-mv`);
    - x86linux: `be8c51301307555254fc59e351d281aae1aa096d91521777e33a41c8b446448a`
      (omega-mv main `ba5559d9`, `../omega-mv-x86`);
-   - x86efi: `b4f45121f6c6d5d8a6ed0f5c4f3934b7cc4bec369bfa89523699bd33928f9b55`
-     (omega-mv main `d3d1b1bc`, PR #1015 merged 2026-11-04, `../omega-efi`; the receipts were
-     built from #1015's commit `5ce9ecaa`, an ancestor, with this same omc).
+   - x86efi: `3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194`
+     (omega-mv PR #1022 commit `cf9fbda1`: main `d3d1b1bc`, where #1015's x86efi backend merged
+     on 2026-11-04, plus efi 14, `../omega-efi`); the receipts in `evidence/OMEGALLM/efi` and `imac`
+     were built earlier with omc `b4f45121` from #1015's commit `5ce9ecaa`.
 2. It concatenates `math.om data.om`, the pool unit (`lpool.om` on Linux, `epool.om` on UEFI;
    CONTRACT-V3 §2), `model.om adam.om ckpt.om bpe.om cli.om` and the platform unit
    (`lio.om` for Linux, `eio.om` for UEFI; CONTRACT §9). The x86 targets put the line
@@ -140,10 +141,11 @@ defaults. The exit codes are listed in CONTRACT §7.
 ## Serve (DRA-119)
 
 ```sh
-ollm serve PORT CK MERGES [MAXCONN] [tplmax=N] [test=1]   # AArch64 Linux only; prints "PORT n" once listening
+ollm serve PORT CK MERGES [MAXCONN] [tplmax=N] [test=1]    # AArch64 Linux; prints "PORT n" once listening
+ollm-gb10 gserve PORT CK MERGES [MAXCONN] [tplmax=N] [test=1]   # the same server, logits from the GB10
 ```
 
-`serve.om` (aarch64 builds only; gb10 and the x86 targets get `noserve.om`, which exits 2) answers
+`serve.om` (aarch64 and gb10 builds; the x86 targets get `noserve.om`, which exits 2) answers
 OpenAI-style chat requests on 127.0.0.1:PORT with omega-mv's `seed/net/http.om` and
 `seed/json/{json,jsonw}.om`, vendored byte for byte from omega-mv `e5b32567` into
 `native/omegallm/net/`. `build.sh` checks their sha256 (`NET_PIN_MISMATCH`, exit 3) and puts `om2`
diff --git a/native/omegallm/cli.om b/native/omegallm/cli.om
index f6dec14..c128e3f 100644
--- a/native/omegallm/cli.om
+++ b/native/omegallm/cli.om
@@ -330,6 +330,7 @@ exit 2
 end
 obload 7 v
 end
+ochipup
 osampleloaded st nn tm
 end
 
@@ -384,14 +385,35 @@ end
 note one sampling step (cmdsamp, serve.om): the next token from the logits at the last context
 note position, argmax when TEMPMILLI tm is 0, else a draw with the splitmix64 stream state st.
 fn osstep st ulong tm ulong to ulong
-lf = ofwd 0
-olast
+olastf
 if eq tm 0
 ret oargmax
 end
 ret odraw st div f64 tm 1000.0
 end
 
+note ogpu[0] = 1 when the per-token forward runs on the chip: gpu/gg.om's gserve and gsample set it
+note before cmdserve or cmdsamp; nogpu.om's ogchip and oglast refuse with exit 2 on the CPU targets.
+global ogpu ulong 1
+
+note after the checkpoint loads: on the chip path, open the chip and upload the parameters once
+fn ochipup to void
+if ne get ogpu 0 0
+ogchip
+end
+end
+
+note forward of the context in obx row 0, then its last position's logits into TMP[0..V) (oa),
+note on the chip when ogpu[0] = 1 (oglast), else on the CPU (ofwd, olast)
+fn olastf to void
+if ne get ogpu 0 0
+oglast
+ret
+end
+lf = ofwd 0
+olast
+end
+
 note logits of the last context position into TMP[0..V) (oa)
 fn olast to void
 d = get og 2
diff --git a/native/omegallm/gpu/gg.om b/native/omegallm/gpu/gg.om
index 3168014..a6a5185 100644
--- a/native/omegallm/gpu/gg.om
+++ b/native/omegallm/gpu/gg.om
@@ -496,6 +496,10 @@ ggatt l
 ggffn l
 end
 
+note ggnoce 1 (set by oglast only): ggfwd stops after the logits GEMM. CE (kernel 21) rewrites the
+note logits in place to (softmax - [c = y]) / (T B) for training, which keeps their argmax but is not a
+note logit (DRA-292 window gserve-w1: greedy matched, maxdiff 21.6, temperature draws drifted).
+global ggnoce uint 1
 fn ggfwd to void
 d = get og 2
 x = ggl 0 0
@@ -522,6 +526,9 @@ x = gga1 11
 w = ggw 0
 v = get og 0
 ggxwt z w x v d false
+if ne get ggnoce 0 0
+ret
+end
 r = mul ggr 32
 ggu 0 r
 ggpt 1 x
@@ -1876,14 +1883,182 @@ end
 ret add s 1.0f64
 end
 
-note gb10 platform main: gcmp, gcmp2, gtrain, gtrainf, gacmp, geval, gdiag and gprof here, the BF16
-note commands gtrainb, gprofb, gbcmp, gbcmp2 and gbfrag in gb.om, every other command through the CPU
-note main (lio.om)
+note gserve and gsample (aien-train DRA-292): serve and sample (serve.om, cli.om) with the per-token
+note forward on the chip. cli.om's ochipup calls ogchip once the checkpoint loads: B = 1 (one
+note context row, R = T), open the chip, upload the f32 parameters. olastf then calls oglast per
+note token: upload the T context tokens of obx row 0 (positions past CT hold earlier tokens or 0,
+note which the causal forward never reads for position CT - 1), ggfwd with ggnoce (no CE: the logits
+note stay logits), and the logits of position CT - OMUTZ read back as f64 into TMP[0..V) (oa), where
+note argmax and draws run as on the CPU.
+note OMUTZ: 1 in the product; 0 in mutant z (the row past the context), which gscmp must catch.
+const OMUTZ ulong 1
+fn ogchip to void
+put og 6 1
+ggopen
+ggupw
+end
+
+fn oglast to void
+ggupt
+put gkinv 0 1
+put ggnoce 0 1
+ggfwd
+put ggnoce 0 0
+v = get og 0
+r = sub get og 9 OMUTZ
+o = add get gga 11 mul mul r v 4
+tm = get og 27
+for c ulong v
+put oa add tm c ggf add o mul c 4
+end
+end
+
+note gscmp CK N PROMPT MERGES (V > 256): the chip forward against the CPU forward on the contexts of
+note N greedy steps from token 0 then PROMPT's encoding. Each step runs ofwd and olast (f64) into
+note gscl, then oglast (chip, f32) into TMP, and prints `GS step cpu_tok chip_tok maxdiff_nano
+note margin_nano`: maxdiff = max over the V logits of |chip - cpu|, margin = the CPU's top-1 logit
+note minus its top-2. The CPU token is pushed. Last line `GSCMP N diverged maxdiff_nano`: a step
+note diverges when the tokens differ although the margin exceeds 2 GSTOL. Exit 40 when a step
+note diverged or maxdiff exceeds GSTOL.
+const GSTOL f64 0.002
+global gscl f64 65536
+note gscmp totals: gsmd[0] the largest maxdiff, gskd[0] the diverged steps
+global gsmd f64 1
+global gskd ulong 1
+fn ggscmp to void
+if ne oargc 6
+exit 2
+end
+ockload 2
+nn = oargu 3
+v = get og 0
+if le v 256
+exit 2
+end
+obload 5 v
+ogchip
+put og 9 0
+ocpush 0
+np = obprompt 4
+for i ulong np
+ocpush get obtk i
+end
+put gsmd 0 0.0f64
+put gskd 0 0
+for s ulong nn
+a = ggsst s
+ocpush a
+end
+md = get gsmd 0
+kd = get gskd 0
+oputc 71
+oputc 83
+oputc 67
+oputc 77
+oputc 80
+oputc 32
+oputu nn
+oputc 32
+oputu kd
+oputc 32
+oputl long mul md 1000000000.0f64
+oputc 10
+oflush
+r = nvstop
+if or gt kd 0 gt md GSTOL
+exit 40
+end
+end
+
+note one gscmp step s on the current context: prints its GS line, updates the totals, returns the
+note CPU token
+fn ggsst s ulong to ulong
+a1 = ggscpu
+mg = ggsmg a1
+oglast
+a2 = oargmax
+dm = ggsdf
+put gsmd 0 fmax get gsmd 0 dm
+if and ne a1 a2 gt mg mul 2.0f64 GSTOL
+put gskd 0 add get gskd 0 1
+end
+oputc 71
+oputc 83
+oputc 32
+oputu s
+oputc 32
+oputu a1
+oputc 32
+oputu a2
+oputc 32
+oputl long mul dm 1000000000.0f64
+oputc 32
+oputl long mul mg 1000000000.0f64
+oputc 10
+oflush
+ret a1
+end
+
+note the CPU forward's last-position logits into gscl; returns its argmax
+fn ggscpu to ulong
+v = get og 0
+tm = get og 27
+lf = ofwd 0
+olast
+for c ulong v
+put gscl c get oa add tm c
+end
+ret oargmax
+end
+
+note max over c < V of |TMP[c] - gscl[c]|
+fn ggsdf to f64
+tm = get og 27
+dm = 0.0f64
+for c ulong get og 0
+x = fabs sub get oa add tm c get gscl c
+dm = fmax dm x
+end
+ret dm
+end
+
+note the CPU's top-1 logit gscl[a] minus its largest other logit
+fn ggsmg a ulong to f64
+b = bitcast f64 ulong 18442240474082181120
+for c ulong get og 0
+if ne c a
+b = fmax b get gscl c
+end
+end
+ret sub get gscl a b
+end
+
+note gb10 platform main: gcmp, gcmp2, gtrain, gtrainf, gacmp, geval, gdiag, gprof, gserve, gsample
+note and gscmp here, the BF16 commands gtrainb, gprofb, gbcmp, gbcmp2 and gbfrag in gb.om, every
+note other command through the CPU main (lio.om). Command words as in cli.om (Wolfram
+note FromDigits[Reverse[ToCharacterCode[w]],256]): gserve 111559399797607, gsample
+note 28548202775016295, gscmp 482871571303.
 fn main to int
 if lt oargc 2
 exit 2
 end
 w = ocmdw
+if eq w 111559399797607
+put ogpu 0 1
+cmdserve
+r = nvstop
+ret 0
+end
+if eq w 28548202775016295
+put ogpu 0 1
+cmdsamp
+r = nvstop
+ret 0
+end
+if eq w 482871571303
+ggscmp
+ret 0
+end
 if eq w 1886217063
 ggcmp
 ret 0
diff --git a/native/omegallm/gpu/gk.om b/native/omegallm/gpu/gk.om
index 1e3939a..1184035 100644
--- a/native/omegallm/gpu/gk.om
+++ b/native/omegallm/gpu/gk.om
@@ -14,12 +14,12 @@ global gkarg uint 32
 global gkna uint 1
 global gkmd uint 2
 fn gkw v uint to void
-at = get gkat 0
-put gkcode at uchar and v 255
-put gkcode add at 1 uchar and shr v 8 255
-put gkcode add at 2 uchar and shr v 16 255
-put gkcode add at 3 uchar shr v 24
-put gkat 0 add at 4
+ap = get gkat 0
+put gkcode ap uchar and v 255
+put gkcode add ap 1 uchar and shr v 8 255
+put gkcode add ap 2 uchar and shr v 16 255
+put gkcode add ap 3 uchar shr v 24
+put gkat 0 add ap 4
 end
 fn gkq a uint b uint c uint d uint to void
 gkw a
@@ -1063,7 +1063,7 @@ ma = 1
 mb = sub ep 1
 bt = false
 end
-big = and ge g 8 and ne g 16 ne g 17
+wide = and ge g 8 and ne g 16 ne g 17
 if ge g 8
 id = add 40 mul sub g 8 2
 end
@@ -1073,7 +1073,7 @@ end
 if ge g 18
 id = add 54 mul ep 2
 end
-if not gkemit id ma mb bt ep big
+if not gkemit id ma mb bt ep wide
 ret false
 end
 end
@@ -1107,11 +1107,11 @@ end
 put gkthr id 128
 ret true
 end
-note Emit one GEMM kernel into slot id (two slots when big, the 64x64 kernel); false on overflow.
-fn gkemit id uint ma uint mb uint bt bool ep uint big bool to bool
+note Emit one GEMM kernel into slot id (two slots when wide, the 64x64 kernel); false on overflow.
+fn gkemit id uint ma uint mb uint bt bool ep uint wide bool to bool
 gkslot id
 ns = uint 1
-if big
+if wide
 gkgemm64 ma mb bt ep
 put gkgpr id 168
 put gksm id 8704
diff --git a/native/omegallm/nogpu.om b/native/omegallm/nogpu.om
index 9d91580..bbb7fae 100644
--- a/native/omegallm/nogpu.om
+++ b/native/omegallm/nogpu.om
@@ -3,3 +3,13 @@ note ogkm[0] = 1, which only gpu/gg.om's gcmp2 sets, so reaching it is a defect:
 fn ogmask yo ulong l ulong t ulong to void
 exit 2
 end
+
+note ogchip and oglast (cli.om ochipup, olastf) run only when ogpu[0] = 1, which only gpu/gg.om's
+note gserve and gsample set, so reaching them on a CPU-only target is a defect: exit 2.
+fn ogchip to void
+exit 2
+end
+
+fn oglast to void
+exit 2
+end
diff --git a/native/omegallm/serve.om b/native/omegallm/serve.om
index 40be7d4..bf92c10 100644
--- a/native/omegallm/serve.om
+++ b/native/omegallm/serve.om
@@ -1829,8 +1829,7 @@ end
 
 note svlogit: the next-token logits divided by tau, then made probabilities (as odraw does)
 fn svlogit tau f64 to void
-lf = ofwd 0
-olast
+olastf
 o = get og 27
 v = get og 0
 m = bitcast f64 ulong 18442240474082181120
@@ -2557,6 +2556,7 @@ mx = svcli sv na
 ockload 3
 v = get og 0
 obload 4 v
+ochipup
 cs = new ulong 320 0
 io = new uchar 131072 0
 bd = new uchar 983040 0
diff --git a/tests/omegallm/build.sh b/tests/omegallm/build.sh
index 1e21a6b..9ccabd5 100755
--- a/tests/omegallm/build.sh
+++ b/tests/omegallm/build.sh
@@ -48,10 +48,13 @@
 # The pool file (CONTRACT-V3 section 2) follows data.om: lpool.om holds the bank-B globals oww, ogb
 # and oab on the Linux targets, epool.om one-element placeholders on x86efi (its v3 limit is the
 # v2 bank-A capacity).
-# serve (DRA-119, native/omegallm/serve.om): aarch64 starts with the line `om2` and concatenates
+# serve (DRA-119, native/omegallm/serve.om): aarch64 and gb10 start with the line `om2` and concatenate
 # net/http.om, net/json.om and net/jsonw.om (vendored unmodified from omega-mv e5b32567 seed/net/http.om,
 # seed/json/json.om and seed/json/jsonw.om; sha256 below, checked at build) before the ollm units and
-# serve.om after them. gb10, x86linux and x86efi take noserve.om, whose cmdserve exits 2.
+# serve.om after them. x86linux and x86efi take noserve.om, whose cmdserve exits 2. gb10 adds gserve
+# and gsample (serve and sample with the per-token forward on the chip, gpu/gg.om) and gscmp (that
+# forward against the CPU's); mutant z (gg.om OMUTZ) reads the logits of the row past the context,
+# which gscmp must catch.
 # Mutants (ollm-mut-X, one changed line) plant a defect the checks must catch. Variants (ollm-var-X)
 # h5 and h7 (two changed lines) set both gcheck steps GCH and GCH2 to 1e-5 (h5) or 1e-7 (h7), the step
 # sizes that the README's GCH section rejects; r0 (gk.om OKREU 0, one changed line) clears the GEMM FFMA
@@ -77,7 +80,7 @@ OUT=${OUT:-$here/../build}
 CORE=${CORE:-6}
 mut= kind=
 if [ $# -ge 1 ]; then
-  { [ "$1" = --mutant ] || [ "$1" = --variant ]; } && [ $# -eq 2 ] || { echo "usage: build.sh [--mutant a|b|c|d|e|g|h|m|f|k|s|p|t|r|x|q|w|u|l|o|v|n|y | --variant h5|h7|r0|bx]" >&2; exit 2; }
+  { [ "$1" = --mutant ] || [ "$1" = --variant ]; } && [ $# -eq 2 ] || { echo "usage: build.sh [--mutant a|b|c|d|e|g|h|m|f|k|s|p|t|r|x|q|w|u|l|o|v|n|y|z | --variant h5|h7|r0|bx]" >&2; exit 2; }
   kind=$1 mut=$2
 fi
 got=$(sha256sum "$OMC" | cut -d' ' -f1)
@@ -85,7 +88,7 @@ got=$(sha256sum "$OMC" | cut -d' ' -f1)
 mkdir -p "$OUT"
 src=$here/native/omegallm
 name=ollm
-if [ "$TARGET" = aarch64 ]; then
+if [ "$TARGET" = aarch64 ] || [ "$TARGET" = gb10 ]; then
   ( cd "$src/net" && sha256sum -c --quiet - ) <<'EOF' || { echo "NET_PIN_MISMATCH" >&2; exit 3; }
 aff258ecd3858454056811a5e6fe1f660f9d650a7207d6c41885105110e046a7  http.om
 456254fc754ea35103ced480407b24fc1a3896d094b90ae0e9623e7b6594e2d2  json.om
@@ -137,11 +140,12 @@ case "$kind$mut" in
   --mutantv) pat='s/^const OMUTV ulong 1$/const OMUTV ulong 0/' want=1 ;;
   --mutantn) pat='s/^const OMUTN ulong 1$/const OMUTN ulong 0/' want=1 ;;
   --mutanty) pat='s/^const OWC ulong 15833472$/const OWC ulong 8400/;s/^const OGC ulong 15833472$/const OGC ulong 5000/;s/^const OAC ulong 15016192$/const OAC ulong 12344/;s/^const OMUTY ulong 1$/const OMUTY ulong 0/' want=4 ;;
+  --mutantz) pat='s/^const OMUTZ ulong 1$/const OMUTZ ulong 0/' want=1 ;;
   --varianth5) pat='s/^const GCH f64 0\.000001$/const GCH f64 0.00001/;s/^const GCH2 f64 0\.00000025$/const GCH2 f64 0.00001/' want=2 ;;
   --varianth7) pat='s/^const GCH f64 0\.000001$/const GCH f64 0.0000001/;s/^const GCH2 f64 0\.00000025$/const GCH2 f64 0.0000001/' want=2 ;;
   --variantr0) pat='s/^const OKREU ulong 1$/const OKREU ulong 0/' want=1 ;;
   --variantbx) pat='s/^const OWC ulong 15833472$/const OWC ulong 8400/;s/^const OGC ulong 15833472$/const OGC ulong 5000/;s/^const OAC ulong 15016192$/const OAC ulong 12344/' want=3 ;;
-  *) echo "usage: build.sh [--mutant a|b|c|d|e|g|h|m|f|k|s|p|t|r|x|q|w|u|l|o|v|n|y | --variant h5|h7|r0|bx]" >&2; exit 2 ;;
+  *) echo "usage: build.sh [--mutant a|b|c|d|e|g|h|m|f|k|s|p|t|r|x|q|w|u|l|o|v|n|y|z | --variant h5|h7|r0|bx]" >&2; exit 2 ;;
 esac
 if [ -n "$mut" ]; then
   [ "$kind" = --mutant ] && name=ollm-mut-$mut || name=ollm-var-$mut
diff --git a/tests/omegallm/serve-check.sh b/tests/omegallm/serve-check.sh
index 032817d..2563795 100755
--- a/tests/omegallm/serve-check.sh
+++ b/tests/omegallm/serve-check.sh
@@ -1,8 +1,9 @@
 #!/bin/sh
 # serve-check.sh: run `ollm serve` on loopback and referee it with serve-check.py (DRA-119).
-# Env: OLLM (an aarch64 build with serve), CK (checkpoint), MERGES (V > 256 merges), PORT (default
-# 18291), TPORT (default 18292: a second server with `tplmax=4000 test=1`), CORES (taskset list,
-# default 8-9), OUT (receipt directory), ALLEN (allen-chat system prompt, default
+# Env: OLLM (an aarch64 build with serve, or a gb10 build), CK (checkpoint), MERGES (V > 256 merges),
+# VERB (serve, default, or gserve on a gb10 build in a GPU window: the per-token forward on the chip),
+# PORT (default 18291), TPORT (default 18292: a second server with `tplmax=4000 test=1`), CORES
+# (taskset list, default 8-9), OUT (receipt directory), ALLEN (allen-chat system prompt, default
 # /opt/allen-chat/system-prompt.txt; absent gives NOT_RUN). The servers run under
 # taskset/nice/bwrap; this script stops only the PIDs it started. Exit 0 only when every check
 # passes and both servers listened on 127.0.0.1 alone.
@@ -12,13 +13,16 @@ PORT=${PORT:-18291}
 TPORT=${TPORT:-18292}
 CORES=${CORES:-8-9}
 ALLEN=${ALLEN:-/opt/allen-chat/system-prompt.txt}
+VERB=${VERB:-serve}
 here=$(cd "$(dirname "$0")" && pwd)
 mkdir -p "$OUT"
 bw="bwrap --dev-bind / / --dev /dev --bind /dev/shm /dev/shm --proc /proc --"
+# gserve opens the chip through /dev/nvidia*, which a fresh --dev /dev does not hold
+[ "$VERB" = gserve ] && bw="bwrap --dev-bind / / --proc /proc --"
 {
 	echo "date $(date -u +%FT%TZ)"
 	echo "host $(hostname) $(uname -m)"
-	echo "ollm $(sha256sum "$OLLM")"
+	echo "ollm $(sha256sum "$OLLM") verb $VERB"
 	echo "ck $(sha256sum "$CK")"
 	echo "merges $(sha256sum "$MERGES")"
 	echo "referee $(sha256sum "$here/serve-check.py")"
@@ -33,7 +37,7 @@ start() {
 	name=$1
 	port=$2
 	shift 2
-	taskset -c "$CORES" nice -n 10 $bw "$OLLM" serve "$port" "$CK" "$MERGES" "$@" >"$OUT/$name.log" 2>&1 &
+	taskset -c "$CORES" nice -n 10 $bw "$OLLM" "$VERB" "$port" "$CK" "$MERGES" "$@" >"$OUT/$name.log" 2>&1 &
 	pid=$!
 	pids="$pids $pid"
 	i=0