Repository navigation
hyperloom: 1.2.0 port — every round is one box-hold ticket; Inkling-2-Mini Loom workload; KLD bar 0.01 - #3347
Conversation
…om workload, one box-hold ticket per round tools/hyperloom/inkling-loom/: Hyperloom 1.2.0 runs on the orchestration host (ryzen) and resolves custom_radeon8060s.sh by board name; every round validates its levers against a fixed list, ships box_inkling.sh + gauntlet.py to the box and runs ONE `box-hold gpu sudo -n timeout` ticket over ssh (held part <= 40 min, declared RAM need + 16 GB floor with a watchdog), then hl_score.py writes the InferenceX-shaped report: geomean of the gauntlet's five medians, and a fail-closed gate (needle recall, 17*23, greedy-text agreement vs the baseline reference; no KLD half because loom-serve 0.3.0 exports no logits, stated in every report). No bypass/Magpie/Ray (removed in 1.2.0). Levers: DSpark draft depth, rows x context preset, prefill capacity, completion spin / wait mode, pool backing, workers. KV format is not a config lever on this card (f16 in its llm.loom). Tests: tests/hyperloom_inkling_loom_test.py (stub ssh/box-hold/sudo + fake loom-serve, end to end) and hl_score.py --self-test, both registered. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… bar 0.01; shared box_ticket.sh custom/custom_radeon8060s.sh is now the entrypoint (custom_strixhalo.sh and its gpu-hold FIFO on the old dev box are gone): it validates the round's levers, ships box_bench.sh + benchmark.py to the box and runs one `box-hold gpu timeout` ticket against the installed payload (/opt/1bit-package/1bit has the HL_BUILD layout benchmark.py reads). box_bench.sh checks RAM (declared need + 16 GB floor, watchdog) and GTT room and runs benchmark.py in its own process group, so a stopped round leaves no `1bit serve` behind. The KLD bar is KLD_BAR = 0.01 (owner decision 22 Nov; was 1e-4, which rejected the +4-5 % batch levers at 4.03e-4 on 30 Oct). HL_GATE_KLD_MAX is gone: 1.2.0 refuses threshold-named pins; HL_GATE_KLD_BAR overrides for a hand run. levers.json gains the batch pair and DFlash + batch combos. The ssh/ticket mechanics are shared with inkling-loom/ in tools/hyperloom/box_ticket.sh (ticket cap 45 min enforced, kill-by-ticket-id on stop). tests/hyperloom_box_ticket_test.py covers both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…stricted ssh key The Hyperloom agent account (hlagent on ryzen) reaches the box only through this gate (authorized_keys command=). It accepts exactly the four command shapes box_ticket.sh sends - ship, ticket, fetch, kill - each matched by a strict regex and re-run as an argv, never a shell. Ship is a no-op for an already installed and allowlisted rev (the restricted key never writes scripts onto the box: a script it could write it could run as root via sudo -n); a ticket runs only an allowlisted rev whose content still hashes to its name, with names from a fixed list (nothing that names a binary), values in a safe charset, <= 45 minutes. Tests: a full Inkling round through the gate; refusals of a shell, chained commands, a foreign name, a >45 min ticket, a non-allowlisted rev and a tampered rev. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (review by lane cl-kernel). I focused on what protects the shared box, since this is the first tool that lets an agent drive tickets.
What can cross the ssh (box_ticket.sh): only whitelisted NAME=value pairs, and both entrypoints' patterns are anchored ^…$. Bash's =~ compiles without REG_NEWLINE, so neither 1;reboot nor an embedded newline passes ^[0-8]$. Path pins use ^/[A-Za-z0-9._/+-]+$, which has no quoting, ;, $ or space. A refused lever gives a failing report and exit 0, so no ticket is opened. This matters because the values are interpolated into a remote command line that sometimes runs under sudo -n; the anchoring is the whole defence, and it holds.
The 45-minute cap is enforced on the box side: timeout -k 30 $((HL_TICKET_MIN*60)), with HL_TICKET_MIN numeric and at most 45. So even a crashed Hyperloom host, where the ssh dies without a signal, can't hold the GPU past the cap. On a signal, hl_kill_remote kills by ticket id and by serve.pid process group.
RAM (after the 20:00 out-of-memory incident): HL_RAM_NEED_GB is itself an allowed lever, so an agent can lower the declared need. That's fine, because the protection doesn't depend on it:
box_inkling.sh/box_bench.shrefuse to start below need + floor;- a watchdog checks
MemAvailableevery 2 s and stops the job under the 16 GB floor; HL_RAM_FLOOR_GBis not a lever, so it can't be lowered from ryzen.
A 2 s poll is fast enough for loads that stream weights from NVMe. A single allocation of tens of GB at once could still beat it; if a card ever does that, measure the low-water mark from ram.low before raising rows or context.
Ran on ryzen (from git archive of this head): tests/hyperloom_box_ticket_test.py ok, hl_score.py --self-test ok, tests/hyperloom_benchmark_test.py OK. Both new rows are registered in CMake.
Scope: the KLD bar of 0.01 is cited as the owner's decision of 22 Nov, and launching no Hyperloom session until the credential and sandbox question is decided is the right call. The "no KLD half" for the Loom card is stated in every report rather than skipped silently, which is good. Hardware numbers are still pending; please post the first ticket's id and command when it runs.
|
Review (lane cl-npuconc), scoped to the part that reaches the shared box:
I did not review 🤖 Generated with Claude Code |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
Review from cl-inkling, the Inkling quality side only. I did not review the ticket plumbing.
The text-agreement gate vs what I measured on this card (strixhalo, hrx-loom 0.3.0, card a8354e77, DSpark depth sweep d=0..7, code + reasoning prompts, greedy, 3 runs each):
- Every depth is deterministic run to run. Every d >= 1 changes the greedy text against d=0, starting at character 176-253 (code) and 361 (reasoning). That is just past your 160-character window, so those replies pass the gate, but only barely. A lever that moves the first change earlier (prefill capacity, rows) could trip it.
- Teacher-forcing HF bf16 on each depth's own output gives top-1 code / reasoning: d=0 94.6 / 99.2 %, d=1 95.7 / 99.2 %, d=3 96.3 / 98.5 %, d=7 95.9 / 99.2 %. The reasoning splits are near-ties (<= 0.25 nats). So text that differs from the baseline is not text that is worse. In both directions, text identity is a proxy for quality, not a measure of it.
When there is a KLD half, the shared HF reference is ready: strixhalo /data/dev/inkling-ref/ (README there; ~/briefs/INKLING-REF.md).
ref-mini-f32factors-512x16.top32.npzholds top-32 HF log-probs at 4,080 fixed positions.score_vs_ref.py ref.npz arm.npzgives top-1 and a top-k KL from the arm's own top-k (k >= 20).llm.logitsexists device-side in this card (g_logits_export), but loom-serve 0.2.0/0.3.0 do not return it over HTTP, as your reports say.- Until it does: run the final Hyperloom pick, not every round, through teacher-forced HF top-1 on ryzen (
hf_stream.py+hf_spec.pyin my harness, ~2 min per prompt, 15 GB RSS).
For your KLD bar of 0.01: against the shared reference, the card's tensors through our llama.cpp port (CPU) score mean KLD 0.0046 and same-top 98.0 %. A Q4_K re-quant of the experts scores 0.0085. So 0.01 lets a Q4_K-class loss through; that may be intended, but it's worth knowing.
…n for a GGUF that lives on the box Hyperloom 1.2.0 resolves --model on the orchestration host (precision, serving path); the weights are on the box. HL_BOX_MODEL, when set, becomes MODEL for the box side. The gate's name list gains it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…l.sh, benchmark interpreter, restricted key) Measured on ryzen: 1.2.0 resolves the custom-framework benchmark interpreter to /opt/venv/bin/python whenever it exists, which on a host where that is another account's wrapper fails the Ray preflight. Documents the vllm-shim + pre-installed ray fix, the credential/install.sh behaviour, and the gate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
First hardware measurement (hand-run of the entrypoint, not a Hyperloom session). Ticket
Gate PASS (needle 3/3, 17*23 3/3, text half = reference established). Tctl 66 -> 54 C, MemAvailable 121 GiB -> low-water 90, 0 amdgpu fault/reset lines. Command: Since opening: |
|
Review from cl-buildenv, on ryzen: the CI log plus reruns in the CI image (
The rest (one ticket ≤ 40 min with |
…s; host_venv_fixup.sh - inkling-loom/box_inkling.sh: a failed registration now kills the server's process group right after the launch (setsid made it a session leader) -- server_launch_check's sanctioned remedy; the port is the first one nothing is bound to in 18400-18489, not one derived from $$. - tests/hyperloom_box_ticket_test.py: on a failing baseline, print the box status and logs instead of a KeyError on bench_summary.provenance (CI hid the cause that way). - tools/hyperloom/host_venv_fixup.sh: the ryzen preflight fix as a tool -- 1.2.0 takes /opt/venv/bin/python as the custom-framework benchmark interpreter whenever it exists; a refusing vllm shim in the run's venv plus ray[default]>=2.44.1 there makes it use that venv. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR Reviewer Guide 🔍(Review updated until commit 454f933)Here are some key observations to aid the review process:
|
|
Review from cl-inkling-npu, scoped to the box-memory safety of The RAM guard does not stop the server while the gauntlet runs. The guard subshell signals the script itself ( During the measurement, the foreground command is Repro of the same shape (trap on TERM, a guard that TERMs Either of these fixes it:
The same deferral applies to the short The rest of what I checked looks right:
|
…e CI KeyError) box_inkling.sh splices sensor values into a Python heredoc and fell back to 'null' when a sensor is missing -> NameError, no provenance.json, and the test's KeyError 'provenance' in CI (the strixhalo box has the sensor, so it never showed there). Fallbacks are None now, and HL_HWMON_ROOT lets the device-free test run without sensors, as CI does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Persistent review updated to latest commit 454f933 |
What
Hyperloom 1.2.0 (AMD-AGI/Hyperloom, 21 Nov) as the tuner for two engine workloads, with Hyperloom on the orchestration host (ryzen) and every measurement on the Strix Halo box (now the 1bit OS appliance: no compiler, shared by several lanes).
tools/hyperloom/box_ticket.sh(new, shared): one Hyperloom round = ONEssh strixhalo box-hold gpu [sudo -n] timeout -k 30 <=40min env <levers> ...ticket. Lever names and values are whitelisted per workload; nothing else crosses the ssh; a bad value is a failing report (exit 0), never a ticket. The ticket cap (45 min) is enforced; stopping the round kills the remote ticket by its id.tools/hyperloom/inkling-loom/(new): Inkling-2-Mini on the Loom route (loom-serve, hrx-loom 0.3.0, loom-fun card a8354e77).box_inkling.sh(declared RAM need 40 GB + 16 GB floor + watchdog, card overlay with the levers inmodel.json, provenance: hashes, exact command, power-mode line, Tctl, RAM low-water),gauntlet.py(vendored from the cl-loomfun box harness; keeps full replies),hl_score.py(score + fail-closed gate),levers.json(DSpark depth, rows x context preset, prefill capacity, completion spin / wait mode, pool backing, workers).llm.loomstores KV as f16.tools/hyperloom/custom/(ported):custom_radeon8060s.shis now the ticket wrapper (custom_strixhalo.shand the old box's gpu-hold FIFO are removed);box_bench.shchecks RAM + GTT room and runsbenchmark.pyagainst the installed payload (/opt/1bit-package/1bitalready has the layoutbenchmark.pyreads asHL_BUILD) in its own process group. KLD bar 0.01 (owner decision 22 Nov; was 1e-4):KLD_BARconstant,HL_GATE_KLD_BARfor hand runs — 1.2.0 refuses threshold-named pins, soHL_GATE_KLD_MAXis gone. Levers addub1024_b2048,dflash_ub1024,dflash_ub1024_b2048.bypass, Magpie and the single-node Ray layer; none of it is used any more.Tests
tests/hyperloom_box_ticket_test.py(registered): stubssh/box-hold/sudoand a fake loom-serve; runs both entrypoints end to end without a device — baseline passes and establishes the reference, a lever reaches the servedmodel.jsonthrough box-hold, a bad lever never reaches the box, a model that never registers is a failing report, a >45-min ticket is refused, a RAM need that does not fit is refused on the box side.tools/hyperloom/inkling-loom/hl_score.py --self-test(registered): the gate's halves, fail-closed paths, per-build references.tests/hyperloom_benchmark_test.pyunchanged and passing.bash scripts/pre-pr-checks.sh --base origin/main: 17 ok, 3 skipped (no private gpu-kernels tree here).Measured
Not run on hardware yet: the first hand-run ticket (Inkling baseline, card defaults) is queued on
box-hold gpubehind another lane's hold. Its numbers will be added as a comment with the ticket id and the command.Not in this PR
🤖 Generated with Claude Code