Skip to content

dgx-spark: P2, a unified machine plans against one pool; the census reads an integrated device's room from MemAvailable - #16

Closed
juliankang4 wants to merge 2 commits into
midagedev:mainfrom
juliankang4:dgx-spark-p2
Closed

juliankang4 wants to merge 2 commits into
midagedev:mainfrom
juliankang4:dgx-spark-p2

Conversation

@juliankang4

@juliankang4 juliankang4 commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

P2 of docs/contrib/dgx-spark.md, in the shape sketched on #13. Part of #13. It builds on #15: that pull request's
commit comes first on this branch, and the change here is the last commit.

On a DGX Spark the card and the host share one 128 GB memory, and the plan read it twice. The census took the card's
free bytes from cuMemGetInfo, and the host's checks took their own figure, so a plan could count the same bytes on
both sides (§3.3). cuMemGetInfo also leaves out page cache there, so even a whole-on-card load saw far less room than
it had: with about 50 GB in page cache the census read 45.5 GB free, and the Qwen3 seat cut its default context to
253,952 of 262,144 positions. The measurement behind the change is on #13: allocations kept succeeding after
cuMemGetInfo read a few GB free, and MemAvailable predicted how far they went to within 0.5 GB.

  • census() reads CU_DEVICE_ATTRIBUTE_INTEGRATED into DeviceInfo::integrated. On an integrated device the free
    reading is the host's room (host_available: MemAvailable and the cgroup levels), read on the primary context like
    the cuMemGetInfo reading it replaces, so capped still adds the context's own cost back once. CardSpec carries
    the flag from spec_of_device. Gpu::alloc_room gives the same reading to the load-time fits that refuse an
    allocation before making it: qwen35moe's ubatch arena, the GLM and MiMo prompt groups' units, MiMo's resident
    sequence stores and V4.1's batch attention buffers. The GLM and MiMo prompt_bytes reports of what those units came
    out of read it too.
  • Machine gains unified: Option<UnifiedPool> (UnifiedPool { bytes }, M4's shape cut to what P2 reads). Its doc and
    the one on host say both describe this process's node. workstation::unified_of sets unified from an integrated
    card spec, and workstation::host_of makes the host the pool itself on such a machine, with no OS reserve, because the
    reading already leaves out what the OS and every other process hold. An integrated spec with no free reading has no
    pool to plan against, so the two panic by name there; a spec from the census always carries the reading. plan_on,
    tiered and the qwen3moe and qwen35moe machines use the two; every other Machine literal gets unified: None.
  • Each side may fit its own figure while both read the same bytes, so the sum is held once:
    • Plan::violations gains PoolOver: the cards' CardOver totals with their margins, re-derived from the rows, and
      the host's whole need, the NVMe split's arena and window included, must fit the pool, with each card's context self
      cost added back as capped adds it. Plan::violations_beside adds what a plan's maker holds beside the plan and
      checks against the card itself: the qwen35moe MTP draft, the GLM prompt front (through checked_beside, which is
      checked with those bytes) and the GLM NextN draft with its arena and the front pass theirs. The NextN plan checks
      the host against the host's own bound, as violations does, so a plan past the pool is refused once.
    • HostNeed gains cards (from HostTotals::pool_card_bytes): the cards' share of the pool, with the reserve the
      plan's maker kept beside the plan, under the expert rule or with every routed expert on the host
      (plan_host_routed_reserving, which qwen35moe's Experts::Host arm calls with the MTP and slot reserve).
      Everything that reads the host's need then leaves the cards their share: the plan's host headroom, the load's host
      check before any upload, the residency rules' room, the prompt cache's default budget and the NVMe split's room. It
      is 0 on any other machine.
    • A whole load has no host plan, so Machine::whole_card sizes it with the host's reserves on the card. The qwen3
      seat's whole fit now counts the checkpoints its qwen35moe sequences pin.
  • Tests:
    • a_unified_pool_holds_card_and_host_together (bloomery-placement). With an expected sum computed from the
      model's bytes and every term (cache, context, scratch, a card reserve, margin, ring shadows, a host reserve, an NVMe
      arena and window, bytes beside the plan), a plan at a pool of exactly that sum is clean, one byte under is one
      PoolOver naming each term, and the plan's host headroom is what the pool leaves. It holds with 6 and with 12
      experts on the card, and with a context term below CONTEXT_SELF and with CONTEXT itself, where the pool adds
      back CONTEXT_SELF and not the whole term.
    • an_integrated_card_plans_against_one_pool and an_integrated_card_with_no_reading_has_no_pool (workstation):
      unified_of, host_of and Machine::whole_card for a census device, integrated and not, and the named panic.
    • a_drafted_plan_on_one_pool_counts_the_draft_once (tests/qwen4exp_mtp_reserve.rs) and
      slot_plans_on_one_pool_count_the_bytes_beside_once (glm5next) hold the callers that pass bytes beside the plan.
      Each plans at a pool equal to the need the plan's own host headroom counts, then one byte under it. The first is
      clean; the second is one PoolOver whose beside is the caller's bytes. The cases are the MTP draft under both
      expert rules at one and two slots, the GLM front alone, and the NextN layer with its arena, its routed experts on
      the host and the front.

On a card with memory of its own nothing moves: integrated is false, unified_of is None, host_of is
workstation::host(), HostNeed::cards is 0, the bytes beside a plan reach only PoolOver, Machine::whole_card is
the first card, and Gpu::alloc_room is cuMemGetInfo's free bytes. The reserve plan_host_routed_reserving passes
reaches only Fill::run's card budget, and with every routed expert on the host that fill has nothing to place.
plan_tiers_is_plan_bp_a_and_gate still holds plan_a, plan_gate and plan_bp equal to their bodies field for
field.

Where this differs from the sketch on #13:

  • The placed fill (Fill::run) keeps its card budget. On one pool, an expert costs the same bytes on the card or on the
    host, so the split does not change the sum, and PoolOver refuses the sum by name. A smaller card budget would only
    move experts to the slower side. (For a type whose card format is larger than its file bytes, such as Q5_0, the card
    side costs more, and the sum is then a little high: a refusal can come early, never late.)
  • whole_need keeps its budget too; the host's reserves come to it as card reserves instead (Machine::whole_card).
  • No page-cache drop after whole loads. The kernel gives the cache back on demand, and with the room read from
    MemAvailable the cache already counts as room.

Left out on purpose:

  • Gpu::mem_info still reads cuMemGetInfo where it measures device bytes: the host_stats record's vram_free,
    the gates' device deltas and memguard holds, and V4.1's draft load. That last one is a free-bytes delta across the
    load, which the DSpark gate checks against its plan's reserve. On GB10 the page cache the load fills could land in
    that delta, but V4.1 is not a Spark seat, so I left it.
  • The XStream ring keeps its own cuMemGetInfo reading. It is not a fit for a planned need: it sizes itself to what
    is free past KEEP_FREE. On one pool, alloc_room would let it take the host headroom the plan hands to the prompt
    cache and the residency rules. cuMemGetInfo reads less there (it leaves out page cache), so the ring comes out
    smaller or is refused under MIN_HALF, and with BLOOMERY_XSTREAM unset the qwen3.8 seat then admits instead of
    splitting. Holding the ring to the plan means counting it in that seat's plan, which I left for when the seat runs
    on a Spark.
  • A model above the pool is refused by name instead of being sized onto the NVMe tier. The split now leaves the cards
    their share, but the NVMe tier on one pool is P4's (section 7).
  • The seats P2 runs are qwen3 (Qwen3-30B-A3B and Qwen3.6-35B-A3B) and decide (Clef-Flash), all whole on the card. The
    placed seats (Qwen3.8, GLM-5.3, V4.1, MiMo) get the same machine and the same sum, but I have not run them on the
    Spark.

What I ran into

None of these block this pull request. I'm writing them down because they cost me time, and you may want to change
some of them.

  • Bytes beside the plan. Several makers size a term outside the plan and check the card's bound on their own: the MTP
    draft's reserve, the NextN draft with its arena and the prompt front, a whole load's checkpoints, the residency churn
    pool. On a card with memory of its own, each side's own check was enough. On one pool every one of them had to reach
    the sum by its own path, which is why this change has three: violations_beside for the plan makers,
    HostNeed::cards for what sizes itself from the host's room, and Machine::whole_card for whole loads. If a plan
    carried the bytes its maker holds beside it (on CardTotals, say), violations would see them, and the makers would
    not need to filter CardOver and add their terms back. I didn't make that change, since it moves your planners. Two
    of the review's points, the GLM front and the Experts::Host reserve, were misses of this kind.
  • Two binaries are named bloomery-serve. crates/serve builds the mock engine under that name, and crates/gpu-gates
    builds the seats. The host-nightly unit tools/gate.sh --release --locked -p bloomery-serve writes the mock over
    target/release/bloomery-serve. After that, bloomery-serve --model qwen3 stops with
    qwen3: io error: No such file or directory (os error 2), and -m <clef file> starts "mock engine" and answers 404
    on /v1/systemone. I hit this by running the host units after the oxide build. cargo only warns about the collision
    when one invocation builds both. A different name for the mock would remove the trap.
  • A unified plan moves with the reading. On the Spark the card's room and the host's are both host_available, so two
    runs can plan different defaults when other processes hold different amounts. BLOOMERY_HOST_ROOM replaces that
    reading for the census too, so it pins the whole plan, card and host, and a plan made at a fixed room stays fixed.
  • CONTEXT_SELF is the A6000's 271 MiB. On the GB10 a primary context took 197 to 233 MiB of MemAvailable (five
    retains in one process, cuDevicePrimaryCtxRetain to release), so the add-back overstates the pool by about 50 MiB,
    inside the card's context term and margin. I left the constant alone.

