Archived
b4c04b6042861ef652af6dc076e67f03f87a01ac
130
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
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. |
||
|
|
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. |
||
|
|
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. |
||
|
|
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 |
||
|
|
74e7fddd79 | nemotron 3.5 rerank 8b implementation | ||
|
|
94c90b17ad | nemotron 3.5 implementation | ||
|
|
33108e488b | sched: a bound on the preempted-prefill gate's wait | ||
|
|
ec243c2a7d | Merge main into laya-arch-plugin | ||
|
|
ed1e5caf9d |
core, abi: scored steps -- rad_declare_scores, RadBatch::score_only, and /v1/systemone's model
A scored request (Request::token_scores, what /v1/systemone asks: the raw logits at a few candidate ids) does not need the half-gigabyte lm_head read the sampler would consume. A plugin whose head is the bf16 embedding table declares the final-normed hidden rows and that table (rad_declare_scores); on a step whose sampled rows are all scored rows and whose program declared both, the core sets RadBatch::score_only, the plugin issues everything but the head, and the core reads the hidden rows and the candidates' table rows back and takes the dot products in f64 on the host. RadBatch gains one trailing int32 (score_only, 360), which the pass key mixes; an older plugin never sees it set. The scheduler issues no step ahead of one that brings a scored row to max_tokens: that forward pass reads nothing and a max_tokens=1 question would pay a decode step after its prefill. Scored rows only -- every other decode keeps the step of overlap it had. /v1/systemone reports which model answered. Co-Authored-By: Pi <pi@localhost> |
||
|
|
9093bf618e |
place+runtime: make the telemetry the HTTP thread reads atomic
/stats and LiveView read the mover's and heat engine's counters, the live tier of every unit, and OpInfo::issued while the rank and step threads write them between passes. Plain fields under a concurrent reader are a data race: no torn number matters on a dashboard, but the compiler may tear, and the sanitizer is right to stop the process for it. MoverCounters and HeatCounters mirror each struct's fields as relaxed atomics, written exactly as the plain counters were and read whole through snapshot(); tier_ gains a per-unit atomic byte mirror (TierMirror, copyable because HeatEngine is), and the step path and the graph dump meet on OpInfo::issued through std::atomic_ref, which keeps the struct layout and its copies intact. Engine-internal decisions keep reading the plain counters -- they never race -- and only the HTTP-thread readers go through the mirrors. |
||
|
|
b9c685a9c3 |
server: bound, gate and sanitize every request entry point
Prepared for exposing the dashboard and the API beyond the local machine. Each piece answers a finding from the review; none changes what a legitimate client sees. Parsing. Six entry points still called json::parse with no bound on the tree: the two WebSocket sessions, the image form's loras field, the two re-parses of template kwargs, the control-vector POST and the lora-admin body. A legal frame or body of brackets alone built a tree whose teardown recurses once per level -- one worker stack, one process. They all go through parse_json_bounded now, the body cap's own value and depth limits. The same reasoning already refused deep bodies on the generation routes; frames and form fields were the ones that never passed a gate. Errors. ApiError::dump threw on invalid UTF-8, and URL-decoded params reach messages without passing a JSON parser: a 404 becomes a 500, or worse a closed connection. The dumps replace bad bytes instead of dying. Logs. Session labels and echoed request text reach the log; an embedded newline forged a line and an escape sequence drove the terminal reading it. log_sanitize filters control bytes at the entry points -- labels, refusal logs, the exception handler -- while the three loggers that print multi-line reports deliberately keep their newlines. The browser. The dashboard page ships a CSP (its script talks only to its own origin) and X-Frame-Options DENY; every response carries X-Content-Type-Options: nosniff. And the loopback-only guards -- control-vector default, runtime LoRA, diagnostics -- now treat a cross-origin browser as the remote client it is: a hostile page reaches them through the victim's own browser, which is exactly loopback. Origin not matching Host refuses; same-origin and non-browser traffic are untouched. The gate. The API key's path exemptions are method-scoped (reads, plus the POST /ping of the health-check convention), so an exemption can never ride a method no route answers. An empty --api-key value is now a startup error rather than a server that looks guarded. SSE. In the vendored httplib 0.46 an exception escaping a content provider aborts the process; the provider ends the response instead. Upstream's 0.54 serve_guarded fixes the cause -- the vendor lift is owed either way, and the catch is harmless belt until it. |
||
|
|
4a61d7296b |
radiance 1.14.0
New models and formats: - libr3d: a kernel library for RDNA3 (gfx11) cards - nomic-embed-text-v2-moe (the nomicbert plugin) - Gemma 4 E2B with its per-layer MLP width, and Google's unmodified E2B/E4B directories in bf16 - DeepSeek-V4.1-Flash converted straight from its release: the Engram tables, the fused imatrix and rad-convert --chat-template for a release that ships no template - GGUF Q8_0, Q4_K and Q6_K tensors import as their planes; rad-convert writes them without a recipe - Qwen3.8-Flash-Next-FP8 converts and serves through qwen4exp_fp8 Speed: - hc_read's decode kernels as one grid (34.7 -> 25.2 us at 4 rows) and its tiled up-mix pipelined - gemm_fp8a8: the narrow form's scales staged through LDS (Flash-Next int8 at 32 rows 83.6 -> 68.3 us), the gated three-tile form at 8 waves (gate_up at 48 rows 272.9 -> 180.6 us) - Qwen3.8-27B: the delta net's out-projection read beside its decode recurrent update (x1 19.40 -> 19.10 ms a step), and the verify's split-KV attention sized by context depth (x3 at 180K 42.4 -> 40.3 ms a step) - Hy-Memory (HYV3) decode: fused QK norm, RoPE and KV store, residual adds folded into the norms, coalesced one-token expert GEMMs - spechub: the coupled verify walks the live candidates only (151 -> 31 us a launch) Speculation: - DFlash2: lossless coupled acceptance at T > 0 (--draft-coupling on) - A block drafter's proposals verified as a tree, on by default for the Gemma 4 31B's DFlash2, with a block-16 tree that runs its short block under load Features: - Decode-hot residency: --draft-expert-placement host, --expert-profile, --expert-pin-top, and --expert-stats FILE for the routed experts each layer selects - --ngram-placement ram=DIR: one n-gram table shared by engines on separate cards - Prefix cache: --prefix-resume exact (default) resumes a hit on the cold run's own chunk grid, so it answers bit-identically; snapshots at a head other prompts share, from 528-token prompts, and for tip-only one drafter window below the tip; hits on models whose KV groups have different block sizes; the snapshot store keeps a floor of 8 ahead of --host-headroom-mib - Typed tool-call argument tags; rad-chatparse --request renders and reads back one request as the server does - MiniMax-H3: keyframes ride a latent upscale - Gemma 3's fused all-reduce junction on the lossy wire Fixes: - A speculative step shorter than its band (an MTP step of 4 rows at gqa 8) no longer stops the engine with a scratch refusal at issue (#293) - --p2p off: prefill back to 1.12.0's rate; 1.13.0's push check read a host-memory slot over the link twice (#323) - A chat template that cannot render a conversation is refused at load, not mid-request - imatrix entries found under llama.cpp's spelling; the W4A8 prefill's tail scale read; the GDN conv kernels on an f32 weight; dense integer rows at the group they compute (a Q8_0 weight at group 32) - --expert-profile refuses a profile recorded on another model - hc_read's one-grid wait traps past its deadline instead of reading a stale value Changes: Plugin ABI 31, unchanged. RADIANCE_DRAFT_TREE, DFLASH2_TREE_NODES, DFLASH2_TREE_TEMP and DFLASH_Q_TEMP are gone (trees run where the probe says they pay; temperatures 1.25 / 0.6). |
||
|
|
711cdd0cd7 | mica: Mica on /v1/systemone over the qwen35 plugins; d1's readout shared | ||
|
|
9c605a103d | laya: Laya decision models on /v1/systemone (arch/laya) | ||
|
|
d24cf32a13 | Merge main into clef-flash-arch-plugin | ||
|
|
9f707a0f67 |
driver+server: keyframes ride a latent upscale -- pinned at the small size, then re-encoded at the full size
A keyframe is pinned on the grid the steps run on, which is why
|
||
|
|
72d192dbf6 |
clef: the head's rows bounded at 32768 prompt tokens, not the context
(cherry picked from commit fdc445a7cf1f6de620df6148d0482c8c795b2b27) |
||
|
|
a96bfe821f | clef: the joint schema head on the card, served on /v1/systemone | ||
|
|
82c114e84e | server: clef's prompt and spans, /v1/decisions, decision in capabilities | ||
|
|
6645337f69 |
radiance 1.13.0
New models: - Tencent Hy-Memory (HYV3) from its BF16, FP8 and GGUF checkpoints, with its native tool calls - M2XFP4: metadata-augmented MXFP4 weights for Qwen3.8-27B and its DFlash2 drafter (top-1 89.1% -> 92.4% against plain MXFP4), its quantiser and recipe, and ParoQuant's M2XFP4 checkpoints - Gemma 4 E2B/E4B audio input; NVIDIA-Nemotron-3.5-Bolt-E4B in int8 and 4-bit, on two cards by default; Ornith-1.5-122B compose files Speed: - Weight reads beside the decode all-reduces (qwen35_fp8, gemma3; --weight-prefetch, on by default): the 27B MXFP4 with DFlash2 61.2 -> 67.9 tok/s at c1, TranslateGemma 27B +13% - Head-256 split-KV decode attention at 256 workgroups and without bank conflicts (27B: +3-5% a step at 25-41K context), and the prefill KV split for small launches (a short turn over a long context decodes the other sequences 27% faster in that step) - MXFP4 decode gate_up, activation and fp8 quantiser in one launch (27B, Gemma 3 up to 64 rows: TranslateGemma +2-5% at 2-8 streams) - ParoQuant int4/int5 tiled GEMMs 6-9% faster - Speculation: a step's tokens are sent before the drafter's passes end, no step waits behind one that ends its requests, and the MTP head's first draft no longer collapses after short chats in the prefix cache Features: - --kv-resident N: KV streaming for a context bigger than VRAM (qwen4exp_fp8, GLM-5.3) - MiniMax-H3: reference media and keyframe conditioning with the VAE encoders - Krea 2 rebalance presets balanced, detail and subtle - The dashboard's request history; a stall watch that reports a frozen step's thread and stack - rad-tune at the served configuration, collectives measured as the exchange; Gemma 4 E2B/E4B's per-layer embeddings read ahead off the step path - A GPTQ calibration tap and recipe for Gemma 4 31B's w4a8 container Fixes: - The two-rank all-reduce checks that a peer's push has landed before reducing it - z-lab's DFlash drafter on Gemma 4 31B keeps drafting after a prefix-cache hit - MiniMax-H3's modulation rows Changes: Plugin ABI 31: out-of-tree plugins must be rebuilt. RADIANCE_PREFETCH_BESIDE is --weight-prefetch now; RADIANCE_NO_HUGE_PAGES, RADIANCE_IDS_EARLY, RADIANCE_ATTN_BAND_SPLIT, R4D_PREFILL_SPLITS, RAD_PLE_TIMING and RAD_PLE_CACHE_ROWS are gone. |
||
|
|
aa989db567 |
dashboard: a history section under the requests card
A request is listed in the Requests card only while it exists. The engine drops it from /stats within roughly 20 ms of its last token on a one-token reply, and within half a second on a long one, so the per-request figures an operator actually compares runs on -- average tok/s, time to first token, context at finish -- are gone before a reader who looked away gets back to them. The card now keeps the last 200 completed requests, per browser, in localStorage, under the live table: prompt, completion and context tokens, ttft, prefill throughput derived from the uncached prompt and the time to first token, decode throughput, and age, plus the averages of those rates and the median time to first token. Capture is by sighting. A request is recorded the moment a poll catches its state as done, or, since the engine usually drops it before that happens, from its last sighting once it leaves the payload. What began and ended between two polls was never seen, so it is counted in a grey row rather than invented. The poll runs at 100 ms while something is in flight and 500 ms when idle; the idle rate is what the page had before, and the faster rate is what makes capture work at all. Ids are the history's own, not the engine's. The engine renumbers 1..N and restarts at 1, so each row carries a unique storage key (engine id plus a running offset persisted across restarts) and a separate history id shown in the # column: it starts at 0, and clear writes that counter back to 0, so a cleared table begins again at #0. Rows are shared by every dashboard tab: a save unions with what is stored, deduplicates by key, and a clear is a timestamp every tab honours. clear and json sit in the section header. The card is 459 px -- one and a half times the stock 306 -- to give the history rows; the live table stays fixed at the top and only the history scrolls, under a column header that stays pinned. On a phone the history list chains its scroll to the document, as the request table already did. |
||
|
|
bcdc89eded | Merge branch 'main' into fix-stage-drain | ||
|
|
c5483e3241 |
videos: the tower reads a keyframe's own canvas frame, never a re-decode
The reference feeds the vision tower the same resized tensor it hands the video VAE: an anchor's identity and its pinned latent are the SAME pixels. Our port showed the tower the source file at the `match` area instead, so a keyframe whose native aspect differed from the canvas reached the two channels differently (parallel PR #236, point 5). A keyframe now decodes once, onto the exact output canvas, in a pre-loop that owns every FIRST/LAST_FRAME part: the pixels fill enc_pixels for the VAE pin as before, and the frame itself rides to the prompt block, where the anchor loop hands it to the tower through the new IMultimodal prepare_frame -- implemented by the bridge as Processor::image_from, which smart-resizes and patchifies the caller's pixels exactly as a prepared file's would be. A reference picture is unchanged (tower `match`, encoder grid); the two never share a request. The encode loop's keyframe branch is gone: its pixels were built above, one decode for both consumers. Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
baa10db1aa |
videos+minimaxh3: the keyframe ordinal counts pictures present; chunks back to the trained floor
Two findings from #236's author, both confirmed against the reference: The <Picture k> ordinal for endpoint keyframes was fixed by ROLE (first = 1, last = 2), so an l2va request presented its sole frame as <Picture 2>. The reference numbers its presentation by PRESENCE (a last-frame-only request is its picture ONE) -- as this server's own ref2va photo numbering already does. The parse keeps the role's provisional ordinal; the count check settles it once every part has arrived (parts may come in either order). fl2va is unchanged: with both ends, roles and positions agree. kMinChunks carried a stale 'EXPERIMENT: short-chunk test' enum (4) from a cheap-clip verification battery, letting every request go under the model's trained 5.17 s floor (7 chunks). Restored; the file's own '5 to 15 seconds: 7 to 20 chunks' comment describes the real bound. Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
aa5dfaec19 |
krea2: rebalance presets balanced, detail and subtle at the taps' measured RMS
`rebalance` takes a preset's name beside true/false: "balanced", "detail" and "subtle" are comfyui-krea2-conditioning's presets with renormalize on at multiplier 1, "legacy" is true (ConditioningKrea2Rebalance's defaults, about 9x the taps' RMS). The node renormalises by s = sqrt(sum m_t / sum w_t^2 m_t) per prompt, m_t tap t's mean square; the plugin holds s as a constant per preset, m_t averaged over twenty prompts through krea/Krea-2-Turbo's text encoder (scripts/krea2_rebalance_calib.py: balanced 0.44109, detail 0.35702, subtle 0.84759; per prompt s stayed within 1.7 % of it). The gains are fixed per tap, so the presets reuse #187's chan_affine into te.h2 with their own `mul`, one declared op per preset and tap. The preset rides in RAD_GEN_COND_REBALANCE_PRESET, bits 8 to 15 of cond_opts beside RAD_GEN_COND_REBALANCE, which a plugin declares when it has presets; the driver accepts both bits, and the server refuses a preset's name on a model whose rebalance declares none. A row the plugin does not know scales nothing. Enum values only, so no ABI bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7c3b5ab7d5 |
merge 1.12.0: gemma4 E2B/E4B and Nemotron Bolt E4B arrive; the ref2va audio, rows and ABI work carried across
conv1d keeps both stride forms: upstream's causal codec downsample with cu_div (Fish Audio) and the port's explicit-pad non-causal one (the H3 audio encoder's), in libref, libavx and libr4d alike; the ABI takes upstream's 27 on top of the port's RadVideoGenBatch growth. |
||
|
|
6bcb481450 |
server: a keyframe request may centre-crop its first anchor instead of stretching it
The reference stretches the first frame to the output canvas, which squashes a portrait photo pinned into a landscape video (ComfyUI behaves identically). Optional per-request first_frame_mode: "stretch" (default, the reference's own resize) or "center" -- the already-implemented cover-crop, previously used only for the last anchor: aspect kept, the canvas centre-cropped. The latent grid stays the exact target canvas either way, so pinned rows are unaffected; anything else is refused naming the field. |
||
|
|
a14ea5abad |
server: a video job logs every denoise step and reports the step tally
A waiting client had only job.progress (the steps' share of 0..90) and no pace, so a long render looked like a hang. The job's thread now emits one RAD_INFO per STEP -- step N/M, mean s/step and an eta, measured from the first step's arrival on the steady clock so queue and encode time do not inflate it -- and the video object carries steps_done/steps_total while it runs (absent until the first step lands, so a queued object is unchanged). The rate is a mean across the job; a latent upscale's small steps are quicker than its refine steps, so the eta is a mean's guess -- the completion line's breakdown stays exact. videos_test asserts the tally reaches the finished object (the fake generator lands two steps). |
||
|
|
a9e627b7ca | engine: the KV plan split, the host mirror, and --kv-resident bring-up | ||
|
|
5a9ce4912b |
radiance 1.12.0
New models: - Fish Audio drama-3: speech with speaker tags and inline direction, voices cloned from reference clips (the `references` field of /v1/audio/speech and the streaming session), two cards - Gemma 4 E2B/E4B (KV-shared layers, per-layer embeddings, clipped vision linears), with NVIDIA-Nemotron-3.5-Bolt-E4B in bf16 with DFlash and vision on one card, and E4B recipes Speed: - MXFP4 GEMMs for one to 64 rows and a tiled prefill GEMM at TN=4 from 1024 rows: the 27B MXFP4 with DFlash2 decodes about 1% faster at c1, 5% at c4 and 14% at c16 - The fp8 and int8 LM heads read their weight once for 65 to 128 rows - A prefill step of one sequence runs in two pieces on a second lane at two ranks (qwen35_fp8, gemma3): a 45K-token prompt on the 27B fp8 in 15.1 s instead of 16.2 s - Gemma 3's fused all-reduce junctions also under a lossy wire - --draft-short-from N: a block drafter runs its shorter block from N decoding sequences on (off by default; with 8 on the 27B MXFP4: c8 +12%, c16 +18%, c64 +32%, c1 unchanged) - --tp-attn-split rows: GLM-5.3-Flash's MLA attention split by rows over the ranks, 18 to 21% faster prefill; lossy, `heads` stays the default - --draft-coupling on: Qwen3.8-Flash-Next's MTP drafter samples its proposals from its reranked top-8 and the target's draw is coupled to it; pays at high temperatures (c1 at T 1.0: 155 -> 178 tok/s), costs at low ones; off by default Features: - Edited prompts on windowed models (Gemma 4) reuse their prefix: periodic window snapshots, and snapshot-backed prefix KV kept across recomputes (an edited tail on Gemma 4 31B: 96 s -> 2.6 s) - DELETE /sessions/<label> and DELETE /sessions?id=<id> forget one stored conversation - --state-cache-dtype f16: the delta-net state cache at half the memory (qwen35 plugins; lossy) Fixes: - A browser's CORS preflight allows DELETE Changes: Plugin ABI 27: out-of-tree plugins must be rebuilt. The environment switches the PRs added are flags now (--tp-attn-split, --draft-coupling, --state-cache-dtype). |
||
|
|
9eaf10da6e |
radiance 1.11.0
New models: - GLM-5.3-Flash reads pictures: its vision tower and processor (--image-tokens sets the budget), with decode kernels for a few rows and the DSA indexer split over the ranks - Sage-A1.5 (fp8 and MXFP4) with its vision tower and a DFlash2 drafter - Unlimited-OCR (bf16) - Gemma 4 31B with z-lab's DFlash and RedHatAI's DFlash2 drafters; at four cards its all-reduces are fused with the junctions, overlapped with the compute and sent compressed - Ornith-1.5-35B-A3B w4a8 compose files Speed: - Block drafters (DFlash, DFlash2) accept their drafts on the card, and the next step is issued ahead - The four-rank all-reduce is faster for every --tp 4 model - qwen35_w8a8: the norms and SiLU write the int8 linears' operands directly - --attn-prefill-fp8 off|qk|pv|both: fp8 QK and PV legs for the h256 prefill attention (about +20% prefill on a 221K-token prompt for the 27B MXFP4 at TP2); lossy, off by default Features: - Control vectors: --control-vector off|on|disabled (disabled by default), a per-request switch, and the published Qwen3.8-Flash-Next refusal-direction vector (its license is in NOTICE) - Krea 2: the `rebalance` request field, as ComfyUI's ConditioningKrea2Rebalance - Cards with a small PCI BAR run, with kernel arguments kept in host memory - Dashboard: live acceptance figures; statsdump rotates its file at a size cap - KV caches every rank holds whole (GLM-5.3's latent and index caches) take one host-tier slot Fixes: - Long conversations taking turns no longer fall back to an early snapshot: a host-tier restore makes room as memory pressure does and waits a step for the previous turn's release (two conversations of 142K and 147K tokens sent back to back: 31.3 s per turn before, 2.8 s now) - Kernels before Linux 6.16 (amdgpu below 3.64) no longer hang at startup: virtual memory management is turned off there, with a warning - Gemma 4 dense scales its token embeddings as Hugging Face does (bf16), which changes its output - The four-rank all-reduce fences prefill-sized messages, for a rare divergence after a fresh start - GLM-5.3: every refusal names the setting and the reason; its template keeps string content - Several pictures in one request no longer refuse processors that take one image at a time Changes: Plugin ABI 26: out-of-tree plugins must be rebuilt. The environment switches the PRs added are fixed rules or flags now (R4D_ATTN_FP8 is --attn-prefill-fp8). |
||
|
|
6131e59693 |
server: drop WebM output; /v1/videos always writes MP4
The reference workflow moved to MP4 as its default and it plays everywhere, so the
webm/webm-av1 containers, the `format` field and the container-aware writer are
maintenance without a user. This reverts them to the pre-webm shape: core/mm/mp4.{h,cpp}
and the Dockerfile/docs are byte-identical to upstream again (the writer's H.264
runtime-discovery and faststart were always upstream's), the ffmpeg build loses
libvpx/libaom/libopus and the webm muxer, and the runtime image loses libvpx9/libaom3/
libopus0. Input-side webm is untouched: media.cpp still demuxes webm/matroska
references, audio endpoints still accept webm uploads, and the decoder set keeps
VP8/VP9/AV1/Opus.
A `format` in a request is now refused as an unknown field.
videos_test drops the WebM case (and the format echo/caps checks), keeps the refusal;
engine_e2e, video_gen and videos suites pass, mm_test unchanged (pre-existing webp gap).
Co-Authored-By: Claude <noreply@anthropic.com>
|