Archived
8f2e511fcccc203f86dc6b0055e838e8e559fb5d
144
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b988378e70 |
chat: read a function name that ends at whitespace (Ling 3.0)
Ling-3.0-flash's template writes a call as the opener, the function name, a
newline, and only then the argument tags:
<tool_call>read
<arg_key>path</arg_key>
<arg_value>/a</arg_value>
</tool_call>
The differential analysis names the function between the opener and the first
argument tag, so its end is the bare newline and name_suffix comes out as
whitespace alone. chat_format_check refused that, so every request carrying
tools answered 501 with "this model's tool calls cannot be read back:
name_suffix must end the function name with something besides whitespace" --
the whole tool-calling surface, for every Ling-3.0 checkpoint.
A suffix with no core of its own is the suffixless ending written out: the
name stops at the whitespace. The reader now takes it that way (name_open keys
on the trimmed core, so the name runs to the first arg_prefix or call_end,
whitespace trimmed), while the grammar still writes the template's newline.
The object family has no such terminator -- its brace ends the name -- and
keeps the refusal, as does the wrapped format whose bare name_prefix would
otherwise read as a call.
Adds the real template as a fixture and a regression test that derives the
format, builds the grammar, and reads a two-call reply built from the derived
fields; a second test pins the object family's refusal.
|
||
|
|
157959fd80 |
server: a control-vector variant, MODEL:NAME, that runs with the vector on
A request turns the control vector on with the `control_vector` body field, or the deployment's default applies. A client that can only choose a model cannot send the field, and a gateway can allow or refuse a model by its name but not a field. --control-vector-variant NAME lists MODEL:NAME as a child of the model, the way an adapter is listed, and a request naming it runs with the vector on whatever the default; the model's own name keeps the default. Unset, the default, lists nothing. The key needs --control-vector off or on. NAME keeps the rule model names keep (no ':' or whitespace), and may not be a --lora adapter's name or the served model's own. The variant's name with "control_vector": false is refused, since the request asks for both. With adapters enabled the variant takes no adapter lookup, and /v1/load_lora_adapter refuses its name. config_test 68, fleet_config_test 18 and server_test 191 cases pass, and the host suite (ctest -LE 'gpu|oot') passes. On two R9700s at TP2 (Qwen3.8-Flash-Next IQR-V4 with the shipped vector), through the front: /v1/models lists MODEL:uncensored and GET /v1/models/MODEL:uncensored answers; a policy prompt to the variant is answered and to the model's own name refused; the variant with "control_vector": false is a 400. |
||
|
|
aadabde0de |
http: a route's captures replace those the request already carries
Router::dispatch put a route's captures into the request with std::map::insert, which keeps a key the request already has. The front matches /v1/models/ID itself and hands the request to the model's router with the path rewritten, an alias as the model's name and base:adapter as the adapter's, so the model read the front's id: through the front, GET /v1/models/ALIAS and GET /v1/models/base:adapter answered 404. The captures of the route that matched now replace those of the same name; nothing sets a request's params before a dispatch otherwise. server_test: a_request_handed_on_reads_the_capture_of_the_route_that_matched_it fails without the change and passes with it. |
||
|
|
66b0dcf019 |
server: the guarded-route set is declared once, at registration
The front kept its own list of which routes answer the local operator
keyless -- guarded_route spelled out the same eight (method, path)
pairs Server::register_routes registers with a local_operator handler,
and its comment admitted the copy ("Kept in step with Server::register
routes"). A new guarded route meant editing the registration AND the
front's list AND the test that pins the list against drift; miss one and
the front wakes a parked model for a stranger who is then refused -- the
exact A-05 bug class -- silently.
Router::add now takes a `guarded` flag, set on the six registrations
that guard (and their DELETE siblings). Router::guarded(method, path)
asks the matcher -- the same split_path + :label match that reaches the
handler -- and the front copies the flag as it mirrors each model route,
so guarded_route is one line reading the front's own copied marks. One
declaration per guarded route, at its registration; the matcher that
decides the wake is the matcher that dispatches, so slash and :label
forms cannot disagree with the handler and the drift risk is gone.
front_test still pins every shape (guarded: slashes, /sessions/:label,
the trailing-slash collapse; not: GET /sessions, /stats, inference,
/sessions/a/b) and transport_test exercises real dispatch through them.
Behaviour unchanged -- the same eight routes wake nothing for a stranger.
|
||
|
|
9bfdd95cb6 |
server: a wrong api key closes the connection it guessed on
A failed authentication answered 401 and kept the connection alive, so a client guessing credentials over one keep-alive paid for the socket once and then streamed a thousand tries down it. The gate can refuse the request; it was not refusing the session. The 401 now carries Connection: close. A guessing client pays a fresh connect -- and on TLS, a fresh handshake -- per guess, while every correctly-keyed request keeps its warm connection untouched. |
||
|
|
e30ada33e8 |
server: the worker-start failure logs its reason sanitized
The HTTP pool's start() caught std::system_error and printed e.what() raw. An OS message carries no socket bytes, but every other catch in the transport reads it through log_sanitize, and consistency is the cheap half of the guarantee: a message that ever carried a token or a control character would print straight into the operator's log. One call to log_sanitize, and every line this transport writes from a caught exception now says so through the same filter. |
||
|
|
1231eefbd3 |
server: the model card hides the expert-profile path keyless
One member of the card's capabilities object -- expert_stats.file -- is a path on this machine, the --expert-stats file the engine reports. The card's `root` field already answers to the operator keyless and rides with the key to everyone else; this one member skipped that rule and leaked the deployment's file layout to any client that asked /v1/models. handle_models now strips expert_stats.file from the capabilities dump for a request that is neither keyless-local-operator nor api-keyed, matching `root` exactly. The rest of the object -- counts, tiers, the planner's shape -- is not a path and still ships. |
||
|
|
51e4c7f0f0 |
server: what a client put in a request never reaches the log raw
log_admitted printed the request's model name and last user text through %s, unsanitized -- the one entry point that skipped the log_sanitize every other request-side field passes through. Both come straight from a client's JSON; control characters in a model field or the tail of a message let a client forge log lines, inject terminal escapes, or make the log read as if the operator said something the server never saw. The two strings now pass through log_sanitize at the print, exactly as the peer address already does, so the admission line carries the same guarantee the rest of the log does. |
||
|
|
1b4e405969 |
server: /props keeps the model path to the operator
The llama-server compatibility payload carries model_path -- a path on this machine -- to whoever asked, keyless included. It travels the same class of information /v1/models already gates its `root` field with, and that gate exists: a stranger enumerating models should learn the model's name, not where its file lives. The field now answers for an api-keyed request or a local operator and comes back empty otherwise -- which is also what it already was for a --model stdin read, so no client finds the member missing, only the strangers learn nothing new. |
||
|
|
e46a8ba3d4 |
util: the bounded read refuses before the tree exists
yy_convert enforced its value budget and depth bound in a second pass that ran only after every frame of the document had been collected into a scratch vector. The bound that promises a refused body has not grown memory grew its scratch with the body: a 200k-empty-array swarm counts no scalar at all, and the old code refused it after the whole swarm sat in the frame list. Both bounds are now enforced where a value is DISCOVERED -- every value counted, containers included, which is what the pre-migration parser callback counted and what the tests already pinned -- so a body past either bound ends the walk while the scratch is still budget-sized. What stays proportional to the body is yyjson's own read arena, capped by the byte bound at its open, and oai.cpp's comment now says exactly that. A json_test case carries the swarm. |
||
|
|
b83d53cf19 |
front: a refused request does not wake a model to be refused
Every forwarded request leased its model, and the lease fired demand for a cold or parked one before any handler ran. On the guarded routes -- the lora admin, /diagnostics, /reset_prefix_cache, DELETE /sessions, the control vector -- the handler then answered 403 keyless: the wake had already asked the scheduler for a real load, which can fetch the repository and evict residents to make room. Loop one cheap GET over an enumerated model name and the fleet churns for an audience that never gets an answer. The front already knows reads that report on a model are no reason to bring one back; the same courtesy is now owed to a request the guard will refuse. The fleet hands the front its operator rule -- the very predicate its admin guard reads -- and a guarded route from anyone else reads the not-open state and stops. Open models still dispatch, keyed boxes still wake everything, and the operator keeps the diagnostics that bring a parked model forward. |
||
|
|
41a1aa00fe |
fleet: the admin routes read all three legs, as the engine's guards do
The fleet front guarded its admin routes with the loopback socket alone. The socket is the one leg that forges: a DNS-rebinding page is same-origin with its victim's browser and dials through loopback, and a localhost proxy delivers remote clients on loopback sockets carrying the public Host. With CORS open by default, a web page in the operator's browser could unload and park any model, reload the fleet, and read the topology -- disk paths in the body -- from outside the machine. The three-leg rule (loopback socket, no foreign Origin, a Host that names this box) was Server::local_operator's, locked inside Server. Hoist it to server::local_operator(request, bind_host, local_hosts) beside the request whose fields it reads, keep the member as the delegate it now is, and let the fleet's guard call the very same predicate with its own config's host and --allow-host names. One rule, two callers, no forked wording. |
||
|
|
2a2b756371 |
radiance 2.1.0
New models. Recursive Flint (39.8B, about 2.5B active) by everplays (#422): `arch/flint`, as an IQ8R container with rotated int8 experts or a four-bit one, with a sink-aware WMMA prefill attention and the fused attention prologue at `rotary_dim` 0. Meta Muse Glimmer 30B by launch80_assets (#423): bf16, an int4 trunk or IQ8R, its windowed vision tower, its DFlash drafter, the ATEM tool dialect and context extension. Ling-3.0-tiny by RikshaDriver (#441): served from its GGUF releases or as IQ8R on `bailing_hybrid`, with six more libr3d kernels. Block FP8, MXFP4 and NVFP4 conversions of the three are not served. IQ8R containers of all three (round to nearest, no calibration) are on Hugging Face under StillDeadcode: flint-iq8r, muse-glimmer-30b-iq8r-dflash and ling-3.0-tiny-iq8r. They were checked for sane answers on two R9700; nothing was benchmarked, and Muse Glimmer's pictures, video and tool calls were not tried. Speech. Breeze-TTS-2 clones a voice from a reference recording and its transcript, with an optional delivery direction, by farcryjohn (#436). The published Breeze container needs converting again with the updated recipe before it can. Tools. A model entry with `diagnose: DIR` runs a fixed workload on the engine instead of serving and writes a report: step times, tokens a step, draft acceptance, TTFT and prefill rates by category, concurrency and prompt length, and with `diagnose-baseline` a token-for-token comparison against an earlier report (docs/DIAGNOSE.md), by Code000 (#418). Scheduler. `mixed-step-target-ms` holds a mixed prefill and decode step to a service time, off by default, by tnhnyzc (#413). `scheduler.stuck-exit` (60s by default, 0 never) ends the process when the device has advanced nothing for that long, so a restart policy brings a hung server back (#409, #415, #428). Fixed. Draft trees with the int8 KV cache, which stopped Gemma 4 31B with DFlash2 on its first request (#454, diagnosed by aelfwyne). The expert loan held at zero by a few leftover cache blocks after long sessions (#455, diagnosed by thekk1). The mapped tier's pages kept in the page cache across a load and a restore, by C_Tamas (#421). Replayed tool calls with blank arguments, and arguments that are not JSON refused naming the call, by dschmitz (#444). The dashboard's card temperature reads the junction sensor, by dschmitz (#453). The VRAM shortfall report says what the KL mode needs, by baKon (#448). The out-of-tree plugin test builds its plugins in parallel and takes its toolchain from the tree. Plugin ABI 40: out-of-tree plugins need to be rebuilt. Thanks to @everplays, @launch80_assets, @RikshaDriver, @farcryjohn, @Code000, @tnhnyzc, @C_Tamas, @dschmitz, @baKon, @aelfwyne and @thekk1. |
||
|
|
ddcb9c69bb |
radiance 2.0.0
Radiance becomes a multi-model engine: one process serves several models behind one port, loads each when a request names it, parks it in host memory or restores it from its container, and shares the cards between them (docs/MULTIMODEL.md). The configuration is one YAML file; the command line flags are gone (`radiance --config FILE`, hot reload on SIGHUP). Formats. IQ8R (rotated int8) and IQR-V4 replace FP8 and MXFP4 as whole-model formats, with an int8 KV cache (`kv-cache-dtype: i8`) in place of the fp8 one. Containers whose weights are block FP8, MXFP4, M2XFP4, NVFP4 or ParoQuant are refused at startup by the name of the first such weight. Not served until they have int8 containers: GLM-5.3-Flash, Ornith-1.5, Sage-A1.5, Nemotron-3.5-Bolt-74B, Ling-3.0-flash, drama-3 and Anima's FP8 container; Nemotron-3.5-Bolt-E4B, the Gemma 4 31B DFlash containers and MiniCPM5-2B bf16 serve without their drafter. 1.17.0 serves all of them. Speed. Chained launches for Qwen3.8-27B, Gemma 4, Gemma 3 and the small bf16 models, a new Qwen3.8-Flash-Next container (IQR-V4 experts, int8 trunk) with its decode step and prefill reworked, and a reworked adaptive draft window. Deployment. deploy/compose has two fleet files, tp1.yaml and tp2.yaml, each with its configuration beside it, in place of the per-model files. `host-pool-mib` is a model's host pool in all, split among its ranks. The dashboard is rebuilt: an hour of history kept by the server, each accelerator's memory by model, model states over time. Merged since 1.17.0: Nemotron-3.5-Bolt-74B-A9B by keptn42 (#339); GLM-5.3-Flash on four cards by AnimusNull (#397); chained launches for Flash-Next's decode step (#396) and preempted requests keeping their prefix and place (#405) by mici81; --prefill-interleave auto by Code000 (#410); eight more libr3d kernels and the w4a4 reference by RikshaDriver (#403, #407, #408); libr3d large-BAR and E4M3 decode fixes by neuromanMD (#438, #439); int4/int5 decode tiles by Kezi (#426); attention for Nanbeige 4.3 33B by everplays (#417); expert_stats_report.py by baKon (#431). Fixed: #398, #402, #419, #437 (dschmitz's patch); added the metrics of #392, and multi-model serving as asked for in #367 and #109. Plugin ABI 39: out-of-tree plugins need to be rebuilt. Thanks to @keptn42, @AnimusNull, @mici81, @Code000, @RikshaDriver, @neuromanMD, @Kezi, @everplays, @baKon and @dschmitz. |
||
|
|
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 |