Code shape

  • No second copy. The room comes from the one host reader (host_available), for the census and the load-time
    fits alike (integrated_room); the pool's figure is the card spec's census reading, through one owner
    (workstation::unified_of); the cards' share is counted once in totals and read through HostNeed.
  • Model code holds only architecture facts. The qwen3moe and qwen35moe machines call the two workstation
    functions, and the MTP and NextN plans pass the bytes they already hold beside the plan; nothing in them knows
    about GB10.
  • Dead code is gone.
  • No silent failure. A plan past the pool is a named PoolOver; a load short of the pool is the load's named
    host refusal, with the cards' share as its own term; a failed host read in the census is a plan error naming it;
    an integrated spec with no reading is a named panic.
  • Comments state what is true now.
  • No relaxed gate.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up.

Duplication found or removed: none.

What I ran

On a Mac with the pinned nightly and the CUDA 13.3 headers:

just mac-static upstream/main
mac-static: fmt-check rc 0 in 4 s — rustfmt diff blocks: 0
mac-static: lint rc 0 in 12 s — mac-check: lint ^warning: 41 = the ratchet 41 in tools/lint-ratchet.txt; target <tree>/target, 15 bloomery crates checked or compiled
mac-static: combos rc 0 in 27 s — mac-check: combos rc 0; 16 shapes run, 0 red, 28 skipped (scoped), in 27 s (recipes.py combos: 16 of 37 commands to run, 203 distinct (package, target, mode, features) tuples, 7 green in the ledger, 14 with no input changed since bdabe9ad7, 7 left out by name)
mac-static: check-arch rc 0 in 7 s
mac-static: check-comments rc 0 in 8 s
mac-static: check-defaults rc 0 in 0 s
mac-static: check-levers rc 0 in 5 s
mac-static: check-loads rc 0 in 56 s
mac-static: check-recipes rc 0 in 468 s
mac-static: check-rustflags rc 0 in 0 s
mac-static: check-unsafe rc 0 in 1 s
mac-static: check-waits rc 0 in 0 s
mac-static: total 468 s, base upstream/main, ledger ~/.cache/bloomery/mac-static-ledger.tsv
mac-static: ok
BLOOMERY_CHECK_TARGET=aarch64-unknown-linux-gnu tools/mac-check.sh check
mac-check: check rc 0; target <tree>/target, 15 bloomery crates checked or compiled
cargo test -p bloomery-placement
test result: ok. 86 passed; 0 failed

FAIL-first, each change reverted on its own, each red in its test (the model crate's on the Spark; the rebase onto
current main changed none of the lines they revert):

  • the PoolOver push disabled: context 1000, 6 experts on the card: [], not one PoolOver;
  • the host's pool need without the NVMe arena: context 1000, 6 experts on the card: [], not one PoolOver;
  • pool_card_bytes left at 0: the headroom clause fails (left: 8612, right: 12);
  • PoolOver without the bytes beside the plan: context 1000, 12 experts on the card: [], not one PoolOver;
  • the pool adding back the whole context term instead of CONTEXT_SELF, and the cards' share less the whole context
    term: a_unified_pool_holds_card_and_host_together at CONTEXT;
  • Machine::whole_card without the host's reserves, unified_of ignoring integrated, host_of keeping
    workstation::host(): an_integrated_card_plans_against_one_pool;
  • unified_of without the panic: an_integrated_card_with_no_reading_has_no_pool;
  • plan_slots passing no front, plan_nextn_slots passing nothing beside, its draft's host experts left out of the
    bytes beside or of the host headroom, and its host bound counting the cards' share again ([PoolOver { .. }, HostOver { .. }] for the one overrun): slot_plans_on_one_pool_count_the_bytes_beside_once;
  • the Experts::Host arm dropping reserve, and the MTP callers (one slot and slots) passing nothing beside:
    a_drafted_plan_on_one_pool_counts_the_draft_once.

On the DGX Spark, in the container #14 describes:

  • The tools/recipes.py host-nightly units pass in all 19 crates. After the review changes and the rebase,
    bloomery-placement (86 passed) and bloomery-model (267 passed, 104 ignored) pass again.
  • bloomery-serve (cargo oxide build --arch sm_86 -- -p bloomery-gpu-gates --features glm5next,clef,vision,mimo2 --release --bin bloomery-serve), each model whole on the card, with about 48 GB of model files in page cache:
Model Card room the plan read, before → after Default context, before → after Answers
Qwen3-30B-A3B-Instruct-2507 Q4_K_M 45.5 GB → 124.4 GB 253,952 → 262,144 "Paris", "서울", a three-sentence answer
Qwen3.6-35B-A3B Q4_K_M (whole fit at 262,144 before too) → 122.1 GB 262,144 "Paris" with thinking off and on, "서울"
Clef-Flash Q8_0 28.7 GB → 124.2 GB 16,384 (the seat's) web_search 0.9823, calculator 0.9545, as before

"Before" is #15's tree with the same models; the page cache and the readings differ between runs, so the before and
after rooms are not one moment's. Qwen3.6's whole fit now carries reserves 8589934592 B: the two slots' checkpoints,
which it did not count before.

The P2 golden (§5, answers 6 and 14). Until the tape is published, P2's criterion is "answers, plan clean, PoolOver
holds", which the table and the tests above cover. Before that tape is recorded, one finding matters for it: the Spark
does not give the A6000's bits for the same file, head and commit. The public files I could check are bartowski's
Q4_K_M and Q3_K_S at rev d7f376ea (sha256 equal to the Hub's LFS oids), with joint_head.safetensors, on the 15
requests of suite.jsonl and suite-ko.jsonl. The rows e2e.py reads are not published, so I compared what
tools/ref/clef/agreement.md prints for the A6000:

File Question Official BF16 (table) A6000 (table) DGX Spark
Q4_K_M review-05/risk "1" 0.474 "0" 0.524 "0" 0.5275
Q4_K_M sentiment-07/bug_report yes 0.512 no 0.484 no 0.4880
Q3_K_S review-05/risk "1" 0.474 "0" 0.479 "0" 0.4862
Q3_K_S sentiment-07/bug_report yes 0.512 no 0.487 no 0.4877

The tops match and the probabilities differ in the third decimal. The gap is between the machines, not in the engine
changes since the table: bccbc49c, the commit that wrote agreement.md, built on the Spark gives the same response
bodies as this branch on all 15 requests for both files. The only fields that differ are confidence, model and
timings, and e2f33c1c changed the first two on purpose. To build bccbc49c there I added only the aarch64 changes
of #14 and #15 to the host crates; its card code and head are as they were. Repeated runs on the Spark are
byte-identical apart from timings.

I did not measure where the GB10 and the A6000 part. The kernels use ex2.approx and f16 MMA with f32 accumulation,
and both may round differently between architectures; the q8_1 step on activations can then turn a last-bit difference
into a whole quantization step. That is a guess. Either way, a tape recorded on the A6000 will not replay byte for byte
on a Spark with these kernels. A tape recorded on a Spark, or a check of the tops with a bound on the probability gap,
would work as the P2 criterion. I can attach the Spark's rows.json for either.

Not run: the GPU gates just affected selects, and just stage-gpu-load-v41, which a change to workstation.rs or
crates/model/src/placement.rs names (AGENTS.md "Weekly and opt-in"). They need the box.

Hardware

The DGX Spark of #14 (NVIDIA GB10, DGX OS 7.6.0, driver 595.84), in its CUDA 13.3.1 container. No speed numbers here.

AI help

An AI coding agent wrote the code changes and this description and ran the commands above on my machines. I did the
code review of the diff and the review of this pull request myself.

@midagedev midagedev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you. On a card with its own memory nothing moves; we checked each hunk. The pool sum is right in its main terms. Four things before we land it:

  1. crates/model/src/arch/glm5next/place.rs:458: checked(plan) does not pass front to the pool check. Only the NextN path (:796) passes it, so a GLM plan without the draft can exceed the pool by the front.
  2. crates/model/src/arch/qwen35moe/place.rs:485: the Experts::Host arm (plan_host_routed) drops reserve. The MTP draft and the plan_with_slots rows then miss HostNeed::cards.
  3. Four load-time fits still refuse on Gpu::mem_info, which leaves out page cache on GB10: gpu-glm5next/src/prefill.rs:1413, gpu-mimo2/src/body.rs:1025, gpu-mimo2/src/prefill.rs:525, gpu-deepseek41/src/chain/attn/batch.rs:669. Please move them to alloc_room, or list them in the description as left out. The description now says the other users are gate deltas and the V4.1 draft fit.
  4. Tests for the hunks no test holds: the context self-cost path with the real CONTEXT (512 MiB) against CONTEXT_SELF, Machine::whole_card, unified_of/host_of, and a caller that passes bytes to violations_beside. One red per removed term is enough.

Smaller: on an integrated device with no free reading, host_of falls back to this workstation's host(). A named error is better there, even though no path reaches it today.

midagedev added a commit that referenced this pull request Oct 10, 2026
… pool invariant as #16 builds it, above the pool the card computes the NVMe tier (section 7, with its read-rate rule), several Sparks ×2/×4 (section 8: three splits, seven scaling criteria held by a placement unit gate at N = 1, 2, 4), phases P4 and P5, answers 10–14, the published reference sets

Reviewed by a Claude Fable round against #13, #16 and the code; its findings are applied.

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

Copy link
Copy Markdown
Owner

One more line for #16, from our multi-node design (section 8 of docs/contrib/dgx-spark.md): Machine::unified describes the pool of this process's node. Linked Sparks come later as Machine.nodes, with #16's host and unified as nodes[0]; we do that move ourselves. A doc line on the field is enough for now.

midagedev added a commit that referenced this pull request Oct 10, 2026
…esign: sourced link facts (×2 direct, ×3 ring, ×4 switch; no GPUDirect RDMA on GB10), Machine { nodes, fabric } with #16's pool as nodes[0], derived bands per split at N = 1, 2, 4, the recommendation ((a) star for one request, (b) as a second mode), transport, one criteria list held by nodes_scale, the contributor's first measurements; section 3.3's copy sites re-read at cce176c

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rror (design S); swiglu and dot_f32 without AVX2 keep the kernels' bits

supports is has_kernel off x86_64, so fuses admits the host union's stacks and the matmul dispatch's rows there. Tile,
r8 and row-lane calls keep has_features, false off x86_64, and take the scalar paths they already have; the union's r8
cost asks has_tile(Q3_K), as its siblings do, so a scalar r8 group costs its bytes once a column.

swiglu and swiglu_clamp without AVX2+FMA ran silu through libm's exp, one ulp off ik's v_expf on some inputs
(swiglu_clamp_matches_ik_rule); they take expf_ik_scalar, v_expf's bits, as the card rule's swiglu does. dot_f32
without AVX2+FMA returned None and its callers summed left to right, 3.8e-6 off the router pin in tests/moe.rs; it runs
the kernel's eight lanes one value at a time.

quantize_col_random_bit_identical, hw_v_expf_equals_expf_ik_over_f32_range and
hw_card_swiglu_clamp_scalar_matches_avx2 only compare an AVX2 path with its mirror, so they are x86_64-only.
hw_union_q6_k_down_matches_per_column names the row lanes a CPU lacks after its values instead of passing.
…us reads an integrated device's room as the host's

On an integrated device cuMemGetInfo leaves out the page cache the kernel hands back to a device allocation, so the
census read far less than a load can take: 45.5 GB free on a 128 GB DGX Spark with about 50 GB in page cache, and the
Qwen3 seat cut its default context to 253,952 positions. census reads CU_DEVICE_ATTRIBUTE_INTEGRATED, and on such a
device it takes the host's room (host_available: MemAvailable and the cgroup levels) on the primary context instead.
Gpu::alloc_room gives the same reading to the load-time fits that refuse an allocation before making it (the qwen35moe
ubatch arena, the GLM and MiMo prompt groups' units, MiMo's resident sequence stores, V4.1's batch attention buffers)
and to the GLM and MiMo prompt_bytes reports of what those units came out of. What measures device bytes keeps
cuMemGetInfo (Gpu::mem_info), and so does the XStream ring, which sizes itself to what is free.

Machine gains unified: Option<UnifiedPool>, the pool of this process's node, from the card spec
(workstation::unified_of) in plan_on, tiered and the qwen3moe and qwen35moe machines; there the host is the pool, with
no OS reserve (host_of). An integrated spec with no free reading panics there by name. Every other machine gets unified:
None, so no plan on a card with memory of its own moves.

On one pool each side may fit its own figure while both read the same bytes, so the sum is held once:
- Plan::violations: PoolOver holds the cards' totals with their margins, re-derived from the rows, and the host's
  whole need (the NVMe split's arena and window too) to the pool. violations_beside (checked_beside where a family
  checks the plan whole) adds what a maker holds beside the plan; the qwen35moe MTP draft, the GLM prompt front and
  the GLM NextN draft with its arena pass theirs. The NextN plan checks the host against its own bound, as violations
  does, so a plan past the pool is refused once.
- HostNeed gains cards (HostTotals::pool_card_bytes): the cards' share of the pool, with the reserve the maker kept
  beside the plan, under the expert rule or with every routed expert on the host (plan_host_routed_reserving). The
  plan's host headroom, the load's host check before any upload, the residency rules' room, the prompt cache's default
  and the NVMe split all leave the cards their share.
- A whole load has no host plan: Machine::whole_card sizes it with the host's reserves on the card, so the qwen3
  seat's whole fit counts the checkpoints its sequences pin.

a_unified_pool_holds_card_and_host_together pins the sum term by term and the host headroom to the byte, on a context
term below CONTEXT_SELF and on CONTEXT; an_integrated_card_plans_against_one_pool pins unified_of, host_of and
whole_card on a census device, an_integrated_card_with_no_reading_has_no_pool the panic;
a_drafted_plan_on_one_pool_counts_the_draft_once (qwen35moe MTP, both expert rules) and
slot_plans_on_one_pool_count_the_bytes_beside_once (GLM, with and without NextN) hold a plan at a pool of exactly the
need its host headroom counts and refuse it once, naming the bytes beside the plan, one byte under.

The levers row of BLOOMERY_HOST_ROOM names the census and the load-time allocation fits among its readers.
tools/unsafe-ratchet.txt: gpu 1658 -> 1659 blocks for the census's attribute read, with its PIN line.
@juliankang4

Copy link
Copy Markdown
Collaborator Author

Thanks for going through every hunk. All four points and the smaller one are fixed in the P2 commit (now 45b002c9),
and the branch is rebased onto current main (bdabe9ad). #15's commit comes first with its content unchanged
(3e5915cc here). I left #15 itself alone, since it lands with your gate run. The description is updated to match.

  1. plan_slots now checks the plan with checked_beside(plan, front). That is checked with bytes for
    violations_beside, and checked is the same call with 0.
  2. The Experts::Host arm calls a new placement::plan_host_routed_reserving, which keeps reserve as
    plan_routed_reserving does. With no expert fill on the card, reserve reaches only Fill::run's budget, and
    spread returns at once on an empty eligible. So a card with its own memory plans exactly as before, and on one
    pool the MTP draft and the plan_with_slots rows are now in HostNeed::cards.
  3. All four fits now read Gpu::alloc_room, and so do the GLM and MiMo prompt_bytes reports of what those units
    came out of. The other mem_info readers measure device bytes, and the description lists them under "Left out on
    purpose". One of them may need your call: XStream::new reads cuMemGetInfo on its own and sizes the ring to what
    is free, rather than checking a planned need. On one pool alloc_room would let the ring take the host headroom
    the plan hands to the prompt cache, so I left it as it is and wrote down why.
  4. Tests, each red when its term is removed (the FAIL-first list is in the description):
    • a_unified_pool_holds_card_and_host_together now also runs at CONTEXT, where the pool adds back CONTEXT_SELF
      and not the whole term.
    • an_integrated_card_plans_against_one_pool covers unified_of, host_of and Machine::whole_card on a census
      device, integrated and not.
    • a_drafted_plan_on_one_pool_counts_the_draft_once (MTP, both expert rules) and
      slot_plans_on_one_pool_count_the_bytes_beside_once (the GLM front, and NextN) cover the callers that pass bytes
      to violations_beside. Each plans at a pool of exactly the need its host headroom counts, then one byte under.
      The first is clean, and the second is one PoolOver naming the caller's bytes.

Smaller: unified_of, and through it host_of, now panics by name on an integrated spec with no reading. I chose a
panic over an error because plan_on, tiered and the two qwen machine builders return Machine. A Result would
change about a hundred call sites for a state that no path builds: the census always fills the reading, so only a
hand-made CardSpec reaches it. If you prefer the Result, I'll make that change. Another option is a type where the
integrated flag carries its reading, so the state cannot be built at all.

Machine::host and Machine::unified now say in their docs that they describe this process's node.

The GLM test also found one more problem. On one pool, plan_nextn_slots tested HostOver against its host headroom,
and that headroom includes the cards' share. A plan over the pool was therefore refused twice, once as PoolOver and
once as a HostOver whose total included the cards. The check now uses the host's own bound, as Plan::violations
does, so the overrun is reported once.

On the P2 tape (answer 14), before you record it: the Spark does not give the A6000's bits. With bartowski's Q4_K_M
and Q3_K_S at rev d7f376ea and the release head, the tops match agreement.md but the probabilities differ in the
third decimal (review-05/risk 0.5275 against 0.524 on Q4_K_M). bccbc49c, the commit that wrote that table, gives
the same bodies on the Spark as this branch, so the gap is between the machines. An A6000 tape will not replay byte for
byte on a Spark with these kernels. A tape recorded on a Spark, or the tops with a bound on the probability gap, would
work. The description has the numbers.

On the DGX Spark container, bloomery-placement (86) and bloomery-model (267, 104 ignored) pass with this
code. On the Mac, just mac-static upstream/main and the aarch64 check pass. I could not run the GPU gates just affected selects or just stage-gpu-load-v41.

@midagedev

Copy link
Copy Markdown
Owner

Thank you very much, Julian. This is careful work, and it helps the project a lot. You fixed every point, added the tests with FAIL-first, and found the double refusal in plan_nextn_slots on your own. We are truly grateful.

Your three questions:

  1. Keep the named panic. The census always fills the reading, so no real path reaches it. A type that carries the reading is better. We will track it as a follow-up, not in this PR.
  2. Agreed on XStream::new. On one pool the ring should be sized from the plan, not from alloc_room. We will track that as a follow-up too.
  3. The tape: a gap in the third decimal between the A6000 and the Spark is expected. Please record the P2 tape on the Spark. We will check the tops, with a bound on the probability gap.

#15 lands first with our gate run. I am reviewing 45b002c9 now, and I will run the gates once #15 is on main.

@juliankang4

Copy link
Copy Markdown
Collaborator Author

Thank you for the answers, and for landing #15.

I recorded the P2 tape on the Spark. Each request of suite.jsonl and suite-ko.jsonl (15 in all) went through the decide seat with bartowski's Clef-Flash files at rev d7f376ea and the release's head:

Q4_K_M Cloudflare_clef-flash-Q4_K_M.gguf, sha256 45f803cbcb6144784653bc31cde957e0d184d963a5198d423dc589a79e178d45
Q3_K_S Cloudflare_clef-flash-Q3_K_S.gguf, sha256 a3da346b670ba23230efacb0ba4ad7f6791de97d3fa3b52f2b95df76d5393e9b
head Cloudflare/clef-flash rev 8b2e5fd1, joint_head.safetensors, sha256 19cdcec8c81dc9212be320fff47462ab342fbc1278be4368fb3da71241cf5ba0
code this PR's commit on today's main (3912d50f), the same patch as 45b002c9 (git range-diff shows =)
build cargo oxide build --arch sm_86 -- -p bloomery-gpu-gates --features glm5next,clef,vision,mimo2 --release --bin bloomery-serve in a CUDA 13.3.1 container
server bloomery-serve -m <file> --head joint_head.safetensors --port 8093, every BLOOMERY_* unset
machine DGX Spark (GB10), driver 595.84, the .target sm_86 PTX JIT-compiled by the driver

I ran each file twice. e2e.py same reads SAME 15/15 between the two runs of each file, and SAME 15/15 against the runs at the earlier head 5f4b44de that I attached before, so the review changes left the answers alone. The two questions the A6000 table lists read as before:

File Question DGX Spark
Q4_K_M review-05/risk "0" 0.5275
Q4_K_M sentiment-07/bug_report no 0.488
Q3_K_S review-05/risk "0" 0.4862
Q3_K_S sentiment-07/bug_report no 0.4877

The rows.json of the first run of each file is below (sha256 of the files as written: Q4_K_M 5cebc78f0a15672dfbd773273ac691114593142a149e2422bbbfe3c0248c7c0c, Q3_K_S c22deb0002a51b5ee4d760d4194d4750e739c56ff308b84c7323a2d69963040d). They are in the shape run writes, without the ref and wall_ms fields, since I don't have the official rows; same reads only suite, id and raw. The JSON below is indented for reading, and raw holds each body byte for byte.

The P2 commit applies to today's main as it is (git merge-tree is clean). I haven't pushed a rebase, so the head you are reviewing stays 45b002c9. If you would rather have the branch on main, I can push it.

Q4_K_M rows.json
[
 {
  "suite": "en",
  "id": "route-01",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"department\":{\"type\":\"choice\",\"choice\":\"technical\",\"confidence\":0.9095,\"probabilities\":{\"billing\":0.0453,\"technical\":0.9547}},\"urgency\":{\"type\":\"score\",\"score\":1.7756,\"confidence\":0.6634,\"legend\":{\"0\":\"Can wait\",\"1\":\"This week\",\"2\":\"Today\"},\"probabilities\":{\"0\":0.0741,\"1\":0.0761,\"2\":0.8498}},\"outage\":{\"type\":\"noul\",\"noul\":0.85}},\"usage\":{\"input_tokens\":300,\"output_tokens\":0},\"timings\":{\"prompt_n\":300,\"prompt_ms\":152.721023,\"head_ms\":48.428737999999996,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "department": {
     "type": "choice",
     "choice": "technical",
     "confidence": 0.9095,
     "probabilities": {
      "billing": 0.0453,
      "technical": 0.9547
     }
    },
    "urgency": {
     "type": "score",
     "score": 1.7756,
     "confidence": 0.6634,
     "legend": {
      "0": "Can wait",
      "1": "This week",
      "2": "Today"
     },
     "probabilities": {
      "0": 0.0741,
      "1": 0.0761,
      "2": 0.8498
     }
    },
    "outage": {
     "type": "noul",
     "noul": 0.85
    }
   },
   "usage": {
    "input_tokens": 300,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 300,
    "prompt_ms": 152.721023,
    "head_ms": 48.428737999999996,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "invoice-02",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"status\":{\"type\":\"choice\",\"choice\":\"overdue\",\"confidence\":0.9624,\"probabilities\":{\"paid\":0.016,\"overdue\":0.975,\"draft\":0.009}},\"large\":{\"type\":\"noul\",\"noul\":0.9748}},\"usage\":{\"input_tokens\":260,\"output_tokens\":0},\"timings\":{\"prompt_n\":260,\"prompt_ms\":143.75174900000002,\"head_ms\":55.165801,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "status": {
     "type": "choice",
     "choice": "overdue",
     "confidence": 0.9624,
     "probabilities": {
      "paid": 0.016,
      "overdue": 0.975,
      "draft": 0.009
     }
    },
    "large": {
     "type": "noul",
     "noul": 0.9748
    }
   },
   "usage": {
    "input_tokens": 260,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 260,
    "prompt_ms": 143.75174900000002,
    "head_ms": 55.165801,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "tool-03",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"tool\":{\"type\":\"choice\",\"choice\":\"web_search\",\"confidence\":0.9755,\"probabilities\":{\"web_search\":0.9817,\"calculator\":0.0038,\"calendar\":0.0063,\"none\":0.0082}}},\"usage\":{\"input_tokens\":188,\"output_tokens\":0},\"timings\":{\"prompt_n\":188,\"prompt_ms\":94.000865,\"head_ms\":54.449384,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "tool": {
     "type": "choice",
     "choice": "web_search",
     "confidence": 0.9755,
     "probabilities": {
      "web_search": 0.9817,
      "calculator": 0.0038,
      "calendar": 0.0063,
      "none": 0.0082
     }
    }
   },
   "usage": {
    "input_tokens": 188,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 188,
    "prompt_ms": 94.000865,
    "head_ms": 54.449384,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "guard-04",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"injection\":{\"type\":\"noul\",\"noul\":0.9529},\"severity\":{\"type\":\"score\",\"score\":1.7826,\"confidence\":0.6739,\"legend\":{\"0\":\"Harmless\",\"1\":\"Suspicious\",\"2\":\"Malicious\"},\"probabilities\":{\"0\":0.055,\"1\":0.1073,\"2\":0.8376}}},\"usage\":{\"input_tokens\":233,\"output_tokens\":0},\"timings\":{\"prompt_n\":233,\"prompt_ms\":127.799924,\"head_ms\":50.373267999999996,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "injection": {
     "type": "noul",
     "noul": 0.9529
    },
    "severity": {
     "type": "score",
     "score": 1.7826,
     "confidence": 0.6739,
     "legend": {
      "0": "Harmless",
      "1": "Suspicious",
      "2": "Malicious"
     },
     "probabilities": {
      "0": 0.055,
      "1": 0.1073,
      "2": 0.8376
     }
    }
   },
   "usage": {
    "input_tokens": 233,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 233,
    "prompt_ms": 127.799924,
    "head_ms": 50.373267999999996,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "review-05",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"risk\":{\"type\":\"score\",\"score\":0.5254,\"confidence\":0.212,\"legend\":{\"0\":\"Low\",\"1\":\"Medium\",\"2\":\"High\"},\"probabilities\":{\"0\":0.5275,\"1\":0.4197,\"2\":0.0529}},\"needs_human\":{\"type\":\"noul\",\"noul\":0.2522}},\"usage\":{\"input_tokens\":252,\"output_tokens\":0},\"timings\":{\"prompt_n\":252,\"prompt_ms\":137.546638,\"head_ms\":31.982449000000003,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "risk": {
     "type": "score",
     "score": 0.5254,
     "confidence": 0.212,
     "legend": {
      "0": "Low",
      "1": "Medium",
      "2": "High"
     },
     "probabilities": {
      "0": 0.5275,
      "1": 0.4197,
      "2": 0.0529
     }
    },
    "needs_human": {
     "type": "noul",
     "noul": 0.2522
    }
   },
   "usage": {
    "input_tokens": 252,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 252,
    "prompt_ms": 137.546638,
    "head_ms": 31.982449000000003,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "ko-06",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"intent\":{\"type\":\"choice\",\"choice\":\"refund\",\"confidence\":0.8255,\"probabilities\":{\"refund\":0.8691,\"tracking\":0.0192,\"cancel\":0.1058,\"other\":0.0059}},\"angry\":{\"type\":\"noul\",\"noul\":0.7207}},\"usage\":{\"input_tokens\":266,\"output_tokens\":0},\"timings\":{\"prompt_n\":266,\"prompt_ms\":146.069111,\"head_ms\":46.658,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "intent": {
     "type": "choice",
     "choice": "refund",
     "confidence": 0.8255,
     "probabilities": {
      "refund": 0.8691,
      "tracking": 0.0192,
      "cancel": 0.1058,
      "other": 0.0059
     }
    },
    "angry": {
     "type": "noul",
     "noul": 0.7207
    }
   },
   "usage": {
    "input_tokens": 266,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 266,
    "prompt_ms": 146.069111,
    "head_ms": 46.658,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "sentiment-07",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"sentiment\":{\"type\":\"choice\",\"choice\":\"mixed\",\"confidence\":0.3614,\"probabilities\":{\"positive\":0.374,\"negative\":0.0517,\"mixed\":0.5743}},\"bug_report\":{\"type\":\"noul\",\"noul\":0.488}},\"usage\":{\"input_tokens\":239,\"output_tokens\":0},\"timings\":{\"prompt_n\":239,\"prompt_ms\":127.16270800000001,\"head_ms\":48.09773,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "sentiment": {
     "type": "choice",
     "choice": "mixed",
     "confidence": 0.3614,
     "probabilities": {
      "positive": 0.374,
      "negative": 0.0517,
      "mixed": 0.5743
     }
    },
    "bug_report": {
     "type": "noul",
     "noul": 0.488
    }
   },
   "usage": {
    "input_tokens": 239,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 239,
    "prompt_ms": 127.16270800000001,
    "head_ms": 48.09773,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "long-08",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"failed\":{\"type\":\"noul\",\"noul\":0.9616},\"stage\":{\"type\":\"choice\",\"choice\":\"deploy\",\"confidence\":0.9121,\"probabilities\":{\"build\":0.0163,\"test\":0.0146,\"deploy\":0.9341,\"none\":0.035}}},\"usage\":{\"input_tokens\":8446,\"output_tokens\":0},\"timings\":{\"prompt_n\":8446,\"prompt_ms\":4311.81312,\"head_ms\":193.732089,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "failed": {
     "type": "noul",
     "noul": 0.9616
    },
    "stage": {
     "type": "choice",
     "choice": "deploy",
     "confidence": 0.9121,
     "probabilities": {
      "build": 0.0163,
      "test": 0.0146,
      "deploy": 0.9341,
      "none": 0.035
     }
    }
   },
   "usage": {
    "input_tokens": 8446,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 8446,
    "prompt_ms": 4311.81312,
    "head_ms": 193.732089,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-cs-01",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"부서\":{\"type\":\"choice\",\"choice\":\"결제\",\"confidence\":0.8429,\"probabilities\":{\"결제\":0.8822,\"배송\":0.0151,\"기술\":0.042,\"기타\":0.0607}},\"긴급도\":{\"type\":\"score\",\"score\":1.5064,\"confidence\":0.2597,\"legend\":{\"0\":\"나중에\",\"1\":\"오늘 중\",\"2\":\"지금 당장\"},\"probabilities\":{\"0\":0.0192,\"1\":0.4553,\"2\":0.5256}},\"환불요청\":{\"type\":\"noul\",\"noul\":0.0068}},\"usage\":{\"input_tokens\":380,\"output_tokens\":0},\"timings\":{\"prompt_n\":380,\"prompt_ms\":182.522797,\"head_ms\":35.137157,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "부서": {
     "type": "choice",
     "choice": "결제",
     "confidence": 0.8429,
     "probabilities": {
      "결제": 0.8822,
      "배송": 0.0151,
      "기술": 0.042,
      "기타": 0.0607
     }
    },
    "긴급도": {
     "type": "score",
     "score": 1.5064,
     "confidence": 0.2597,
     "legend": {
      "0": "나중에",
      "1": "오늘 중",
      "2": "지금 당장"
     },
     "probabilities": {
      "0": 0.0192,
      "1": 0.4553,
      "2": 0.5256
     }
    },
    "환불요청": {
     "type": "noul",
     "noul": 0.0068
    }
   },
   "usage": {
    "input_tokens": 380,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 380,
    "prompt_ms": 182.522797,
    "head_ms": 35.137157,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-guard-02",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"인젝션\":{\"type\":\"noul\",\"noul\":0.8098},\"위험도\":{\"type\":\"score\",\"score\":1.8795,\"confidence\":0.8192,\"legend\":{\"0\":\"무해함\",\"1\":\"의심스러움\",\"2\":\"악의적\"},\"probabilities\":{\"0\":0.0308,\"1\":0.0589,\"2\":0.9103}}},\"usage\":{\"input_tokens\":258,\"output_tokens\":0},\"timings\":{\"prompt_n\":258,\"prompt_ms\":145.176391,\"head_ms\":54.328824,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "인젝션": {
     "type": "noul",
     "noul": 0.8098
    },
    "위험도": {
     "type": "score",
     "score": 1.8795,
     "confidence": 0.8192,
     "legend": {
      "0": "무해함",
      "1": "의심스러움",
      "2": "악의적"
     },
     "probabilities": {
      "0": 0.0308,
      "1": 0.0589,
      "2": 0.9103
     }
    }
   },
   "usage": {
    "input_tokens": 258,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 258,
    "prompt_ms": 145.176391,
    "head_ms": 54.328824,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-tool-03",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"도구\":{\"type\":\"choice\",\"choice\":\"캘린더\",\"confidence\":0.904,\"probabilities\":{\"웹검색\":0.0173,\"계산기\":0.026,\"캘린더\":0.928,\"직접답변\":0.0287}}},\"usage\":{\"input_tokens\":220,\"output_tokens\":0},\"timings\":{\"prompt_n\":220,\"prompt_ms\":125.30485,\"head_ms\":47.302849,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "도구": {
     "type": "choice",
     "choice": "캘린더",
     "confidence": 0.904,
     "probabilities": {
      "웹검색": 0.0173,
      "계산기": 0.026,
      "캘린더": 0.928,
      "직접답변": 0.0287
     }
    }
   },
   "usage": {
    "input_tokens": 220,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 220,
    "prompt_ms": 125.30485,
    "head_ms": 47.302849,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-review-04",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"감성\":{\"type\":\"choice\",\"choice\":\"혼합\",\"confidence\":0.6667,\"probabilities\":{\"긍정\":0.0348,\"부정\":0.1874,\"혼합\":0.7778}},\"구성품누락\":{\"type\":\"noul\",\"noul\":0.9657}},\"usage\":{\"input_tokens\":270,\"output_tokens\":0},\"timings\":{\"prompt_n\":270,\"prompt_ms\":147.072456,\"head_ms\":59.239374,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "감성": {
     "type": "choice",
     "choice": "혼합",
     "confidence": 0.6667,
     "probabilities": {
      "긍정": 0.0348,
      "부정": 0.1874,
      "혼합": 0.7778
     }
    },
    "구성품누락": {
     "type": "noul",
     "noul": 0.9657
    }
   },
   "usage": {
    "input_tokens": 270,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 270,
    "prompt_ms": 147.072456,
    "head_ms": 59.239374,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-invoice-05",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"상태\":{\"type\":\"choice\",\"choice\":\"연체\",\"confidence\":0.9372,\"probabilities\":{\"완납\":0.0149,\"연체\":0.9581,\"대기\":0.027}},\"고액\":{\"type\":\"noul\",\"noul\":0.9744}},\"usage\":{\"input_tokens\":307,\"output_tokens\":0},\"timings\":{\"prompt_n\":307,\"prompt_ms\":156.89909,\"head_ms\":58.279692000000004,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "상태": {
     "type": "choice",
     "choice": "연체",
     "confidence": 0.9372,
     "probabilities": {
      "완납": 0.0149,
      "연체": 0.9581,
      "대기": 0.027
     }
    },
    "고액": {
     "type": "noul",
     "noul": 0.9744
    }
   },
   "usage": {
    "input_tokens": 307,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 307,
    "prompt_ms": 156.89909,
    "head_ms": 58.279692000000004,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-mail-06",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"의도\":{\"type\":\"choice\",\"choice\":\"일정변경\",\"confidence\":0.9644,\"probabilities\":{\"일정변경\":0.9733,\"취소\":0.0079,\"정보요청\":0.008,\"기타\":0.0108}},\"답장필요\":{\"type\":\"noul\",\"noul\":0.8471}},\"usage\":{\"input_tokens\":308,\"output_tokens\":0},\"timings\":{\"prompt_n\":308,\"prompt_ms\":154.32647999999998,\"head_ms\":55.837306000000005,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "의도": {
     "type": "choice",
     "choice": "일정변경",
     "confidence": 0.9644,
     "probabilities": {
      "일정변경": 0.9733,
      "취소": 0.0079,
      "정보요청": 0.008,
      "기타": 0.0108
     }
    },
    "답장필요": {
     "type": "noul",
     "noul": 0.8471
    }
   },
   "usage": {
    "input_tokens": 308,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 308,
    "prompt_ms": 154.32647999999998,
    "head_ms": 55.837306000000005,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-long-07",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q4_K_M.gguf\",\"answers\":{\"원인\":{\"type\":\"choice\",\"choice\":\"배포설정\",\"confidence\":0.9714,\"probabilities\":{\"데이터베이스\":0.0082,\"네트워크\":0.0054,\"배포설정\":0.9786,\"외부API\":0.0078}},\"해결됨\":{\"type\":\"noul\",\"noul\":0.8724},\"심각도\":{\"type\":\"score\",\"score\":1.764,\"confidence\":0.646,\"legend\":{\"0\":\"영향 없음\",\"1\":\"일부 영향\",\"2\":\"큰 영향\"},\"probabilities\":{\"0\":0.0474,\"1\":0.1411,\"2\":0.8115}}},\"usage\":{\"input_tokens\":4067,\"output_tokens\":0},\"timings\":{\"prompt_n\":4067,\"prompt_ms\":2066.151709,\"head_ms\":147.333352,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q4_K_M.gguf",
   "answers": {
    "원인": {
     "type": "choice",
     "choice": "배포설정",
     "confidence": 0.9714,
     "probabilities": {
      "데이터베이스": 0.0082,
      "네트워크": 0.0054,
      "배포설정": 0.9786,
      "외부API": 0.0078
     }
    },
    "해결됨": {
     "type": "noul",
     "noul": 0.8724
    },
    "심각도": {
     "type": "score",
     "score": 1.764,
     "confidence": 0.646,
     "legend": {
      "0": "영향 없음",
      "1": "일부 영향",
      "2": "큰 영향"
     },
     "probabilities": {
      "0": 0.0474,
      "1": 0.1411,
      "2": 0.8115
     }
    }
   },
   "usage": {
    "input_tokens": 4067,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 4067,
    "prompt_ms": 2066.151709,
    "head_ms": 147.333352,
    "cache_n": 0
   }
  }
 }
]
Q3_K_S rows.json
[
 {
  "suite": "en",
  "id": "route-01",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"department\":{\"type\":\"choice\",\"choice\":\"technical\",\"confidence\":0.9219,\"probabilities\":{\"billing\":0.0391,\"technical\":0.9609}},\"urgency\":{\"type\":\"score\",\"score\":1.8135,\"confidence\":0.7203,\"legend\":{\"0\":\"Can wait\",\"1\":\"This week\",\"2\":\"Today\"},\"probabilities\":{\"0\":0.0544,\"1\":0.0776,\"2\":0.868}},\"outage\":{\"type\":\"noul\",\"noul\":0.7749}},\"usage\":{\"input_tokens\":300,\"output_tokens\":0},\"timings\":{\"prompt_n\":300,\"prompt_ms\":138.192971,\"head_ms\":53.804639,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "department": {
     "type": "choice",
     "choice": "technical",
     "confidence": 0.9219,
     "probabilities": {
      "billing": 0.0391,
      "technical": 0.9609
     }
    },
    "urgency": {
     "type": "score",
     "score": 1.8135,
     "confidence": 0.7203,
     "legend": {
      "0": "Can wait",
      "1": "This week",
      "2": "Today"
     },
     "probabilities": {
      "0": 0.0544,
      "1": 0.0776,
      "2": 0.868
     }
    },
    "outage": {
     "type": "noul",
     "noul": 0.7749
    }
   },
   "usage": {
    "input_tokens": 300,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 300,
    "prompt_ms": 138.192971,
    "head_ms": 53.804639,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "invoice-02",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"status\":{\"type\":\"choice\",\"choice\":\"overdue\",\"confidence\":0.9658,\"probabilities\":{\"paid\":0.0143,\"overdue\":0.9772,\"draft\":0.0085}},\"large\":{\"type\":\"noul\",\"noul\":0.9705}},\"usage\":{\"input_tokens\":260,\"output_tokens\":0},\"timings\":{\"prompt_n\":260,\"prompt_ms\":128.425163,\"head_ms\":50.264876,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "status": {
     "type": "choice",
     "choice": "overdue",
     "confidence": 0.9658,
     "probabilities": {
      "paid": 0.0143,
      "overdue": 0.9772,
      "draft": 0.0085
     }
    },
    "large": {
     "type": "noul",
     "noul": 0.9705
    }
   },
   "usage": {
    "input_tokens": 260,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 260,
    "prompt_ms": 128.425163,
    "head_ms": 50.264876,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "tool-03",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"tool\":{\"type\":\"choice\",\"choice\":\"web_search\",\"confidence\":0.9731,\"probabilities\":{\"web_search\":0.9798,\"calculator\":0.0042,\"calendar\":0.0069,\"none\":0.0091}}},\"usage\":{\"input_tokens\":188,\"output_tokens\":0},\"timings\":{\"prompt_n\":188,\"prompt_ms\":88.19472,\"head_ms\":57.652451,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "tool": {
     "type": "choice",
     "choice": "web_search",
     "confidence": 0.9731,
     "probabilities": {
      "web_search": 0.9798,
      "calculator": 0.0042,
      "calendar": 0.0069,
      "none": 0.0091
     }
    }
   },
   "usage": {
    "input_tokens": 188,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 188,
    "prompt_ms": 88.19472,
    "head_ms": 57.652451,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "guard-04",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"injection\":{\"type\":\"noul\",\"noul\":0.9477},\"severity\":{\"type\":\"score\",\"score\":1.7309,\"confidence\":0.5963,\"legend\":{\"0\":\"Harmless\",\"1\":\"Suspicious\",\"2\":\"Malicious\"},\"probabilities\":{\"0\":0.0619,\"1\":0.1452,\"2\":0.7928}}},\"usage\":{\"input_tokens\":233,\"output_tokens\":0},\"timings\":{\"prompt_n\":233,\"prompt_ms\":114.69756000000001,\"head_ms\":57.318405000000006,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "injection": {
     "type": "noul",
     "noul": 0.9477
    },
    "severity": {
     "type": "score",
     "score": 1.7309,
     "confidence": 0.5963,
     "legend": {
      "0": "Harmless",
      "1": "Suspicious",
      "2": "Malicious"
     },
     "probabilities": {
      "0": 0.0619,
      "1": 0.1452,
      "2": 0.7928
     }
    }
   },
   "usage": {
    "input_tokens": 233,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 233,
    "prompt_ms": 114.69756000000001,
    "head_ms": 57.318405000000006,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "review-05",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"risk\":{\"type\":\"score\",\"score\":0.5721,\"confidence\":0.1419,\"legend\":{\"0\":\"Low\",\"1\":\"Medium\",\"2\":\"High\"},\"probabilities\":{\"0\":0.4862,\"1\":0.4556,\"2\":0.0582}},\"needs_human\":{\"type\":\"noul\",\"noul\":0.3023}},\"usage\":{\"input_tokens\":252,\"output_tokens\":0},\"timings\":{\"prompt_n\":252,\"prompt_ms\":121.58845,\"head_ms\":60.43481,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "risk": {
     "type": "score",
     "score": 0.5721,
     "confidence": 0.1419,
     "legend": {
      "0": "Low",
      "1": "Medium",
      "2": "High"
     },
     "probabilities": {
      "0": 0.4862,
      "1": 0.4556,
      "2": 0.0582
     }
    },
    "needs_human": {
     "type": "noul",
     "noul": 0.3023
    }
   },
   "usage": {
    "input_tokens": 252,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 252,
    "prompt_ms": 121.58845,
    "head_ms": 60.43481,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "ko-06",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"intent\":{\"type\":\"choice\",\"choice\":\"refund\",\"confidence\":0.8353,\"probabilities\":{\"refund\":0.8765,\"tracking\":0.0207,\"cancel\":0.0953,\"other\":0.0076}},\"angry\":{\"type\":\"noul\",\"noul\":0.6483}},\"usage\":{\"input_tokens\":266,\"output_tokens\":0},\"timings\":{\"prompt_n\":266,\"prompt_ms\":131.35520300000002,\"head_ms\":56.75479,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "intent": {
     "type": "choice",
     "choice": "refund",
     "confidence": 0.8353,
     "probabilities": {
      "refund": 0.8765,
      "tracking": 0.0207,
      "cancel": 0.0953,
      "other": 0.0076
     }
    },
    "angry": {
     "type": "noul",
     "noul": 0.6483
    }
   },
   "usage": {
    "input_tokens": 266,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 266,
    "prompt_ms": 131.35520300000002,
    "head_ms": 56.75479,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "sentiment-07",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"sentiment\":{\"type\":\"choice\",\"choice\":\"mixed\",\"confidence\":0.244,\"probabilities\":{\"positive\":0.445,\"negative\":0.059,\"mixed\":0.496}},\"bug_report\":{\"type\":\"noul\",\"noul\":0.4877}},\"usage\":{\"input_tokens\":239,\"output_tokens\":0},\"timings\":{\"prompt_n\":239,\"prompt_ms\":115.450118,\"head_ms\":54.000335,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "sentiment": {
     "type": "choice",
     "choice": "mixed",
     "confidence": 0.244,
     "probabilities": {
      "positive": 0.445,
      "negative": 0.059,
      "mixed": 0.496
     }
    },
    "bug_report": {
     "type": "noul",
     "noul": 0.4877
    }
   },
   "usage": {
    "input_tokens": 239,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 239,
    "prompt_ms": 115.450118,
    "head_ms": 54.000335,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "en",
  "id": "long-08",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"failed\":{\"type\":\"noul\",\"noul\":0.9612},\"stage\":{\"type\":\"choice\",\"choice\":\"deploy\",\"confidence\":0.8909,\"probabilities\":{\"build\":0.0182,\"test\":0.0174,\"deploy\":0.9181,\"none\":0.0462}}},\"usage\":{\"input_tokens\":8446,\"output_tokens\":0},\"timings\":{\"prompt_n\":8446,\"prompt_ms\":3723.3182,\"head_ms\":211.238851,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "failed": {
     "type": "noul",
     "noul": 0.9612
    },
    "stage": {
     "type": "choice",
     "choice": "deploy",
     "confidence": 0.8909,
     "probabilities": {
      "build": 0.0182,
      "test": 0.0174,
      "deploy": 0.9181,
      "none": 0.0462
     }
    }
   },
   "usage": {
    "input_tokens": 8446,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 8446,
    "prompt_ms": 3723.3182,
    "head_ms": 211.238851,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-cs-01",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"부서\":{\"type\":\"choice\",\"choice\":\"결제\",\"confidence\":0.7998,\"probabilities\":{\"결제\":0.8498,\"배송\":0.0182,\"기술\":0.0579,\"기타\":0.074}},\"긴급도\":{\"type\":\"score\",\"score\":1.4785,\"confidence\":0.2177,\"legend\":{\"0\":\"나중에\",\"1\":\"오늘 중\",\"2\":\"지금 당장\"},\"probabilities\":{\"0\":0.0232,\"1\":0.475,\"2\":0.5017}},\"환불요청\":{\"type\":\"noul\",\"noul\":0.015}},\"usage\":{\"input_tokens\":380,\"output_tokens\":0},\"timings\":{\"prompt_n\":380,\"prompt_ms\":163.302448,\"head_ms\":61.392713,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "부서": {
     "type": "choice",
     "choice": "결제",
     "confidence": 0.7998,
     "probabilities": {
      "결제": 0.8498,
      "배송": 0.0182,
      "기술": 0.0579,
      "기타": 0.074
     }
    },
    "긴급도": {
     "type": "score",
     "score": 1.4785,
     "confidence": 0.2177,
     "legend": {
      "0": "나중에",
      "1": "오늘 중",
      "2": "지금 당장"
     },
     "probabilities": {
      "0": 0.0232,
      "1": 0.475,
      "2": 0.5017
     }
    },
    "환불요청": {
     "type": "noul",
     "noul": 0.015
    }
   },
   "usage": {
    "input_tokens": 380,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 380,
    "prompt_ms": 163.302448,
    "head_ms": 61.392713,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-guard-02",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"인젝션\":{\"type\":\"noul\",\"noul\":0.8609},\"위험도\":{\"type\":\"score\",\"score\":1.8815,\"confidence\":0.8222,\"legend\":{\"0\":\"무해함\",\"1\":\"의심스러움\",\"2\":\"악의적\"},\"probabilities\":{\"0\":0.0239,\"1\":0.0707,\"2\":0.9054}}},\"usage\":{\"input_tokens\":258,\"output_tokens\":0},\"timings\":{\"prompt_n\":258,\"prompt_ms\":128.814416,\"head_ms\":61.937014999999995,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "인젝션": {
     "type": "noul",
     "noul": 0.8609
    },
    "위험도": {
     "type": "score",
     "score": 1.8815,
     "confidence": 0.8222,
     "legend": {
      "0": "무해함",
      "1": "의심스러움",
      "2": "악의적"
     },
     "probabilities": {
      "0": 0.0239,
      "1": 0.0707,
      "2": 0.9054
     }
    }
   },
   "usage": {
    "input_tokens": 258,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 258,
    "prompt_ms": 128.814416,
    "head_ms": 61.937014999999995,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-tool-03",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"도구\":{\"type\":\"choice\",\"choice\":\"캘린더\",\"confidence\":0.9088,\"probabilities\":{\"웹검색\":0.0168,\"계산기\":0.0244,\"캘린더\":0.9316,\"직접답변\":0.0272}}},\"usage\":{\"input_tokens\":220,\"output_tokens\":0},\"timings\":{\"prompt_n\":220,\"prompt_ms\":111.087225,\"head_ms\":56.641033,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "도구": {
     "type": "choice",
     "choice": "캘린더",
     "confidence": 0.9088,
     "probabilities": {
      "웹검색": 0.0168,
      "계산기": 0.0244,
      "캘린더": 0.9316,
      "직접답변": 0.0272
     }
    }
   },
   "usage": {
    "input_tokens": 220,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 220,
    "prompt_ms": 111.087225,
    "head_ms": 56.641033,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-review-04",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"감성\":{\"type\":\"choice\",\"choice\":\"혼합\",\"confidence\":0.7973,\"probabilities\":{\"긍정\":0.0421,\"부정\":0.093,\"혼합\":0.8649}},\"구성품누락\":{\"type\":\"noul\",\"noul\":0.9662}},\"usage\":{\"input_tokens\":270,\"output_tokens\":0},\"timings\":{\"prompt_n\":270,\"prompt_ms\":130.868457,\"head_ms\":56.705352,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "감성": {
     "type": "choice",
     "choice": "혼합",
     "confidence": 0.7973,
     "probabilities": {
      "긍정": 0.0421,
      "부정": 0.093,
      "혼합": 0.8649
     }
    },
    "구성품누락": {
     "type": "noul",
     "noul": 0.9662
    }
   },
   "usage": {
    "input_tokens": 270,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 270,
    "prompt_ms": 130.868457,
    "head_ms": 56.705352,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-invoice-05",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"상태\":{\"type\":\"choice\",\"choice\":\"연체\",\"confidence\":0.9277,\"probabilities\":{\"완납\":0.0144,\"연체\":0.9518,\"대기\":0.0338}},\"고액\":{\"type\":\"noul\",\"noul\":0.9727}},\"usage\":{\"input_tokens\":307,\"output_tokens\":0},\"timings\":{\"prompt_n\":307,\"prompt_ms\":141.040471,\"head_ms\":58.084917,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "상태": {
     "type": "choice",
     "choice": "연체",
     "confidence": 0.9277,
     "probabilities": {
      "완납": 0.0144,
      "연체": 0.9518,
      "대기": 0.0338
     }
    },
    "고액": {
     "type": "noul",
     "noul": 0.9727
    }
   },
   "usage": {
    "input_tokens": 307,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 307,
    "prompt_ms": 141.040471,
    "head_ms": 58.084917,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-mail-06",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"의도\":{\"type\":\"choice\",\"choice\":\"일정변경\",\"confidence\":0.9621,\"probabilities\":{\"일정변경\":0.9716,\"취소\":0.0088,\"정보요청\":0.0086,\"기타\":0.011}},\"답장필요\":{\"type\":\"noul\",\"noul\":0.7218}},\"usage\":{\"input_tokens\":308,\"output_tokens\":0},\"timings\":{\"prompt_n\":308,\"prompt_ms\":147.141973,\"head_ms\":30.580092999999998,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "의도": {
     "type": "choice",
     "choice": "일정변경",
     "confidence": 0.9621,
     "probabilities": {
      "일정변경": 0.9716,
      "취소": 0.0088,
      "정보요청": 0.0086,
      "기타": 0.011
     }
    },
    "답장필요": {
     "type": "noul",
     "noul": 0.7218
    }
   },
   "usage": {
    "input_tokens": 308,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 308,
    "prompt_ms": 147.141973,
    "head_ms": 30.580092999999998,
    "cache_n": 0
   }
  }
 },
 {
  "suite": "ko",
  "id": "ko-long-07",
  "raw": "{\"model\":\"Cloudflare_clef-flash-Q3_K_S.gguf\",\"answers\":{\"원인\":{\"type\":\"choice\",\"choice\":\"배포설정\",\"confidence\":0.9667,\"probabilities\":{\"데이터베이스\":0.0095,\"네트워크\":0.0065,\"배포설정\":0.9751,\"외부API\":0.009}},\"해결됨\":{\"type\":\"noul\",\"noul\":0.9052},\"심각도\":{\"type\":\"score\",\"score\":1.6056,\"confidence\":0.4083,\"legend\":{\"0\":\"영향 없음\",\"1\":\"일부 영향\",\"2\":\"큰 영향\"},\"probabilities\":{\"0\":0.0703,\"1\":0.2539,\"2\":0.6758}}},\"usage\":{\"input_tokens\":4067,\"output_tokens\":0},\"timings\":{\"prompt_n\":4067,\"prompt_ms\":1748.868218,\"head_ms\":144.981342,\"cache_n\":0}}",
  "resp": {
   "model": "Cloudflare_clef-flash-Q3_K_S.gguf",
   "answers": {
    "원인": {
     "type": "choice",
     "choice": "배포설정",
     "confidence": 0.9667,
     "probabilities": {
      "데이터베이스": 0.0095,
      "네트워크": 0.0065,
      "배포설정": 0.9751,
      "외부API": 0.009
     }
    },
    "해결됨": {
     "type": "noul",
     "noul": 0.9052
    },
    "심각도": {
     "type": "score",
     "score": 1.6056,
     "confidence": 0.4083,
     "legend": {
      "0": "영향 없음",
      "1": "일부 영향",
      "2": "큰 영향"
     },
     "probabilities": {
      "0": 0.0703,
      "1": 0.2539,
      "2": 0.6758
     }
    }
   },
   "usage": {
    "input_tokens": 4067,
    "output_tokens": 0
   },
   "timings": {
    "prompt_n": 4067,
    "prompt_ms": 1748.868218,
    "head_ms": 144.981342,
    "cache_n": 0
   }
  }
 }
]

@midagedev

Copy link
Copy Markdown
Owner

Thank you again for the Spark rows. They are complete (15 + 15 requests), and we will use them as the Spark's P2 tape.

One more request, only if you have time. We would like to share the Spark progress, with credit to you. Could you record a toktape run on the Spark and publish it?

@midagedev

midagedev commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Three notes for the toktape run, from the toktape side:

  • Run toktape profile --name <you> --link <url> first. That is how your credit shows on the tape page and the listing.
  • Run toktape on the Spark itself. A run against a remote URL records the wrong machine.
  • publish --dry-run prints "text: nothing" for a decide tape. That line is expected.

toktape does not read GB10 memory yet (the cells are [N/A]), so a tape published now would keep "?" on its preview. Could you paste this output from the Spark first? You can record the tape now; it already keeps what the fix needs. We fix the card, then ask you to publish that same .tape file:

nvidia-smi --query-gpu=index,name,memory.total,memory.used,utilization.gpu,temperature.gpu,power.draw,power.limit,clocks.sm,clocks_throttle_reasons.active,driver_version,pcie.link.gen.current,pcie.link.width.current,uuid --format=csv,noheader,nounits
nvidia-smi --query-compute-apps=gpu_uuid,pid,used_memory --format=csv,noheader,nounits   # while bloomery-serve is serving
grep MemTotal /proc/meminfo
uname -m
toktape version

@midagedev

Copy link
Copy Markdown
Owner

One more run request, when you have time. Our planner says one Spark holds Qwen3.8-Flash-Next UD-Q3_K_XL with every expert on the GPU, so it is the Spark's best Qwen3.8 file today.

  1. bloomery-serve with that file and no --place or other flags (MTP is on by default).
  2. The same with --ctx-size 32768. Our planner leaves only about 2 GB of headroom at the default context on your 111.7 GB pool, so the default may pick a smaller context.

Please paste the plan, ctx and cache lines from stderr, and a short and a ~4K-token prompt's decode and prefill tok/s. A toktape run of it can wait for the toktape fix above.

@midagedev

Copy link
Copy Markdown
Owner

Landed on main as 7507942, with your authorship. Thank you very much, Julian. The unified-pool plan is the base for every Spark run from here, and your 15 + 15 rows are its first evidence.

The landing batch ran 72 gates on the fixture tier, all green. The other 61 run in the release batch.

Three follow-ups are in our tracker, so nothing more is needed in this PR: tests for F4c, the memory guard on an integrated device, and the multi-node ring from section 8.

I am closing this PR because the commit is on main through our merge train, not through the GitHub merge button.

@midagedev midagedev closed this Oct 11, 2026
@juliankang4

Copy link
Copy Markdown
Collaborator Author

Thank you for landing it. Here are the Spark runs you asked for: the nvidia-smi output first, then Qwen3.8 UD-Q3_K_XL, then the toktape tapes.

All of it ran on one DGX Spark (GB10, driver 595.84) with the same binary:

code main d5c23827 plus this PR's commit as 3109894a, the same patch as 7507942c on main (git range-diff shows =)
build cargo oxide build --arch sm_86 -- -p bloomery-gpu-gates --features glm5next,clef,vision,mimo2 --release --bin bloomery-serve in a CUDA 13.3.1 container
server bloomery-serve -m <file> with nothing else unless noted, every BLOOMERY_* unset, page cache dropped before each start

nvidia-smi and the host

Taken while bloomery-serve served Clef-Flash Q4_K_M with the head:

$ nvidia-smi --query-gpu=index,name,memory.total,memory.used,utilization.gpu,temperature.gpu,power.draw,power.limit,clocks.sm,clocks_throttle_reasons.active,driver_version,pcie.link.gen.current,pcie.link.width.current,uuid --format=csv,noheader,nounits
0, NVIDIA GB10, [N/A], [N/A], 0, 58, 8.92, [N/A], 1989, 0x0000000000000000, 595.84, 1, 1, GPU-f6bd215d-873f-98e5-70e3-18651172a5e1
$ nvidia-smi --query-compute-apps=gpu_uuid,pid,used_memory --format=csv,noheader,nounits
GPU-f6bd215d-873f-98e5-70e3-18651172a5e1, 1137262, 8205
$ grep MemTotal /proc/meminfo
MemTotal:       127599376 kB
$ uname -m
aarch64
$ toktape version
toktape 0.7.1

