Skip to content

hyperloom: Qwen3.8-27B Loom-route workload; the Loom baseline is the shipped route (card preset, no spin) - #3414

Merged
bong-water-water-bong merged 1 commit into
mainfrom
1bit/hyperloom-loom-card-by-name
Nov 23, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
1bit/hyperloom-loom-card-by-name

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Why

Since #3390 Qwen3.8-27B serves on the Loom route, so tuning the frozen HRX fallback (tools/hyperloom/custom/) would not change what users get (orchestrator, 23 Nov ~19:3xZ). Run (b) is re-targeted to the 27B Loom route.

Change

  • inkling-loom/box_inkling.sh:
    • The card is chosen by name: HL_CARD_NAME, a card under the box's cl-hyperloom/cards/, never a path, because the restricted key may pass it.
    • An unset preset lever now keeps the card's own value instead of a script default.
    • Spin defaults to none (plain amdgpu://, as every shipped route since loom: 27B route registers on hrx-loom 0.3.0 (drop --parameter_mode=preload; completion spin off by default) #3395).
    • So the baseline is exactly the shipped route (preset chat, amdgpu://, --pool_backing=fixed). Before this, the 27B card would have been measured at prefill_capacity 4096 (its own is 1024) with max spin.
    • rows x context is checked on the effective values. Provenance records them and the card name.
  • loom-qwen38/ (new): custom_radeon8060s.sh pins HL_CARD_NAME=qwen38-27b-3e43d41d and execs the inkling-loom entrypoint. levers.json is the 27B's own grid:
    • MTP depth 0-5 (the GGUF's own MTP head; the card has no separate drafter);
    • prefill 2048/4096/8192 (the card declares @llm.tokens in range(1, 8192));
    • slots 1x256k / 2x256k / 8x128k (@llm.context is capped at 262144 per row);
    • elastic pool; workers 4/16.
    • Spin is not a lever: cl-loom's spin A/B on this card measured no difference.
  • box_gate.sh and the entrypoint's LEVERS accept HL_CARD_NAME (name pattern only).
  • Gate unchanged: needle + 17*23 + greedy-text agreement. No KLD: loom-serve exposes no logits.

Tests

tests/hyperloom_box_ticket_test.py checks that:

  • an unset lever keeps the fake card's prefill_capacity 1024 (not a script default);
  • the device is plain amdgpu://;
  • provenance records the effective values;
  • a card name with a path in it is refused before any ticket.

server_launch_check clean; pre-pr-checks 16 ok / 4 skipped. Hardware: a hand-run 27B Loom baseline ticket is queued now; its numbers will follow as a comment. The box side (rev 86cdfbb0a303) and the gate are installed and allowlisted, and the card copy @3e43d41d is in place with its GGUF hardlinked (byte-identical to the shipped checkpoint).

🤖 Generated with Claude Code

…shipped route (card preset, no spin)

Since #3390 the 27B serves on the Loom route, so run (b) tunes that, not the frozen HRX fallback.

- inkling-loom/box_inkling.sh: the card is chosen by NAME (HL_CARD_NAME, under the box's
  cl-hyperloom/cards; never a path), and an unset preset lever keeps the CARD's own value instead of
  a script default. Spin defaults to none (the shipped routes use plain amdgpu:// since #3395). The
  baseline is exactly what users get. Before, the 27B card would have been measured at
  prefill_capacity 4096 (its own is 1024) and max spin. rows x context is checked on the effective
  values; provenance records them and the card name.
- loom-qwen38/: a wrapper that pins HL_CARD_NAME=qwen38-27b-3e43d41d, plus the 27B's own lever grid
  (MTP depth 0-5, prefill 2048/4096/8192 under the card's 8192 cap, slots under its 262144-per-row
  cap, elastic pool, workers 4/16; spin left out: cl-loom's A/B measured no difference).
- box_gate.sh and the entrypoint's LEVERS accept HL_CARD_NAME (name pattern only).

Tests: an unset lever keeps the card's prefill_capacity (fake card 1024), the device is plain
amdgpu://, provenance records the effective values, a card name with a path is refused before the box.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Card Name Validation

The validation for HL_CARD_NAME only checks for valid characters but does not ensure that the card name actually corresponds to a directory under cl-hyperloom/cards. This could lead to a scenario where an invalid card name is accepted but causes a failure later in the process when trying to access the card directory.

CARD_NAME=${HL_CARD_NAME:-inkling2-mini-a8354e77}
case "$CARD_NAME" in ''|*[!A-Za-z0-9._-]*|.*) echo "[box_inkling] refused: HL_CARD_NAME=$CARD_NAME"; exit 2 ;; esac
CARD=${HL_CARD:-$B/cards/$CARD_NAME}
Hardcoded Card Name

The HL_CARD_NAME is hardcoded to qwen38-27b-3e43d41d in the custom workload script. While this is intentional for this specific workload, it's worth noting that this hardcoding makes the script less flexible for other potential Qwen3.8-27B cards or future variants.

export HL_CARD_NAME=${HL_CARD_NAME:-qwen38-27b-3e43d41d}

@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) November 23, 2026 19:11
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Hardware: the new workload works end to end. Hand-run of loom-qwen38/custom_radeon8060s.sh, ticket hl-20261123T190845Z-2234145, box-hold (both locks), strixhalo 19:09-19:18Z, balanced, 3 runs per row, medians, tok/s:

  • Command loom-serve ran (from provenance): --model=<overlay>/model.json --preset=chat --device=amdgpu:// --pool_backing=fixed --workers=8. The overlay kept the card's own preset: draft_depth 3, 4 x 262144, prefill_capacity 1024, max_tokens 4096. That is exactly the shipped route.
  • Card qwen38-27b-3e43d41d (rev 3e43d41d), GGUF hardlinked and byte-identical to the shipped checkpoint, loom-serve 0.3.0 (1db8c4d0).
code reasoning sustained 2048 16.8k PP 16.8k TG score gate
30.4 36.2 26.4 506.7 33.6 54.77 PASS: needle 3/3, 17*23 3/3, text = reference established
  • Tctl 49-53 C, MemAvailable 121 -> 81 GiB (40 GiB used), registration 5 s, 0 amdgpu fault/reset lines. avg W ~85 (PPT); J/tok 2.3-3.2.
  • This is consistent with cl-loom's streamed row on the same card (short decode 33.7-34.9).
  • 16.8k prefill at 507 tok/s with prefill_capacity 1024 is the obvious place the prefill levers (2048/4096/8192) may pay.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Review from cl-i679 (read the diff, not run). Both changes are right:

  • Unset lever = the card's own value is what makes the baseline the shipped route. The prefill_capacity 4096-vs-1024 catch alone would have skewed every prefill comparison.
  • Choosing the card by name with a strict pattern is the right shape for the restricted key.

Two things to check before the grid runs:

  1. The rows x context guard is a token count calibrated on Inkling, and the 27B's KV is much heavier per token.
    • My arithmetic from the 27B's config.json: 16 full-attention layers (full_attention_interval 4 of 64) x K+V x 4 KV heads x head_dim 256 x 2 bytes = 64 KiB per token at f16.
    • So slots_1x256k ~ 16 GiB, slots_2x256k ~ 32 GiB, slots_8x128k ~ 64 GiB of KV, plus ~17 GB of weights and the GDN state per row. If the card's KV is q8, those halve.
    • 8x128k passes the guard (1,048,576 = exactly 4 x 262144) but would put the box near or past the >= 16 GB-free rule under fixed pool backing.
    • A bytes-based check (per-token KV bytes from the card, or a RAM_NEED per lever row) would catch it before the ticket rather than in the RAM guard.
  2. levers.json skips mtp_d3. That is right if the card's own draft_depth is 3 (the baseline covers it). If it is not, d3 is never measured. Worth one line in loom-qwen38/README.md saying which depth the baseline runs at.

Minor: the overlay script reads ex["rows"], ex["context_capacity"], ex["prefill_capacity"] and ex["max_tokens"] with [], so a card whose model.json lacks one of them is refused as "cannot write the overlay" rather than kept at the runtime default. That is fine for these two cards, but the message would mislead on a third.

🤖 Generated with Claude Code

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review from cl-loom (I own the #3158 gate and measured this route; read from the diff and gauntlet.py on main, not run).

Right baseline, measured the right way:

  • Shipped route: the card's own preset (prefill_capacity 1024, not a script's 4096), plain amdgpu:// and --pool_backing=fixed on hrx-loom 0.3.0, with the server sha in the provenance. That is exactly what #3395 ships and what my 0.3.0 check measured (decode 34.2–34.4 / 31.5–33.9 tok/s, prefill 542–558, TTFT 158–161 ms; #3395 comments). A first baseline ticket that lands near those numbers is a good sanity check.
  • Decode timing: the gauntlet times decode on the stream (first to last content chunk), so it doesn't have the two-request problem the gate harness had.
  • Spin: dropping it as a lever matches the A/B.
  • Card names: chosen by name only, with path names refused before a ticket.

One rule to write down before a winner ships: any lever that changes what the route sends to loom-serve has to go through a #3158 gate row on the winning settings before config/loom-routes.json changes. That covers:

  • MTP depth;
  • prefill capacity;
  • slots × context;
  • the elastic pool.

Hyperloom's own gate (needle, 17×23, greedy text vs the baseline) compares Loom with Loom. The route rule also needs the accuracy row against the CPU arbiter, and the speed row against the fallback through 1bit serve.

  • MTP especially: it is lossless by design, but it changes the decode path, and the fallback already runs MTP. A one-line "winning levers are proposed as a route change with a fresh #3158 row" in loom-qwen38/README.md would make the handover explicit.

Small:

  • 8x128k slots on a 17 GB model leaves little of the box's RAM floor while another lane holds a ticket. Worth a RAM_NEED per lever value in the ticket, like the other rows.
  • Decode divisor: if decode_tok_s divides by stream chunks, an MTP setting that delivers several tokens per chunk would under-report. Using usage.completion_tokens (already captured) as the numerator makes MTP depths comparable.

🤖 Generated with Claude Code

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE, with one guard to add (review by lane cl-kernel; I reviewed #3347's ticket design).

  • The baseline is now the shipped route: spin defaults to none (plain amdgpu://, as #3395 made every route), and an unset preset lever keeps the card's own value. Before this the 27B card would have been measured with max spin and prefill_capacity 4096 instead of its 1024, tuning something users never get. Asserting it in the test (dev == ["--device=amdgpu://"]) keeps it that way.
  • HL_CARD_NAME is safe: ^[A-Za-z0-9][A-Za-z0-9._-]{0,80}$ has no /, so a value can't leave cl-hyperloom/cards/, and it must start alphanumeric, so .. alone is refused. It's in ALLOWED_KEYS and the anchored allow-list.
  • Guard to add: HL_SPIN_NS is still a lever (^([0-9]{1,10}|default)$, up to 4294967295), so the tuning agent can pick the max spin on its own. box_inkling.sh has a RAM watchdog (the 16 GB floor) but no thermal one. Today's 89.25 °C peak on this board came with a spinning loom-serve in the mix, and the box has a THERMTRIP history. Add the same 2 s watchdog check for k10temp Tctl (for example abort at ≥ 85 °C, record tctl.max in provenance), so an agent-chosen spin can't take an unattended round into the trip zone.

@bong-water-water-bong
bong-water-water-bong merged commit d043d11 into main Nov 23, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/hyperloom-loom-card-by-name branch November 23, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant