This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Deadcode 2a2b756371 radiance 2.1.0
New models. Recursive Flint (39.8B, about 2.5B active) by everplays (#422): `arch/flint`, as an
IQ8R container with rotated int8 experts or a four-bit one, with a sink-aware WMMA prefill
attention and the fused attention prologue at `rotary_dim` 0. Meta Muse Glimmer 30B by
launch80_assets (#423): bf16, an int4 trunk or IQ8R, its windowed vision tower, its DFlash
drafter, the ATEM tool dialect and context extension. Ling-3.0-tiny by RikshaDriver (#441):
served from its GGUF releases or as IQ8R on `bailing_hybrid`, with six more libr3d kernels. Block
FP8, MXFP4 and NVFP4 conversions of the three are not served. IQ8R containers of all three
(round to nearest, no calibration) are on Hugging Face under StillDeadcode: flint-iq8r,
muse-glimmer-30b-iq8r-dflash and ling-3.0-tiny-iq8r. They were checked for sane answers on two
R9700; nothing was benchmarked, and Muse Glimmer's pictures, video and tool calls were not tried.

Speech. Breeze-TTS-2 clones a voice from a reference recording and its transcript, with an
optional delivery direction, by farcryjohn (#436). The published Breeze container needs
converting again with the updated recipe before it can.

Tools. A model entry with `diagnose: DIR` runs a fixed workload on the engine instead of serving
and writes a report: step times, tokens a step, draft acceptance, TTFT and prefill rates by
category, concurrency and prompt length, and with `diagnose-baseline` a token-for-token comparison
against an earlier report (docs/DIAGNOSE.md), by Code000 (#418).

Scheduler. `mixed-step-target-ms` holds a mixed prefill and decode step to a service time, off by
default, by tnhnyzc (#413). `scheduler.stuck-exit` (60s by default, 0 never) ends the process when
the device has advanced nothing for that long, so a restart policy brings a hung server back
(#409, #415, #428).

Fixed. Draft trees with the int8 KV cache, which stopped Gemma 4 31B with DFlash2 on its first
request (#454, diagnosed by aelfwyne). The expert loan held at zero by a few leftover cache blocks
after long sessions (#455, diagnosed by thekk1). The mapped tier's pages kept in the page cache
across a load and a restore, by C_Tamas (#421). Replayed tool calls with blank arguments, and
arguments that are not JSON refused naming the call, by dschmitz (#444). The dashboard's card
temperature reads the junction sensor, by dschmitz (#453). The VRAM shortfall report says what the
KL mode needs, by baKon (#448). The out-of-tree plugin test builds its plugins in parallel and
takes its toolchain from the tree.

Plugin ABI 40: out-of-tree plugins need to be rebuilt.

Thanks to @everplays, @launch80_assets, @RikshaDriver, @farcryjohn, @Code000, @tnhnyzc, @C_Tamas, @dschmitz, @baKon, @aelfwyne and @thekk1.
2026-11-15 16:00:05 +01:00

8.3 KiB
Raw Permalink Blame History

the diagnose mode: the engine measures itself

A model entry with diagnose: DIR in the YAML file (radiance --config FILE) starts as a serve would — same placement, same kernels, same prefix cache — runs a fixed workload on itself instead of listening, and writes DIR/diagnose.json and DIR/diagnose.md. The keys are in TOOLS.md; this file is what the numbers mean, what makes a run a measurement, and what is not measured yet.

What the run does

core/engine_diagnose.cpp is the driver; the arithmetic and the report format are core/diag/diagnose.{h,cpp}, which know nothing about the engine and are tested on the host (tests/diagnose_test.cpp). The driver builds requests with no client, hands them to Scheduler::add_all and reads their tokens back from server::Sink — the same path the KL mode takes. The four points, each run once unmeasured and then diagnose-runs times:

point what it answers
decode by category code, reasoning, prose, json, file_edit and summarization prompts to EOS: time per token by prompt shape, draft acceptance, tokens a step
concurrency sweep 1, 2, 4, 8 streams at once (diagnose-concurrency): how TTFT and per-token time give way as the batch fills
prefill sweep a prompt of 1k, 4k, 16k, 64k tokens (diagnose-prefill) then decode at that depth: prefill time, prefill tokens/s, and how deep context changes decode
interference a prompt that arrives while streams are running: its TTFT, and the stall of the streams it joined

A point the engine cannot run — a concurrency above max-num-seqs, a prompt the context cannot hold with its decode — is skipped and said so in the report. It is never reported as a zero.

Per phase the report carries, from the scheduler's step ring and its counters: steps, step time (median, p95, worst), prefill/decode tokens a step, decode tokens/s, draft positions drafted and accepted, TTFT, per-token emission interval and its jitter, and each request's own tokens. Every statistic over an empty set is null in the JSON and – in the Markdown, with the count beside it.

What makes a run a measurement

what would spoil it what the run does
a prefix-cache hit — the second run of a point would measure lookups, not work every prompt carries a tag unique to its run and stream, the cache is emptied before every run, and each request's n_cached is checked afterwards. A hit, or step records the ring overwrote before they were read, makes the verdict NOT A MEASUREMENT, lists the reason, and exits non-zero
the first time a shape runs (tape recording, code objects, pool growth) each point runs once unmeasured first, in the same shape
ignore_eos generating past EOS, where a drafter hits differently categories stop at the model's EOS; only the concurrency and prefill sweeps use ignore_eos, so every stream decodes for the whole run
a client-side temperature that a deployment never serves decode runs at temperature 1 — draft acceptance is tuned on it — with the server's top_k/top_p/min_p and a fixed seed per request. Parity does not need greedy: identical logits sample identical tokens at any temperature
the environment the report lists the engine's configuration knobs by name only, from a fixed list (RADIANCE_HOME, RADIANCE_KERNELS, OMP_NUM_THREADS, …) — a value may be a path or a token, and a name that is only a prefix plus a secret suffix is not on the list. The report is pasted into issues, so it carries no path either: the model is named by its architecture and quantisation, and the corpus and baseline are named as such

The mode warns, in the report, about the settings that make its numbers those of a different engine: profile-ops (recorded passes off, barriers added), no-prefix-cache (no lookups or publishing to pay for), no usable chat template (raw text, so tokens a step and acceptance are not chat traffic's), and a busy host.

Reproducibility: whether the numbers repeat

The table above makes a run a measurement. Whether its numbers repeat on the next run, or on another day, depends on more than the workload, so every report states it in three parts and the Markdown gathers them under Reproducibility. None of them changes the verdict or the exit code: each is how the engine serves, and its fix makes it a different engine.

what moves the numbers what the report carries
the runs of one point disagree spread_pct, (max − min) / median, beside every summarised number. stability lists each headline number above 5 % (diag::kMaxSpreadPct) — ms a step for every category prompt and concurrency point (not their token rate, which also moves with the text each run samples from its own seed), TTFT and prefill rate for the prefill sweep, the arriving prompt's TTFT — and its verdict is stable, UNSTABLE or not judged (no point with two runs). A category's own summary pools prompts that differ by design, so its stability is judged prompt by prompt (prompts_summary)
the machine conditions: the build, the host settings that move a step's time (CPU governor and energy preference, kernel, device runtime, THP, IOMMU) and the serving cards (DPM ranges, power cap against its default, voltage offset, runtime PM, link), with the startup report's findings and their fix. A finding at warn level is also a warning of the run. conditions.fingerprint hashes all but the findings; with diagnose-baseline, parity.conditions lists every field that differs between the two reports — informational, since tokens do not depend on clocks
the cards' state each run's cards: temperature (edge, junction, memory), power, performance level and current DPM levels before and after it, read between runs only (the SMU answers under its lock). thermal gives each card's range over the report and warns when runs started more than 10 °C apart (diag::kMaxStartTempSpreadC) or the performance level changed
the engine's own adaptivity reproducibility notes it: dynamic placement (the heat engine moves experts as it sees routing, so a run starts with the resident set the runs before it left; deterministic pins it), prefill-interleave auto (decode-only steps sized by how long a chunk step took), a card at performance level auto (clocks chosen by the firmware; a fixed level such as profile_standard holds them, below serving clocks), and fewer than 5 runs a point

For an A/B comparison of two builds: the same conditions.fingerprint, diagnose-runs: 5 or more, deterministic for a MoE model, a fixed prefill-interleave, a fixed performance level on the cards, and both reports stable. Then a difference larger than the points' spread is the build's.

Parity

diagnose-baseline: FILE compares every request's tokens with an earlier diagnose.json of the same workload, and fails the run on any difference. Two reports are comparable only if their workload.fingerprint — corpus, tokens, runs, sweeps, context, template, sampling — is the same; compare_outputs refuses rather than compare a different workload. Points only one side ran are reported as missing, not as equal. A drop in draft acceptance that every request shares is reported beside the token comparison, since it is not a correctness difference.

Sequence

  1. Done, host-tested. The flag, the driver, the step ring, the report with categories, the concurrency and prefill sweeps, and interference. 1b. Placement, expert-streaming and link counters per phase; the dashboard's Diagnose tab reading the last report.
  2. An issue census: every (op, band, domain, n) with calls per step and operand shapes, exported for rad-kbench.
  3. Per-dispatch device time in the play path, joined to the op through a record-to-op table made at recording time, evaluated like libr4d/isa/tsum.sh and libr4d/isa/gaps.sh.
  4. A correctness window: repeat and oracle for chosen ops over a step window rather than the whole process, with ops that have no libref line reported as NOT CHECKED.

Steps 1b to 4 are listed under not_measured in every report, so a number that is absent says so in the artifact itself and never reads as a zero. The mode is host-buildable and its arithmetic is tested on the host; the numbers it writes on a card are the measurement, and belong with the hardware they came from.