--query-compute-apps reads 66883 MiB with UD-Q3_K_XL serving and 93915 MiB with UD-Q4_K_XL. The --query-gpu line reads the same in every run apart from utilization, temperature and power.

Qwen3.8-Flash-Next UD-Q3_K_XL

unsloth rev 766911a6, the three shards' sha256 equal to the Hub's LFS oids, the MTP draft file beside the first shard (where --hf puts it). I also ran UD-Q4_K_XL at the defaults on the same binary for comparison.

Default (no flags):

ctx rule=cache ctx=18176 slots=2 total=36352 fit=262144 fit_card_expert_bytes=55823564800 margin_ctx=262144 base=4096 base_card_expert_bytes=55823564800 card_expert_bytes=55823564800 lost_bytes=0 margin_bytes=1073741824
cache ram=820702504 rule=default available=125124673536 read=MemAvailable need=123483268528 pool=0 tier=0 paged=0 checkpoints=8589934592 message_start=<|im_start|> in_vocab=true in_template=true
parallel rule=slots slots=2 slot_ctx=18176 total=36352 from=default pass=one
plan place=a card=GB10 experts=card ctx_max=18176 host_experts=0 card_experts=24576 card_free=125309718528 devices=[stage:GB10:cuda0:130660958208] cuda_order=unset(FASTEST_FIRST)

