Archived
17f0eae42058e2cc98a0029052d40d3229ed362c
308
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b632c72f5d |
sched: an overdue preempted prefill keeps its place ahead of the queue
A preempted request waiting for its whole-recompute gate (kAdmitWait) let the admission walk ask the next request in the queue. For an overdue one that undoes the overdue path: the room it made in this step went to a request queued behind it. With preempted prompts published, the victim forced off for it needs almost nothing to come back, so it was re-admitted at once and forced off again on the next step. Under KV pressure the same victim was forced off and re-admitted 26 times in 16 s while the overdue request waited. An overdue preempted request that is still refused now stops the walk, as a refused fresh request already does. 2x R9700, Qwen3.8-Flash-Next TP2, production flags with the KV cache cut to 6.45 GiB a card (--gpu-headroom-mib 3072), 16 concurrent 58.6k-token prompts with 4000-token answers: - without publishing preempted prompts: wall 390.6 s, mean 338.5 s, 9 preemptions, 1 forced - publishing them: wall 346.4 / 344.1 s, mean 306.6 / 299.8 s, 36 / 32 preemptions, 28 / 26 forced - publishing them, with this change: wall 331.0 / 324.4 s, mean 289.4 / 284.0 s, 8 / 9 preemptions, 1 / 1 forced Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
12b7b7889b |
sched: an overdue preempted prefill is failed only when waiting cannot help
On an idle engine the overdue path failed a preempted prefill on any refusal. A restore waiting a step for a deferred release is a wait, and so is a refusal behind requests this step already admitted (the budget or a card went to them); both clear by the next step. With preempted prompts published, the restore path is common: under KV pressure two of ten preempted requests failed with "overdue preempted prefill could not be admitted with nothing running", the debug log showing "the restore waits a step for 1 deferred release(s)" right before. The path now fails only when nothing was admitted this step and the refusal is not such a wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
01c7a3334a |
sched: a preempted request publishes its prefix; the recompute adopts it
Scheduler::preempt_back dropped everything a request had computed: unlike close_request it published nothing, so a preempted 96.6k-token prompt was computed again from its first token. The publish block of close_request is now Scheduler::publish_prefix, called by both. Its blocks stay in the cache, so a preemption that published gives eviction its rounds back (the decode ensure loop and the overdue path) and the cache gives them back, the newest last, before another request is preempted. preempted_can_prefill counts the blocks the recompute adopts from the cache (pc_->lookup), so a preempted request is not held back for room its own cached prompt already covers. Shared KV with RADIANCE_KV_GUARANTEE=1 (nine Qwen requests preempted for TranslateGemma's start pool): Qwen 587 -> 458 s, TranslateGemma 139 -> 80 s; without the guarantee unchanged (340 / 58 vs 339 / 56). Test: a_preempted_request_publishes_its_prefix; sched 187, engine_e2e and the related suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
cc46e3b714 |
core/mm: the Radio image family and video tubelets
Nemotron-H Omni's processor: NVIDIA's size rule for one tile, torch's antialiased bicubic on float pixels, patches in merge-block order, and video in tubelets labelled as the reference labels them. A picture and a video frame share one patch row, so one embedding GEMM serves both. mm_test against golden rows. |
||
|
|
dccc6329a9 |
abi, sched: RadBatch::anchor_rows, ABI 36
A block drafter's query pass gets, for each drafting sequence, the row of its last committed position in the context pass just run (StepSlot::hrow, written by the advance on the card). LiLiCorr's correlator reads the context state there. Appended after bidi_used; main ships ABI 35 and an appended field is read past the end of an older engine's copy, so the version is 36 and the layout table follows. The pass key reads the pointer. |
||
|
|
a1b7643310 |
core/format: read nemotron_h checkpoints
Nemotron-3.5-Bolt's config nests its language model under llm_config, which is now read as text_config is; arrays of objects (Puzzle's block_configs) become flat keys, block_configs.<i>.<field>; a checkpoint without num_hidden_layers counts layers_block_type; and a drafter merged from its own checkpoint keeps its own quantisation (Checkpoint::imports_at). |
||
|
|
e6787b7bdd |
core/format: a stacked vector may have parts of different widths at TP > 1
Mamba-2's conv1d bias is x | B | C, 8192 | 1024 | 1024 wide. The share of a vector stacked from parts was cut only when the parts were equally wide; the reader already lays the parts end to end, so a vector's parts now add their widths. share_test: a stacked vector with parts of different widths. |
||
|
|
19d4e8fe0e |
radiance 1.17.0
IQR-V4 for Qwen3.8-27B: - 15 recipes, data/recipes/q38-27b-iq2r-v4 .. q38-27b-iq8r-v4 (2.5 to 8 bits a weight), docs/IQR.md "IQR-V4". On the quantisation board's private split every entry has 2-19% less KL than its V3 twin of the same size (10-19% from 2.5 to 5.4 bits); IQ4R-L-V4 is 24% below the official FP8 checkpoint at 55% of its size, and IQ2R-L-V4 (2.8 bpw) is below the MXFP4 checkpoint. Containers with the DFlash2 drafter and the vision tower: huggingface.co/StillDeadcode/qwen3.8-27b-iqr-v4, served by deploy/compose/qwen3.8-27b-iqr-v4.yaml (IQR_V4 names the size) - GPTQ runs in act order inside the column trellis (tcq_order=1); the head-fed projections (attn_output, ssm_out) take a bf16 scale a (row, 128) block from five bits up; widths from measured prices - A vocabulary-weighted lm_head: four width classes of the computed trellis (output.k<B>), the tokens carrying the probability on the widest, decoded in one launch by logits_gemm_vocab with 16-bit head activations; 0.62 ms at one token on a TP2 rank against the int8 head's 1.02 ms. tools/vhead.py and data/vhead/ build the class split from the bf16 checkpoint; libquant reads the head's input Hessian for every class - At IQ6R-L and up, the int8 lm_head is GPTQ'd against its input Hessian (same bytes, median KL -8..-12%) - embed_lookup_iqr takes u7/u8 tables under a zero point and the 4096-state trellis at 6 and 7 bits - The whitepaper: radiance.stilldeadco.de/whitepapers/iqr-v4.pdf Faster IQR kernels: - The one-token GEMV gives each 16-row weight tile a block whose waves split K (5120 x 6144 at one token 42.3 -> 30.0 us), with a biased-int fold, a v_perm activation broadcast and one code stream a column - A 16-token WMMA tile without block barriers serves 2 to 16 tokens (6- and 7-bit codes from one token): a 4-bit weight takes 0.52-0.66 of FP8's time from one token to sixteen, 1.15-1.74x V3's kernels from four tokens up - The activation quantisers after the IQR gate_up (gemm_iqr_gated), the delta net's decode conv fold (gdn_conv_recurrent_update_had) and the attention gate (gate_had_quant_i8g) are folded into their producers, byte for byte the same codes: 128 fewer launches a decode step - End to end on one R9700 (TP1, no speculation): IQ4R-S-V4 decodes one stream in 24.7 ms against the MXFP4 checkpoint's 25.8 at five times lower KL; IQ3R-S-V4 is faster than MXFP4 at 1 to 8 streams. Prefill stays 8-9% behind MXFP4's 4-bit tile Quantisation tooling: - rescale=1 refits each row's scale to its codes after GPTQ; gptqsim measures a tensor's W16A16 form (tcq_code=mad16); an int8 trunk's calibration Grams can be recorded from the codes its GEMMs read (--calib-dir, TP1) - Fixed: the GPU trellis packs tcq_code=mad16's values two int16 a register New models (merged): - Spark 2.5 (spark25: bf16 and rotated-int8 IQ8R checkpoints, tensor parallelism with exact collectives, reasoning and tagged tool calls) with its DSpark drafter (exact attention and Markov walk ops), docs/SPARK25-IQ8R.md (@gostar) - Ling-3.0-flash (bailing_hybrid: KDA, dense latent attention with mla_attn_paged, group-limited sigmoid routing, the clipped SwiGLU and its MTP layer as a serial drafter), its w4a8 recipes and compose files for four and two cards (@keptn42) - Gemma 4 12B (gemma4_unified, served by the gemma4 plugins): its picture and audio embedders, a picture's placeholders read both ways on the sliding layers as the model was trained (the scheduler ends no prefill chunk inside such a run; RadBatch::n_bidi), windowed attention at head_dim 512, the assistant head as MTP drafter at one, two and four ranks, suppress_tokens from generation_config, bf16 and i8g compose files (@keptn42) Merged: - The prefill KV split sized by the live KV length rather than the model's max_ctx, recorded passes keyed by their split geometry, and --gpu-memory-mib, the inverse of --gpu-headroom-mib (@gostar) - Possessive quantifiers in tokenizer patterns where the greedy reading provably matches the same (Ling-3.0's), and the Grafana dashboard's first screen of totals (@keptn42) - The dashboard's history line (decode, prefill and TTFT over finished requests, kept in the browser, JSON export), session extremes that age and reset on a restart, card-count changes, an Advanced tab for the poll intervals, each request's prefill time from admission in /stats (prefill_s), and the page's JavaScript run by tests/js (@Memoria) - From PR #390: the file tier reads a routed layer with its own router's counts and waits for its deposits; the stop-string hold-back keeps back only a tail that can still become a stop string (before, every delta waited up to the longest stop's length); the sampler's planes are sized by the step's token bound, the n-gram ban runs beside a drafter, and a top-1 row issues no candidate cut (@Code000) - The n-gram reader refills its reads as they land, and a decode gather waits on the other rank's read of a row instead of reading it again (#369, @pokesjw) - libr3d's GEMM structs value-initialised so the tape audit sees no padding (@RikshaDriver) Added: - --ngram-placement disk=DIR: the n-gram table read from its own file, DIR/ngram-<id>.bin, filled from the container at the first start, on a faster or separate drive (#130) Fixed: - input_reference's H.264 round trip runs on libopenh264, which the image carries, at a quantiser held at the crf (a side under 16 padded and cut back); a build with no H.264 encoder answers 501 (#163) - kvtier: at most 1024 session rows under one shared first block; with one shared prompt the list grew a row a request and prefill fell from 9k to 2.5k tok/s after 500K requests (#375) - Speculative steps on an architecture with no pass-key callback keep their recorded passes under the live-KV prefill split Plugin ABI 35: - RadArgs::kv_used_max_h and wgp_count, RadBatch::kv_used_max_h and positions_h, the optional rad_arch_pass_key export and RAD_KERNEL_CAP_DYNAMIC_PREFILL_SPLIT; RadEncoderDecl::bidirectional and RadBatch's n_bidi runs. The layout fingerprint table is regenerated; out-of-tree plugins rebuild against 35 Thanks to @gostar, @keptn42, @Memoria, @Code000, @pokesjw and @RikshaDriver. |
||
|
|
a72686b7e7 |
sampler: read suppress_tokens
generation_config.json's suppress_tokens (Gemma 4: the end-of-image and end-of-audio markers, ids 258883 and 258882) are never sampled. The ids reach the sampler as SamplingParams::suppress_tokens and leave the row the way a grammar's mask does. A container carries them already, as the space-separated generation.suppress_tokens. |
||
|
|
da7b911c64 |
abi, sched: placeholder runs read both ways
An encoder states that the language model reads a picture's or video frame's placeholders both ways (RadEncoderDecl::bidirectional). The scheduler then ends no prefill chunk inside such a run, and a trunk pass names its runs and the keys their rows see (RadBatch::n_bidi). Fields appended; such a pass is not recorded. |
||
|
|
a00e5e7094 |
mm: Gemma 4 12B's pictures and audio
The 12B (gemma4_unified) has no tower: its embedder takes a whole 48 x 48 pooling window as one patch, so a patch is a row (merge 1), its values u / 255. Its audio is frames of 640 samples as they are, one frame a token, the last zero-padded. Goldens from transformers. |
||
|
|
d4d6d6cb3e |
format: Gemma 4 12B (gemma4_unified) goes to the gemma4 plugins
Its text model is Gemma 4's with other sizes. The arch id was `gemma4unified`, which no plugin claims. model_type stays in the free-form keys. |
||
|
|
c96cfc9e7b | test: verify DSpark device KV rollback | ||
|
|
9c5d4a656c |
tokenizer: possessive quantifiers where the greedy reading matches the same
A possessive repetition of one class at the top level, whose tail in its concatenation is classes that share no codepoint with it, gives the same matches read as greedy: a shorter run leaves the tail facing a codepoint it cannot take. Ling-3.0's pre-tokeniser pattern has two such quantifiers. Everything else stays refused by name. |
||
|
|
798fb21e51 | prefill: key tape splits from ordered host KV bounds | ||
|
|
aa14eea76c |
prefill: fail closed when live split geometry is unknown
Head-256 split-prefill launchers now declare that their grid depends on live KV. Without an architecture geometry key, those passes stay live instead of replaying a stale tape. Qwen keys only a proven one-sequence prefill. Plugin ABI 34. |
||
|
|
ded64c0bd3 | prefill: key recordings by live split geometry | ||
|
|
9cb04f62a8 |
config: --gpu-memory-mib, the inverse of --gpu-headroom-mib
N claims that many MiB of every card; headroom is the rest. The two flags cannot be combined. vLLM's utilisation fraction, written in MiB. |
||
|
|
08fa89255c |
GUIDE: seven doc claims the review found false, plus the comment that caused the worst one
The adversarial review's call was ship the code, fix the docs first. Every correction below was re-verified against the shipped code before editing, not applied on the verdict's word -- the review ran against e9f0622 and the tree is now rebased a559977, so all anchors were re-located by content. The blocking pair: F2 was the worst: "Reloading the page resets these figures, a server restart does not" states the opposite of the code. newEngineRun() deletes extAt/extAtS (dashboard.cpp:1735-1736), poll() calls it when started_at changes (:3942), and this branch's own extremes.test.js:103 is titled "a RESTART drops the extremes". Three independent instruments, one doc line saying the reverse. The error was inherited from a stale comment at :1709-1710, so that comment is corrected too -- it is the root cause, and it is comment-only: every changed line in dashboard.cpp starts with an asterisk, verified by filtering the diff. F1 is a worked example a reader copies: sig3 renders one decimal across [9.995, 99.95), so the line prints "best 58.0 | recent 54.0", not "best 58 | recent 54". The rest are one-liners: F3 claimed three categories carry windows when ttft is a median with none (:2282); F4's rationale for the window rule fails at its own boundary -- at exactly 20 rows last-20 repeats the overall mean, which is now stated rather than papered over; F5 put the poll summary under the fields when #advsum sits in the panel header (:1404); F6 said figures hold while reading another page without the 60 s limit that drops the windows (GAP_S = HIST_S = 60); F7 showed a middle dot where :2530 ships a pipe. README:19 credited poll_spark.test.js with poll()'s restart decision -- that file contains zero matches for poll(); the coverage is in extremes.test.js. The numbers the brief flagged as suspect (HMAX=200, RECENT_S=15, RECENT_PREFILL_S=5) were correct and are untouched. The real errors were prose semantics and rendered formatting, which the flagging did not anticipate. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (xhigh) via Open WebUI |
||
|
|
51db1729b1 |
dashboard: level the download glyph with the caption, measured not reasoned
The operator's intent, drawn rather than described: the bottom of the tray bar should sit on the same line as the bottom of the letters in REQUESTS. The previous commit claimed the viewBox-flush geometry achieved that. It did not. Headless Chrome, screenshotting the real header at 4x and finding the lowest inked pixel row of each: the caption's letters ended at device row 71 and the tray bar at 63 -- the icon floated 2.00 CSS px high. align-items:baseline puts the SVG's BOX on the text baseline, and the baseline sits above the box bottom, so filling the box was necessary but nowhere near sufficient. A 2px translateY on the glyph closes it; re-measured, both bottoms land on device row 63, gap 0.00. tests/js/render_align.js is that measurement, kept in the repo so the claim can be re-checked rather than trusted. It is manual and not wired into CMake -- it needs puppeteer and a Chrome binary, which are not repo dependencies -- and exits nonzero when the two bottoms differ. It fails on the pre-fix page (2.00px above, rc=1), which is the only reason to believe it. download.test.js's guard was the thing that gave false confidence here: it asserted the glyph "sits on the baseline" from the viewBox arithmetic alone, and passed while the icon floated. It now pins both halves -- the glyph fills its box AND the 2px nudge is present -- and the comment records that the earlier claim was wrong and why the test could not see it. A unit test cannot catch either of this session's two visual errors: the collapsed whitespace (zero width, not the 13px claimed) and this float. Neither is a property of the string the code builds. Both are properties of the rendered page, and only the rendered page was checked here. Suites: download 31, history 29, extremes 27, poll_spark 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. Alignment mutations caught: removing the nudge, making it 1px, re-insetting the bar in its box. Not deployed. Goes to review with the separator and export commits. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
d537dc09aa |
dashboard: sit the download glyph on the baseline instead of floating above it
The icon looked awkward next to REQUESTS: it floated a hair above the caps. The header aligns its items on the text baseline, and an inline SVG's baseline is its box bottom, so the box bottom was on the baseline -- but the tray bar was drawn at y 13.5 of a 16-unit viewBox, leaving 1.7 units of empty space below it. The visible bar therefore sat above the baseline while the letters sat on it. Redrawn so the bar's stroke bottom lands exactly on the viewBox bottom (centreline 15.2 plus half the 1.6 stroke = 16.0), which puts the bar on the baseline with no offset to tune. The shaft and arrowhead moved up by the same amount to keep the proportions. download.test.js gained a geometry guard that parses the viewBox, stroke width and bar centreline out of the shipped markup and asserts the stroke bottom is flush with the box bottom. Re-insetting the bar to the original 13.5 fails it with the measurement (14.3 want 16), so a future edit that reintroduces the float is caught rather than eyeballed. Verified: download 29 checks, history 29, extremes 27, poll_spark 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. Not deployed. Goes to review with the separator and export commits. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
c36d04d99c |
dashboard: move the JSON export to the Requests header as a download icon
The history summary row had grown crowded -- the figures, then a "json" button and a "clear" button -- and the operator asked for the export to live in the Requests panel header instead, top-left by the title, as a download icon with a "Download JSON file" tooltip. The Requests header already carries running/waiting on the right, so the export sits opposite it on the left rather than lumped in with the history figures. The button is an inline SVG download glyph (a <button>, so it is keyboard-focusable and announced), in a new .pleft group so the space-between header keeps it on the left with the title. The handler now saves a file rather than copying to the clipboard: a Blob of the stored rows, an anchor with a download name, clicked and removed, the object URL revoked after the click. The old #hjson clipboard button is gone. This also fixes a clipping bug the previous commit introduced. Making each category a nowrap span and the separator a padded element removed every whitespace text node between categories, so the summary line became one unbreakable run: a long line overflowed the row and clipped the buttons after it -- the "json" the operator saw cut off at the panel edge. A zero-width space between groups restores a break opportunity: the line can now wrap between categories, while each category still stays atomic. The break point sits between groups, never inside one, where nowrap would make it inert. tests/js/download.test.js, 27 checks, drives the shipped handler against stubs: the button is in the Requests header on the left of the aside, exactly one of them (a duplicate id would bind only the first and leave a dead control), tooltip and aria-label present, an icon not a text label; the handler builds one anchor, names it radiance-history.json, types the blob application/json, clicks it, attaches it to the document (Firefox needs that), removes it, and revokes the object URL only after the click. The payload round-trips through JSON.parse. history.test.js gained the break-point checks: three zero-width spaces between four categories, each immediately before its group, none buried inside a nowrap group. Verified by mutation: dropping the download attribute, never clicking, never revoking, a wrong blob type, changed tooltip text, and moving the button to the right of the aside each fail the suite. extremes 27, poll_spark 35, history 29, download 27, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. Not deployed. Goes to review with the separator commits. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
1554b451e1 |
dashboard: a history category wraps whole, and its break is a padded element
The summary line wrapped mid-figure: "ttft median 810" ended one line and "ms" started the next. A category that cannot fit should move to the next line intact, not break wherever the browser finds a space. Each category becomes one span with white-space:nowrap, so it is atomic, and the dot between categories becomes a padded element carried INSIDE the group it introduces -- as a sibling it could be left stranded at the end of a line when the group wrapped, which is the same orphan in a different place. This also corrects a false premise in the two commits before it. HTML collapses runs of whitespace, and .hsum sets no white-space, so the "wide" double-spaced separator those commits introduced never rendered wide: it collapsed to a single space exactly like the tight one. The spacing change was not subtle, it was zero -- which is why it looked identical. Width has to come from a padded element, not from spaces in the string. The pipe-within-category and dot-between-categories distinction is unaffected by this and stands. tests/js/history.test.js, 24 checks, drives the shipped assembly against a DOM stub and reads the shipped CSS: every category is a nowrap .hgrp, the break is a padded .hsep, the dot is the first child of its own group rather than a sibling, a category's own figures carry pipes and no dot, and the ttft category is a single text node so value and unit cannot split. Verified by mutation: dropping nowrap, dropping the padding, moving the dot to a sibling, turning the category break into a pipe, and splitting the value from its unit each fail the suite -- the last being the exact 810 / ms orphan this fixes. extremes 27, poll_spark 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. Not deployed. Goes to review with the separator commits. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
d5bb6a6c6e |
dashboard: category breaks keep the dot; only fields within a category take the pipe
The pipe sweep converted both separator weights at once. That was too far: the wide separator is the break between categories -- tok/s against prefill against ttft -- and it has been a dot since the page was written. Reverting the wide tier to the dot keeps that precedent; the pipe stays only on the tight tier, the fields inside one category (mean, last 20, last 5), which is where the figures actually ran together. So the history line now reads: 40 done · tok/s mean 100 t/s | last 20: 98 t/s | last 5: 105 t/s · prefill mean 1.2k | ... The dot marks a category change; the pipe marks a different question about the same category. Two weights, two meanings, one rule applied everywhere rather than dots in one panel and pipes in another. Thirteen wide separators reverted across the page (twelve lines; the layer-residency line carries two), so the rule is global. The two dots that were never separators -- the CSS list bullet and the browser tab title -- are untouched, as is the range dash in "layers 1-8". Verified by rendering the shipped page bytes, not by the suite: the suite does not pin the wide separator, so it is green whether the category break is a dot or a pipe. The render pulls the join string and the group() body straight out of dashboard.cpp and shows the dot at the category breaks and the pipe within them. All four suites still pass: extremes 27, poll_spark 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184. Not deployed. This change and the pipe sweep go to the same code review before anything ships. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
757ad11b0d |
dashboard: separate distinct fields with pipes, not middle dots
Every line that packs several distinct figures into one string used the middle dot, at two weights -- a tight dot between sub-figures and a wide one between groups. At 11px the dot is too short to read as a boundary, so lines like the history summary ran together: count, three tok/s figures, three prefill figures and ttft all sat at one visual level. The operator's call was to use the pipe wherever fields are meant to be distinct. Fifty-eight separators converted across the page -- the history summary, the version line, the KV and expert asides, the acceptance and step-time detail lines, the graph and model-view metadata, the control-vector summary, the poll summary. The two weights are kept: a tight dot becomes a tight pipe, a wide dot a wide pipe, so the group-versus-window hierarchy the wide dot carried survives the glyph change. Two dots stay, because they are not field separators: the CSS list-bullet marker (.gmeta li::before content) and the browser tab title (file - radiance). The range dash in "layers 1-8" and the DASH placeholder are likewise untouched. The two " + " the earlier census turned up are inside pctn building "<0.1" and ">99.9" string literals, not separators. The sweep missed eight separators at first: the age clause and several detail lines build their separator as the escape "\u00b7" rather than a literal dot, and a literal replace never sees those. Caught because the tests that pin the age clause went red on the literal sites but the escaped ones did not -- a partial conversion that would have shipped a page with pipes and dots mixed. Both forms are now converted. Tests: the two regexes pinning the age clause and the one string pinning the poll summary now expect the pipe. They failed when the code changed and pass now, which is the point -- a separator assertion that could not fail would not have caught the escaped-dot miss. extremes.test.js 27, poll_spark.test.js 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. GUIDE's two example triple lines, which mirror the page's separators, updated to match. Verified the sweep by reading all 58 changed lines, not by trusting the count: no pipe landed inside a regex literal (where it would mean alternation) or a prose tooltip. Both hazard greps were positive-controlled against known-bad input before their empty result was trusted. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
7bba83c075 |
dashboard: the history line's group breaks get the page's wide separator
The summary line under the history table joined everything with the tight middle dot: the count, three tok/s figures, three prefill figures, and ttft, eleven items at one visual level. The groups ran together. The page already has a two-tier convention -- a tight dot between sub-figures inside a group, a wide dot (double-spaced) between major breaks, used that way on the KV lines and the version line. The history line was the one place using the tight dot at both levels. It now joins its groups with the wide dot, so a group edge reads heavier than a window edge, using separation the page already speaks rather than new vocabulary. Verified: dashboard_test 241 checks over 8 cases, extremes.test.js 27, poll_spark.test.js 35, no failures; no test pins the separator. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
0ac154c803 |
dashboard: drop the uptime comparison -- it could only fire on a clock step
8ee893e added `up < lastUp` beside the started_at comparison, to catch a restart landing in the same whole second as the one the page last read. It cannot catch that. uptime_s is derived, not independent: unix_now() - started_at_, both whole seconds, so started_at + uptime_s is exactly the wall clock at every poll. Two processes sharing a started_at are therefore read at increasing wall times and report INCREASING uptimes, so the comparison never fires in the case it was written for. It fires on genuine restarts, which started_at already catches, and on a backward NTP step, which is not a restart at all. Net effect: dead where it was needed, redundant elsewhere, and a false clear of the session extremes on every clock correction. The test that "proved" it worked was fed an impossible fixture: started_at 100 with uptime 40 implies the clock read 140, then started_at 100 with uptime 2 implies 102. Time running backwards is the only way to reach that pair, which is the same mistake the finding it answered was about -- reasoning from a state the instrument cannot produce. It now asserts the reachable behaviour instead: a backward uptime with an unchanged started_at is a clock step and must NOT clear the extremes, since they still belong to the running process. The collision the comparison tried to close needs a replacement process stamped in the same second as the one the page last read. The page can only learn started_at once /stats answers, startup_s after the old process began -- 69 s on this engine -- so a replacement starting after its predecessor stopped answering is stamped a later second. The bound is startup_s >= 1 s; a model that came up inside a second could collide, and would cost one stale extreme carrying a true age. That is documented where the comparison used to be. The acceptance window's use of the same signal is NOT redundant and is untouched: it has no started_at comparison, so for a tab that stopped polling while a new process drafted past the old totals, a falling uptime is the only thing that catches the restart. Verified: dashboard_test 241 checks over 8 cases, extremes.test.js 27, poll_spark.test.js 35, sched_test 62646 over 184, no failures. Mutation re-run after the revert: deleting poll()'s detection line, stamping extAtS on every sample, and deadening acceptTriple's age clause each fail the suite. Behavior is unchanged from the deployed build, which never had the comparison, so no restart is needed for this. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
4d8be7099d |
dashboard: a restart that lands in the same second is still a restart
The poll compares started_at to decide whether the engine is a new process, and clears the session extremes when it is. started_at is std::time(nullptr) -- whole unix seconds -- so a restart landing in the same second as the previous start leaves it unchanged and the clear never runs. The previous run's extremes then render with an age clause attached, and the age is true: the figure really is that old. What is false is the provenance the age implies, that it belongs to the process now running. A stale figure with an honest number on it is worse than no number at all, because it invites the reader to trust it. Also compare uptime_s, which resets to about zero on any new process. It is the same signal the acceptance window already trusts for the same purpose, so this adds no new assumption: it is wall-clock derived, and a backward NTP step reads as a restart and clears the extremes. That false positive costs a cleared window on one poll, which is what the acceptance window already accepts. Found by an adversarial review pass that reproduced it as `highest 75% - 43.0 s ago` from a dead process. Verified: dashboard_test 241 checks over 8 cases, no failures. The case that holds this is the poll() driver in tests/js/extremes.test.js, which fails if the uptime comparison is removed; it lands in the next commit, so this one is not self-proving on its own. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
72ab60ed64 |
dashboard: a session extreme says how old it is, and a restart clears it
The tile detail lines keep the session's best figure when the window empties, which is deliberate: a lane that goes quiet for a minute is the same lane, and blanking its best would throw away the one figure still true. But an extreme with no window beside it is indistinguishable from a fresh one, so a best from before a gap -- or from before an engine restart -- reads as the lane's current best. A review flagged the label as honest but undated; the age is what makes it honest. Record when each extreme was set and, when it stands alone and is at least a second old, name the span: "best 500 t/s - 5m 00s ago". Below a second the clause is noise, and a figure set on this poll is current, so it stays silent. A restart is a different discontinuity from a quiet minute and now gets its own path. The previous process's requests are gone and its configuration may differ, so nothing from it should carry over -- yet the extremes were the one figure that did, while every other number on the page already refuses to pool across a restart: the acceptance window drops its rings when the counters go backwards, and the history resets its base when request ids restart. The poll now compares started_at, which is the process's identity, and clears the extremes when it changes. A gap still keeps them. Verified: dashboard_test 241 checks over 8 cases, no failures. 18 checks execute the shipped noteSample, triple, acceptTriple, resetWindows and newEngineRun sliced out of the page: the clause appears only when the extreme stands alone, tracks the newest extreme rather than the first, stays silent under a second, survives a gap with its age, and is gone after a restart along with the extreme itself. Not tested: the page in a real browser. Found by an independent review pass on the previous changeset. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
e53286cdbe |
dashboard: the history figures mean what their labels say
Five changes to one leg, committed together because they are one claim: a number on the dashboard should be readable as the thing it is named for. They were deployed as 1.15.1-histfix without being committed, so the running engine carried code no commit described, and a review of the working tree could not see its own context. History labels. "avg" becomes "mean", the window figures appear only once enough rows exist to be the window they name, ttft says median, and every history column carries a title= spelling out what it averages and over what. A legend that has to be inferred from a column header gets inferred wrong. The prefill instrument. The history computed prefill speed as prompt tokens over time-to-first-token, which charges queue wait to prefill; GUIDE:2808 warns against exactly that formula. The scheduler now stamps admission and reports prefill_s, so the column measures admission to first token. The page falls back to ttft when an engine reports no admission time, so it still works against a stock build. Windows in seconds. Every displayed window was a sample count, so "60s" meant 60 samples and its span drifted with the poll rate: 60s at 500 ms, 6s at 100 ms. The rings now prune by accumulated time and the sparkline's x axis is time-proportional rather than sample index, so a busy stretch gets the room its seconds deserve and a gap in the samples shows as a gap in the line. This is the precondition for the interval control below; at a fixed rate the two agree, so a full ring draws exactly as before. The interval control. An Advanced view with two editable fields, idle and busy, held in localStorage: the cadence belongs to whoever is reading, not to what is serving, and the server has no writable config that would survive an image swap. Both are plain numbers rather than a mode switch, because the point is that the reader sets the rate; equal values are one fixed rate and the summary says so. Wind-down. The tile detail lines now sample on every poll, so "recent" follows the engine's own idle decay instead of holding the last figure it saw, and a window older than its own span is cleared rather than drawn as if continuous. Fixes from an independent review on qwen, which found the first two: admitted_us was never reset when a slot was recycled. add_locked only allocates when the slot's pointer is null, so the struct survives release_locked with every field it does not list intact, and the first-admission guard then kept the previous request's stamp. The interval spans two requests, the stale stamp is always older, so prefill tok/s reads low rather than missing. It reaches every row once the slot pool turns over. It feeds only this one dashboard column: the engine-wide prefill tile uses an independent windowed counter, and no admission, eviction, preemption or KV path reads the field. Two tooltips still said prefill includes queue wait after the instrument stopped charging it. Both now say what the code does and disclose the fallback, since one window can mix rows measured from admission with rows fallen back to ttft. Verified: both targets build clean. dashboard_test 241 checks over 8 cases, sched_test 62644 over 184, no failures. The new sched_test case drives submit, finish, reap and a second submit onto the recycled slot and asserts prefill_s never exceeds ttft_s, since admission cannot precede arrival; it fails against the bug and passes after the fix, so it can fail. The embedded page parses under node --check, and 30 checks now execute the shipped spark(), the clamp and the cadence trigger sliced out of the page rather than restated: time-proportional spacing, the right-edge fill at startup, a sample gap drawn as a line gap, the 100 ms floor, and the old storage key migrating to a flat rate. Not tested: the controls' behavior in a real browser, and how the session extreme should read when it outlives a cleared window. Found in review by an independent qwen workstream; the slot-reuse finding was confirmed by a second adversarial pass and against the source independently. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI |
||
|
|
bf7e473224 |
dashboard: a card-count change replaces the device rows, it does not stack them
The memory panel rebuilds its per-card rows when the card count changes, but the rebuild only appended: the previous set stayed in #mem. Every card-count change -- a TP flip, a card swap, a lane re-pin -- therefore grew the panel by the old count, permanently, until the page was reloaded. On a box that flips TP2 and TP4 by hand the section becomes unusable within a day: eighteen rows of identical cards after three flips, and the panel's own header (KV cache, prefix hits) scrolls away. Remove the old rows before rebuilding, the same shape the request rows already use above. Per-row removal rather than the sibling guards' container-clear because #mem is shared with the KV and prefix meters, which are built once and must survive. Verified: the embedded page parses (node --check on the extracted script), the translation unit compiles, dashboard_test passes. The behavior itself -- rows gone after a count change -- needs a live card-count change to prove; not tested here. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (xhigh) via Open WebUI |
||
|
|
769b4c64a6 |
radiance 1.16.0
New models:
- Hunyuan3D-2 (hunyuan3d2): an untextured 3-D mesh from one picture of an object. DINOv2-giant
over the picture, a FLUX-shaped flow-matching DiT (16 double-stream and 32 single-stream blocks
of 1024) over 3072 latents with both guidance branches in one step, and the shape VAE's
geometry decoder. Converted from tencent/Hunyuan3D-2's hunyuan3d-dit-v2-0 folder with
data/recipes/hunyuan3d-2-bf16.recipe (fp16 cast to bf16, 4.4 GiB, one card). The licence
(Tencent Hunyuan 3D 2.0 Community License) does not cover the EU, the UK or South Korea
- Served on Hunyuan3D-2's own API server routes, so its Blender add-on and scripts work
unchanged: POST /generate answers with the mesh, POST /send runs it in the background and
GET /status/{uid} reports steps_done and then the file. GLB, OBJ, PLY or STL; the field is
sampled coarse to fine as FlashVDM's hierarchical decoding does, or densely with
"volume_decoding": "dense"; seed, steps, guidance and octree_resolution as the reference.
Texturing (Hunyuan3D-Paint) is refused for now (docs/GUIDE.md §5.17)
Merged:
- libr3d rewritten for RDNA3's wave matrix (@RikshaDriver): bf16, f16, int8-activation and vocab
GEMMs retiled to 16x128 blocks with a double-buffered k-walk; fp8, mxfp4a8, w2a8, w4a16, w5a16
and w8a8 quantised GEMMs and the gated form; grouped MoE GEMMs (bf16, fp8a8f32, mxfp4a8); the
norms and quantisers, the QSA state ops and the MoE router, scatter and gather. Brought onto the
op contract before release (13 schemas, the MoE GEMMs on weight tables with a_order and bf16
output, moe_gather's gate pitch, moe_scatter above 1024 slots, the mxfp4 m16 dispatch) and its
gated-delta-net kernels replaced by libhalo's; every op it serves now passes rad-kbench against
libref on a gfx1151, and r3d_selftest checks its MoE GEMMs by value
- Gemma 4 31B: asymmetric int5 linears (w5a8i8 above 64 rows, w5a16 up to 64, a scale per 128),
the norm, GELU and two-rank all-reduce junctions at quant_act_i8g's grid (rmsnorm_quant_i8g,
gelu_mul_quant_i8g, ar_rmsnorm_quant_i8g) so the prefill overlap runs on the i8a8, a4 and w5
trunks, and compose files for the 31B i8g, heretic-ara-i8g and w5 on two cards (@keptn42)
- The norms' lane sum reads eight at a time: TranslateGemma 27B decode is back from 225 to 239
tok/s a stream at four streams, bit for bit the same output (@mici81)
- The head-256 prefill softmax rescales each row by its own maximum, not by a vote of the wave, so
a row's rounding no longer depends on which rows share its launch (@gostar)
Anthropic Messages API:
- /v1/messages takes min_p, presence_penalty, frequency_penalty, repetition_penalty and
repeat_last_n as top-level fields with the chat path's names, ranges and meaning, so clients that
speak only the Anthropic format (Claude Code) can set a model card's sampling, such as Qwen's
presence_penalty 1.5. The penalties count the last repeat_last_n tokens of prompt and reply (64
by default, --repeat-last-n), as llama.cpp does
Plugin ABI 33:
- Shape generators: rad_declare_shape_generator, RadShapeGenBatch (RadBatch::sgen_b) and
RadArchProbe::gen_shape, with the SCOND, SSTEP, SLATENT and SQUERY passes. The layout
fingerprint table is regenerated; out-of-tree plugins rebuild against 33
- New op point_fourier ([x | sin(x 2^j) | cos(x 2^j)], times pi on request) in libref, libavx,
libr4d and libhalo
- A checkpoint for a model that reads no text gets a one-token vocabulary
More cards from the one image:
- stilldeadcode/radiance now carries libr3d (RDNA3: gfx11-generic, every gfx11 chip) and libhalo
(Strix Halo: gfx1151, preferred there over libr3d) beside libr4d (gfx1201). docker/build.sh and
the Dockerfile default to gfx1201;gfx11-generic;gfx1151
- libr3d loads only where the KFD topology lists a gfx11 card and libhalo only where it lists a
gfx1151; a process without /dev/kfd sees neither. On an RDNA4 card, or with no card at all,
the image therefore behaves exactly as before, and rad-convert lays weights out as before
- libhalo and libr3d now declare gemm_nt_q's w_rb, and libhalo gram_accum's upper, as libr4d
does. Before, any build carrying them refused both at load ("9 parameters vs 8"), so a build
for Strix Halo or RDNA3 had no device kernel library
- libhalo does not yet have every op libr4d added after it was ported (the IQR rows, Pixtral and
Ministral rope, the tree-attention and DFlash-tree rows, among others); halo_parity lists them
and is left out of the image's test stage until they are ported
Fixed -- container and checkpoint parsing:
- A .rad expert-1 entry inside or before expert 0 is refused; a vocab section whose count names
an array at offset 0 is refused rather than read from the file header; offset checks no longer
wrap; header tables must sit on their element alignment
- An imatrix array of arrays (unbounded recursion) and a safetensors header naming a tensor twice
are refused; a failed RadWriter undo says the container is damaged; a tune cache measured on
another machine is refused, as its format contract says
Fixed -- plugins:
- Two plugins declaring one op with different parameter roles are refused; before, the core
applied the first one's chunk/capacity roles to the other's rows
- Null tables behind nonzero counts, unknown roles, keyless parameters or constraints and more
operands than an issue carries are refused by name at load; on the host backend device rows are
dropped even when no fat binary was registered; rad-schemas checks the ABI layout fingerprint as
the engine does
Fixed -- device:
- Stream slots are recycled under a new generation: before, 1024 stream create/destroy cycles
(LoRA loads, lanes, uplinks) made every later rad_stream_create fail
- A stream whose drain fails keeps its queue and kernarg ring instead of freeing them under the
card; the kernarg ring no longer leaks when its access grant fails; a block over 1024 work-items
is refused
- rad_dev_free takes the allocation off the ledger the pin-cap check reads; the host backend
charges pages to the card the range was reserved for
Fixed -- engine and server:
- Two NDEBUG-only asserts (runtime-window totals, ring blocks per group) are refusals; a
plugin-declared lcm past int64 saturates so the quantum check refuses it; every share view rect
and part span is bounded by its entry
- Video: the timestep regions hold the refine rungs a schedule appends, a zero-frame encode is
refused, /v1/videos bounds each side before the area product, and a realtime session needs a
clip length to cut a turn at
Fixed -- kernels and quantisation:
- A trellis run shorter than a state's codes (tcq_rows=1, or N % tcq_rows == 1) read its seam
out of bounds; the encoder now refuses it as the decoder does, and tcq_rows below one state is
refused at parse
- qsa_tail_store bounds its slot index by the state plane (libr4d and libhalo); paged attention
refuses kv_heads <= 0; libavx row_amax skips a NaN as libref does
Fixed -- tools:
- pad_tp.py no longer runs cp through a shell with shard names from the checkpoint's index
(quote injection, path traversal): names must be bare file names
- ops_doc_check.sh runs under mawk (Ubuntu's awk); rad-kbench --max-cases/--max-bytes are checked
integers; oot_plugins fails unless the installed replay passed a case and failed none
Thanks to @RikshaDriver, @keptn42, @mici81 and @gostar.
|
||
|
|
b6acbd69e4 |
server: name the caller a vouched proxy carried, without arming the guard
An operator running radiance behind a reverse proxy sees one address in every log line: the proxy's. --trusted-proxy CIDR (repeatable) vouches for the networks whose sockets may say who they carried. An X-Forwarded-For from inside a vouched network is walked from the right: vouched hops are skipped, the first address no vouched CIDR covers is the caller, a chain of only vouched hops ends at its leftmost, and anything else falls back to the socket. From an unvouched socket the header names no one, because it has not been vouched for. Attribution is not authority, and the split that keeps them apart is mechanical. HttpRequest carries `peer`, the attributed caller, sanitized where it is built because a named address arrives in a header and the log keeps no client text otherwise -- and `raw_peer`, the socket as the kernel saw it, which is now the only address peer_is_loopback() reads. A proxy on loopback therefore hands the keyless loopback-only routes to none of its clients; it only names them where the proxy used to stand. transport_test pins both halves: the walk at the unit level, and over a real socket that a vouched proxy plus X-Forwarded-For leaves the loopback guard answering 200 and the cross-origin 403 untouched. httplib's own set_trusted_proxies -- new this side of the vendor bump -- is deliberately unarmed. It rewrites req.remote_addr, the very field the guards would read as the socket peer, so one over-broad vouched network would move the guard rather than the log line. Radiance reads the header itself, and ip_in_cidr refuses across families: a vouched ::ffff:0:0/96 vouches for no IPv4 socket. Config rejects anything but a numeric network with a prefix at startup, because a typo there would silently unvouch a proxy; the refusals the transport answers before the router log the attributed caller too, so the audit trail stays one line per request whoever the socket belongs to. |
||
|
|
1577854d00 |
hfget+deploy: fetch a repo on verified claims, and run with a key argv cannot show
The --model repo-id path trusts the hub with the machine's filesystem and the container runs with the kernel's door off. Both stop here. hfget.sh trusted a listing's file names to be names: an absolute path or a .. segment wrote wherever the destination's owner could write, and a name shadowing .hfget-manifest taught the next run whatever it liked. A listing is now vetted whole before anything is fetched -- absolute paths, .. segments, control characters (a tab splices one entry into two fields), names of hfget's own manifest -- and a child refuses a path that would escape anyway. Silent skipping was the alternative, and it leaves a directory that reads as complete and is not. And the content key was the hub's claim, never checked: an LFS file was kept for its size and its claimed oid recorded without ever hashing the download, so a swapped file of equal length -- or a spliced resume at any length -- passed forever after. The download is hashed on arrival and kept only when it matches the claimed sha256; a mismatch deletes the file, and the manifest now certifies verified content. --model-revision REV fetches at a branch, tag, sha or refs/pr/N instead of the moving main: without it a restart can serve weights nobody reviewed, and the guide now says to name one. --api-key-env NAME reads the key from the environment, where only the process and root can reach it, not the command line where every process on the host reads it in ps; an unset or empty variable refuses startup exactly like an empty --api-key. The compose files carry the key through environment: now -- the fail-closed :? guard moves with it -- across all 52 model files. And the containers' seccomp=unconfined has a way out: Docker's default profile, plus exactly the calls that forced the escape -- io_uring for the n-gram table, mbind/set_mempolicy/get_mempolicy for ROCm's NUMA binding -- is shipped as seccomp-radiance.json and selected through RADIANCE_SECCOMP; the default stays unconfined until each operator audits their own card stack. Verified: under the profile io_uring_setup and set_mempolicy behave as under unconfined and a non-listed syscall earns EPERM. hf_model_test: the escape-listing refusal, the oid verify (bad rejected and deleted, good certified), the pinned revision fetched -- against a fake curl for a hub. config_test: --api-key-env fails closed unset, reads the key set. ASan+UBSan: config/diag/hf_model/server/transport/ wire/lifecycle, 8/8. |
||
|
|
ad3f03dbc6 |
server: no internals on the wire, no client text in the log, no paths for strangers
Four ways the server told more about itself than the caller earned. The exception handler logged e.what() sanitized and then put the raw string on the wire: a 500 whose message echoes request text is a reflection point, and one that quotes how a handler broke names the server's internals to whoever prodded it. The wire gets the generic sentence now; the reason stays in the log. The realtime and speech sockets caught their session's exception the same way -- raw what() to the log and onto the client's error event -- and follow. Their WebSocket wrapper logged e.what() and the request path unsanitized: the path is fully client text, and a client that can put CRLF and an escape sequence into a log line can forge the next one. A security-relevant header sent twice is a request built to be read two ways: this server reads the first copy, a proxy in front may read the last or join them, and whichever copy the disagreement lands on, the attacker picked it. Host, Authorization, X-Api-Key and Origin are refused whole at 400 before either reader -- the key gate included -- even when every copy carries a valid key. The lookup is case-insensitive, so an Authorization beside an authorization counts. And the model card's `root` is a path on this machine, served to anyone /v1/models admits. Keyless, it now belongs to the local operator, the rule /diagnostics and the LoRA admin already follow; with a key it travels with the key. server_test: the_models_root_path_follows_the_key. transport_test: a_duplicated_security_header_is_refused. ASan+UBSan: server/transport/ wire/stream/speech/speech_stream/dashboard, 7/7. |
||
|
|
1c967b2f14 |
sched+engine: keep a scored request's size from reaching the pinned pool
A scored request asks the engine for the logits of chosen candidate ids at its prompt's last position (Request::token_scores). Three places where that readout's memory was someone else's decision: The candidate list was bounded by value, never by count, and the count is what a scored step pays for: the step stages the union of every staged request's candidates as hidden and table rows in one pinned host buffer, before anything is admitted or accounted. One request naming a million ids -- any caller of the raw request seam -- is a multi-gigabyte pinned allocation the box either loses or dies on. add_locked caps the list at 4096, orders above what a decision request names (its prompt's written answers, a few dozen), and says so in the refusal. And when the pinned allocation is lost anyway -- the cap bounds one request's rows, not the batch's union, and the pool can be low for reasons of its own -- stage_scored_rows returned E_NOMEM into the step loop's fail path: the whole engine stopped, every connection with it. It cancels the scored requests instead, on the step loop's existing deferred-cancel vector the sampler's grammar failures already use: a request whose scores the box cannot hold is that request's failure. No alloc-failure seam exists to test the branch directly; its cancel path is the sampler stage's, applied at the same join. And declare_scores now refuses a head table shorter than the vocabulary: the scored readout indexes it by token id, the scheduler bounds candidate ids by meta.n_vocab, and a table a few thousand rows short turns the last block of the vocabulary into a read off the end of a weight -- a device fault, not a refusal. Padding past the vocabulary reads fine and stays fine. sched_test: a_scored_request_names_at_most_the_candidate_cap. build_test: declare_scores_wants_a_table_that_covers_the_vocabulary. ASan+UBSan: sched/build/server/systemone/config/diag, 6/6. |
||
|
|
5f7244da4d |
server: bound what an unauthenticated socket can make the transport hold
Three ways a client spent the server's patience or memory without ever being admitted: The gate's 401 answers before any handler sees the request, so its body sits unread on a keep-alive socket, and httplib's anti-smuggling drain will wait for it: one byte per read timeout paces a whole worker, at the pacing client's chosen rate. The refusal now closes the connection instead, says so on the response, and buries the body with the socket -- which is also what makes draining a refusal pointless. A drain that does have a purpose -- a framed body on a request the router answered without reading it -- inherits the stream's 30 s read wait per packet gap and no total bound at all. It keeps both waits now: five seconds per gap (the stream's own set_read_timeout, the same knob the WebSocket upgrade uses) and five in total (a deadline the discard provider checks), then the connection dies and the timeout is restored for whatever the connection still has coming. And bodies. The per-request cap bounds one body and no sum, every byte of a body is buffered before parse, admission or any accounting sees it, and a few hundred concurrent large POSTs is an OOM that reaches the engine before any refusal does. read_and_bridge now holds every buffered byte against a transport-wide budget and answers 429 with Retry-After to the newcomer the budget has no room for; the reservation releases on every exit, including the peer vanishing mid-body. The budget defaults to eight bodies at the per-request cap and moves through ServerOptions::max_inflight_body_bytes. Vendor: the two httplib hunks are recorded as patches/0022, and UPSTREAM's "no file content differs" for the pair is replaced with what the split actually is and what is now edited in it. transport_test: a_refusal_closes_the_connection, a_stalled_drain_dies_on_its_deadline, the_inflight_body_budget. ASan+UBSan: transport/wire/lifecycle/server/config/diag/dashboard, 7/7. |
||
|
|
ec53bce5dc |
server: stop treating the loopback socket as identity
Three guards read a loopback peer plus a matching Origin as "this is the machine's operator". Two real topologies forge exactly that: DNS rebinding hands a hostile page its victim's own browser, so the peer IS loopback, and the page is same-origin with the server, so the Origin/Host compare stays silent. Only the Host still says which name the client asked for, and the attacker's domain cannot be made to read as the loopback. The documented TLS-proxy topology puts every remote client behind a loopback socket, and a non-browser client sends no Origin at all; the proxy passes the public Host, which the new check refuses. Server::local_operator now guards the keyless routes: the socket, the Origin, and a Host naming the loopback, --allow-host, or a concrete bind address. GET /admin/control-vector takes the guard POST already had, placed before the 404-that-means-no-vector so a remote page can probe neither; keyless DELETE /sessions and /reset_prefix_cache -- which destroy other clients' cached conversations -- answer the machine only. --allow-host (repeatable) admits names an operator reaches the box by from the box itself. A local user at the console stays admitted; nothing about a key-set server changes. GUIDE 6.6 states the new posture. |
||
|
|
d54f3b9e6e |
server: bound the last unbounded parses of untrusted text
Three ways in, each ending in a parse that bounds neither what it builds nor how deep it nests: videos.cpp read its multipart form fields with the raw parser, so a 512 MiB field of brackets died at the tree's teardown; the same file's JSON path was bounded, so the form path now shares its gate, and a field over budget or over depth reads as a bad parse (a form test pins both refusals and a well-formed field). Anthropic's buffered body parsed the model's tool-call arguments directly; the streaming path already scans them with json_complete, whose depth cap keeps a cooperating model from stack-killing the worker, and the buffered body now passes the same gate, reading too deep as an empty input. The image decoders checked the container header's dimensions against the pixel cap but converted whatever the bitstream actually decoded; a container whose SPS disagrees with its header slipped through. Both now re-check the decoded frame, as the video path already does. The re-check is inside RAD_HAVE_FFMPEG and compiles with every FFmpeg build; the media-less container proves the two server changes. |
||
|
|
9560780bfa |
sched: a preempted prefill reclaims cache and leaked state slots before it waits
The whole-recompute gate refused a preempted request forever when the pool held only cache entries, and an empty running set left a leaked state slot unreclaimed. Reclaim the cache over several rounds, release idle state slots when nothing is running, and admit the overdue waiter if it can ever fit. A prefill is never a victim while a decoder is running; tests cover the deadlock, the leaked slot, and the lost KV sequence. |
||
|
|
9ed3ef7a7b |
radiance 1.15.0
New models and formats: - IQR for Qwen3.8-27B: weights on the int8 grid under GPTQ, a trellis down each GPTQ column (IQR-V2), and IQR-V3, a computed trellis code under one scale a row, kept at its codes' width in VRAM and decoded in the GEMM; 15 IQR-V3 recipes from ~2 to ~7 bits a weight (data/recipes/q38-27b-*-v3.recipe, docs/IQR.md) - libhalo: a kernel library for Strix Halo (gfx1151), preferred there over libr3d - Nemotron 3.5 Embed 1B and 8B (nemotron35_embed): text and image embeddings through a Pixtral tower, on the card and on the CPU - Nemotron 3.5 Rerank 8B - /v1/systemone: Cloudflare's clef and clef-flash, Convai Innovations' Laya and Mica beside LiquidAI d1; scored steps read the candidates' logits from the head table with no lm_head pass - LFM2's 8-bit trunk: block-fp8 or int8 linears with the fused producers, and the d1-3B recipe - DeepSeek-V4.1's reply format with DSML tool calls and typed argument tags Weights on the drive: - The file tier reads only the experts the pass routes rows to; the draft head's weights stay in the host pool - A hot VRAM cache for routed experts read off the drive, reads deposited straight into free host pool slots, and copyless evictions; the file tier's counters are now ssd_* - GLM-5 Next shards its routed experts by expert, not by width, so they can live on the drive - The stall watch counts drive reads as progress, and the DMA lane's room check reads the lane's own completion fence Quantisation tooling: - --calib-corpus, --calib-dir and --calib-layers record each linear's input Hessian; beside --kld-record the reference's own run records them - --kld-top N records a sparse KL reference (the N most likely tokens and the tail's mass) - GPTQ in a third of the time with the same codes, trellis GPTQ on the card, vector codebooks with coordinate descent, and rad-convert --reuse repeated, each container supplying what the earlier ones lack Speculation: - Prompt lookup alone (--spec-ngram K, --spec-ngram-min/-max): each sequence keeps an index of its n-grams, and a proposal is verified only when its measured step cost says it pays; --draft-window adaptive follows it Speed: - IQR decode: the narrow tile splits K for four times the int8 tile's waves and folds each 128-K block once; at 8 tokens down and the output projections run in 0.61-0.82x and 0.70-0.92x FP8's time (2-6 bits); IQ6R-S-V3 with its DFlash2 drafter steps in 26.3 ms at TP2, against 29.4 ms before and FP8's 27.3 - Qwen MXFP4 feed-forward: the gated fold up to 16 rows, not 8 - libr4d: the gated prefill fold, the short-prompt split row, and the rows forms of rmsnorm and rope; KLATE again for the head-256 gqa6 paged prefill; gram_accum on the matrix cores Features: - /health, /v1/health and /ping answer 503 with "status": "stuck" once the device has advanced nothing for a minute or a queue has faulted, so a supervisor can restart a wedged server (#356) - --image-gen-max-pixels and --image-gen-max-refs size an image generator's buffers (#344) - The startup report lists only the options not at their default, with a count; -v lists all (#250) - --preempt-wait-ms bounds how long a preempted prefill waits for its whole-recompute room - --placement layer_offload spills dense layers so one --max-model-len sequence fits - Startup refuses amdgpu with CWSR off and says how to fix it; --proceed-with-incompatible-configuration starts anyway under an UNSUPPORTED banner Fixes: - The n-gram read-ahead hands each row to the reader once and reads only as far ahead as the row cache holds, and pauses while decode reads: about one drive read a row instead of two (#355) - A file-tier window reads each of its runs once, not once a run per run - The decode split law's verify floor is bounded by the batch's workgroups: max_seqs 256 no longer declares 64x the scratch (#342) - A prefetch DMA list's mark stays out of the signal pool until the engine has read it, and a prefill stage copies only the blocks its own tables name (#343) - The split-KV row sum is read with fetch-inactive (#328) - LFM2 on the host backend: libref and libavx serve the row-form ops it declares (#348) - The preempted-prefill gate skips a KV group that holds no blocks (#352) - Every request entry point bounded, gated and sanitised (JSON depth, invalid UTF-8, control bytes in the log, the dashboard's CSP, cross-origin browsers on the loopback-only routes); a prompt id outside the vocabulary refused at admission; --api-key "" refused at startup - The telemetry the HTTP thread reads is atomic - An RMS norm row no longer depends on how many rows its launch carries; prefill attention's rescale is decided by live rows only - A --kld-record prefill chunk that finishes no sequence gets its logits on a tied-head model - A kernel's lazily made counter block is zeroed outside the lock other ranks take (a TP2 first-step hang) Changes: Plugin ABI 32. Every plugin exports a layout fingerprint of the ABI structs and the loader refuses a plugin without it or with another (#302), so out-of-tree plugins must be rebuilt. Appended: RadBuildCtx calib_* and gen_max_*, RadArchProbe gen_max_*, RadBatch score_only and plugin_words, RadDeviceProps::unified, RadChatFormat arg_json_value_prefix. |
||
|
|
8da043c246 |
place: the caching layer -- hot VRAM cache, deposits, copyless relabels
Routing-aware reads leave a routed expert's bytes on the drive when the pass routes nothing to it, but the reads that DO happen still have two wasteful fates: they land in a per-pass buffer thrown away at the next layer, and they cross the link even when the same bytes already sit in a host pool slot that just went cold. This commit gives both bytes somewhere to stay. The hot VRAM cache: a routed expert whose read heat ranks past the admission bar lands in a shadow slab slot and stays there. The slot is its address from then on, until heat evicts it -- eviction is a copyless relabel (back to Tier::SSD, publish null); the container is ground truth. The planner budgets the shadow slots for it (per-class on_disk count); the mover admits (Kind::Admit), evicts, and retires the admissions. Deposits: a free pool slot takes the O_DIRECT read directly -- the read's destination IS the slot -- and the unit becomes a pool unit the GEMM reads zero-copy, with heat promoting it at PCIe speed later. Its demotion is a copyless drop (the slot still holds the bytes). A full pool evicts its coldest unrouted unit by relabel, copyless, and the freed slot feeds the next deposit. The counters follow the traffic: the file stager's family is renamed file_* -> ssd_* (ssd_layers, ssd_units, ssd_read_bytes, ssd_preads, ssd_read_ns, ssd_wait_ns) beside the existing ssd_reads/ssd_bytes, and the new legs are counted (ssd_staging_bytes, ssd_promotions and ssd_promoted_bytes, ssd_deposits and ssd_deposit_bytes, pool_evictions). The dashboard's expert plane gains the matching staging, promotions and deposits rows, and --weights-disk-tier's help text names the tier. Measured on GLM-5.3-Flash TP2 (2x Radeon R9700), 250-token essay at temp 0: 5.49 tok/s at ~104 GiB of SSD reads per run, against main's 2.05 tok/s at ~378 GiB. Assisted-by: GLM-5.3-Flash |
||
|
|
9efdd00c4c |
place: routing-aware file-tier reads
The file tier read every file-tier unit of a routed layer whether or not the router sent rows to it. A deep layer keeps whole experts on the drive (288 per world), but a pass routes rows to a handful of them: the read volume was ~18x what the router justified, and the engine streamed ~378 GiB from the SSD per run at 2.05 tok/s (GLM-5.3-Flash, TP2). The layer's router has run by the time the stager triggers -- the trigger is the layer's first expert op -- so the pass's route counts are already on the device. Ctx::route_counts_device exposes them; the file stager hands them to Mover::stage_file_units, and an expert counted zero, which has no sorted rows and no GEMM run naming it, is left on the drive: its weights are not read at all. Its table entries are published at a valid dummy address (the calm region) for the pass and nulled again with the staged units, because the kernels still issue the layer's table and a null entry fails the step. Published even when EVERY unit of the layer is skipped -- a decode step can route nothing to a layer. The drafter's own weights (the "mtp." namespace) run on every draft pass of every decode step, more often than anything a profile could rank, so the planner pins them in the host pool ahead of everything ranked (MoveUnit::draft_head) instead of letting the expert fill push them to the file tier every step. Read extents are also clamped to the container file's size, so a truncated container fails a read loudly instead of reading past EOF. Measured on GLM-5.3-Flash TP2 (2x Radeon R9700), 250-token essay at temp 0: 3.4-3.6 tok/s where main gives 1.42 on the same prompt. Assisted-by: GLM-5.3-Flash |
||
|
|
6f6b5c3f78 |
aql: the stall watchdog is progress-aware; the DMA lane's ring completion is fenced
Main's stall watchdog samples only the queues' read indices, and the DMA lane trusts the SDMA queue's written-back read pointer for its room check. Both stall wrongly: a drive-paced prefill parks every queue for seconds (one rank spins at the all-reduce while the other reads its layer off the drive -- spurious dumps), and the SDMA engine's written-back read pointer can stop moving while the engine runs on -- a full ring then waits forever, wedging the startup pool fill above ~32 GiB/rank. pread_exact counts the bytes it returns (rad::dio_progress); every O_DIRECT read funnels through it, and read_progress adds that to the queues' read indices: a wait that moves nothing anywhere is a hang however slow the drives are, so the threshold is a flat 5 s and every stall report is genuine. The main DMA lane names its lists the way the xp queue already does -- each list ends by writing its number to a word the engine keeps advancing (fin/ends) -- and dma_read takes the further of that fence and the read pointer, so the room check can no longer mistake a stalled writeback for a stalled engine. dump_dma_lanes reports the finished-list count. Verified on the wedge reproducer: GLM startup with a 36000 MiB pool fill, decode with promotions, and a 13300-word drive-paced prefill -- zero spurious dumps, the ring live throughout. Assisted-by: GLM-5.3-Flash |
||
|
|
74e7fddd79 | nemotron 3.5 rerank 8b implementation | ||
|
|
d773992abc |
[FIX] restore the prompt vocabulary check, the empty --api-key refusal and scored steps' issue-ahead rule
|
||
|
|
8df9240d65 |
sched: the preempted-prefill gate skips a KV group that holds no blocks
Every program carries a sentinel KV group at index 0. KVGeom reads its decl.kind 0 as RAD_KV_FULL with block size 1, while the manager's plan for it pages nothing and owns no block. The gate ( |
||
|
|
94c90b17ad | nemotron 3.5 implementation | ||
|
|
33108e488b | sched: a bound on the preempted-prefill gate's wait | ||
|
|
ec243c2a7d | Merge main into laya-arch-plugin |