--ctx-size 32768:

ctx rule=set ctx=32768 slots=1 total=32768 card_expert_bytes=55823564800
cache ram=8589934592 rule=default available=125103149056 read=MemAvailable need=103744365420 pool=0 tier=0 paged=0 checkpoints=4294967296 message_start=<|im_start|> in_vocab=true in_template=true
parallel rule=slots slots=1 slot_ctx=32768 total=32768 from=ctx pass=one
plan place=a card=GB10 experts=card ctx_max=32768 host_experts=0 card_experts=24576 card_free=125344567296 devices=[stage:GB10:cuda0:130660958208] cuda_order=unset(FASTEST_FIRST)

UD-Q4_K_XL, default:

ctx rule=cache ctx=134400 slots=2 total=268800 fit=262144 fit_card_expert_bytes=77017907200 margin_ctx=262144 base=4096 base_card_expert_bytes=77017907200 card_expert_bytes=77017907200 lost_bytes=0 margin_bytes=1073741824
cache ram=4358308200 rule=default available=125111492608 read=MemAvailable need=116394876208 pool=0 tier=0 paged=0 checkpoints=8589934592 message_start=<|im_start|> in_vocab=true in_template=true
parallel rule=slots slots=2 slot_ctx=134400 total=268800 from=default pass=one
plan place=a card=GB10 experts=card ctx_max=134400 host_experts=0 card_experts=24576 card_free=125394333696 devices=[stage:GB10:cuda0:130660958208] cuda_order=unset(FASTEST_FIRST)

The loads report resident_bytes=68230012808 in 30.8 s for UD-Q3_K_XL and resident_bytes=93150621960 in 35.8 s for UD-Q4_K_XL, each with the MTP draft on (load draft=mtp).

Speed: one stream, chat completions at temperature 0 with thinking off, asking for a summary of the first P tokens of a long text, 128 tokens at most. Each P had one warm-up request and three counted ones, each with a different first line so no request reuses another's prefix. The figures are the means of the server's own timings, with the MTP draft on as served:

File Flags Prompt tokens Prefill tok/s Decode tok/s Draft acceptance
UD-Q3_K_XL none 504 735.4 42.06 0.637
UD-Q3_K_XL none 4089 1069.2 38.11 0.587
UD-Q3_K_XL --ctx-size 32768 504 757.3 40.92 0.623
UD-Q3_K_XL --ctx-size 32768 4089 1072.0 37.08 0.587
UD-Q4_K_XL none 504 635.5 35.90 0.617
UD-Q4_K_XL none 4089 1025.7 37.64 0.688

Decode with the draft on moves with acceptance, so the decode gap between the two files is less certain than the prefill gap.

Both files hold every routed expert on the GPU at their default context (host_experts=0 card_experts=24576), so on this Spark UD-Q4_K_XL also runs all on the GPU at the default.

One thing I did not expect: the smaller file gets the smaller default context. UD-Q3_K_XL lands at 2 × 18176 and UD-Q4_K_XL at 2 × 134400, both by rule=cache. As I read the qwen38 seat, the default shrinks the context until one session's state fits the prompt cache's default RAM (host_bound), and that RAM is what MemAvailable leaves past the plan's host need, taken at the context before the cut (margin_ctx=262144 a slot, two slots). That need comes out larger for UD-Q3_K_XL (123.48 GB against 116.39 GB), so its cache gets 0.82 GB against 4.36 GB. With UD-Q3_K_XL serving at the default, free -g still showed 49 GiB available. I have not found which term of the need makes the difference between the two files. I can dig further if that helps.

toktape

I set the profile with toktape profile --name juliankang4 --link https://github.com/juliankang4 and recorded on the Spark, against http://127.0.0.1:8080, with --host-label "DGX Spark":

  • Clef-Flash Q4_K_M (bartowski rev d7f376ea) with the head (Cloudflare/clef-flash rev 8b2e5fd1), toktape decide with the built-in suite: 168 requests (8 cases × 21 passes), warm p50 215 ms, short p50 209 ms, long p50 4626 ms, 1.3 requests/s, prefill 1843 tokens/s median. Tape 20261011-095651-cloudflare-clef-flash-q4.
  • Qwen3.6-35B-A3B Q4_K_M, plain toktape: decode 69.1 tok/s, prefill 3999 tok/s over 7257 prompt tokens, TTFT 1821 ms. The card's two caveats are the ones a reasoning model gets at the default 20 s (all 1256 tokens were thinking, and the clock cut the run). Tape 20261011-095957-qwen3-6-35b-a3b-q4-k-m.

publish --dry-run on both shows hostname "DGX Spark", the server URL as :8080, model paths cut to file names, and the profile above. The decide tape prints "text: nothing" as you said, and it carries one caveat, no_proc_view. I have not published either. Tell me when the card fix is in and I will publish these same two files and post the links here.

@midagedev

Copy link
Copy Markdown
Owner

Thank you, Julian. This is everything we asked for, and more.

  • The nvidia-smi capture went straight to toktape. It returns the GB10 row, so the card fix can ship. Its release is next; I will post the exact upgrade and publish lines here, and then you can publish the two tapes you recorded.
  • The default context is a real defect. A smaller file must not get a smaller context. We are tracing the term on our side from your plan lines; no need to dig further. I will post the cause and the fix here.
  • The Qwen3.8 rows are our first measured Spark numbers for it. They set the baseline for our Spark work.

@midagedev

Copy link
Copy Markdown
Owner

@juliankang4 Sorry for so many small asks in this thread. You have already done a lot, and we kept coming back with one more step. This should be the last one for the tapes.

toktape 0.7.2 is out. It shows a GB10 as unified memory. You do not need to record again: your two tapes render right as they are.

On the Spark:

curl -fsSL https://raw.githubusercontent.com/midagedev/toktape/main/scripts/install.sh | sh
toktape profile --name "<name>" --link "https://github.com/<handle>"
for t in $(ls -t ~/.toktape/runs/*.toktape | head -2); do toktape publish "$t"; done

Each publish prints a link. The decide tape includes the prompts and answers; add --no-text to keep them at home. Please post the two links here when you have time. Thank you again.

@juliankang4

Copy link
Copy Markdown
Collaborator Author

Both are up, published with toktape 0.7.2 with the text included:

No need to apologize. These runs are easy for me to do, so ask whenever you need more data from the Spark.

@midagedev

Copy link
Copy Markdown
Owner

정말 감사합니다 ㅎㅎ 트위터에 자랑하러 가야겠네요!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants