Archived
Merge main into laya-arch-plugin
This commit is contained in:
commit
ec243c2a7d
189 files changed
+11212
-7060
No files matched your search
+122
-50
@@ -52,7 +52,7 @@ driver. [`DOCKER.md`](DOCKER.md) covers it, with compose files per model.
|
||||
| Optional | ROCm with `hipcc`, for AMD device kernels; without it you get the host backend. Set `ROCM_PATH` if ROCm is not at `/opt/rocm` |
|
||||
| With a card | Resizable BAR on (Above 4G Decoding and Resizable BAR in the firmware setup). The host writes every dispatch's arguments into VRAM there. On a card whose BAR is smaller than its VRAM they stay in pinned host memory and every dispatch reads them over the link: on R9700s, Qwen3.8-27B fp8 decode steps take 0.4-1.8% longer at `--tp 1` and 2 than with the arguments in VRAM. Peer access needs the large BAR too, so at `--tp 2` and above such a card takes the collectives through host memory (§4.7) |
|
||||
| Optional | OpenMP, used by the host kernel libraries if present |
|
||||
| Optional | `libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libswresample-dev` (ffmpeg 6+), for image, video and audio input. The probe is `RAD_WITH_FFMPEG` (`ON` fatal, `OFF` off, default `AUTO`): built without them the engine boots normal, serves text, and refuses every image/video/audio part with HTTP 500 — the configure log is the only warning (`radiance: no libavformat ...`). `GET /diagnostics` shows `media decoders` |
|
||||
| Optional | `libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libswresample-dev` (ffmpeg 6+), for image, video and audio input. CMake option `RAD_WITH_FFMPEG`: `AUTO` (default) uses them when found, `ON` fails the configure without them, `OFF` builds without. A build without them starts and serves text, and refuses every image, video and audio part with HTTP 500; the only warning is the configure log line `radiance: no libavformat ...`. The diagnostics report says which (`media decoders`; `host.media` in `GET /diagnostics`) |
|
||||
| Optional | `clang++` (or ROCm's), for `tests/r4d_emu` when the C++ compiler is g++; CMake 3.25+ for `CMakePresets.json` |
|
||||
| Shell harnesses | `curl` and `jq` |
|
||||
|
||||
@@ -93,10 +93,10 @@ cmake --build build -j
|
||||
ctest --test-dir build -L fast -j8 --output-on-failure
|
||||
```
|
||||
|
||||
A ROCm SDK installed outside `/opt/rocm` — a userspace SDK tree under a virtualenv, a core-only
|
||||
system install — needs more than `ROCM_PATH`: hipcc is found, then device compilation dies inside
|
||||
`cuda_wrappers/cmath` with `Could not find standard C++ header 'cmath'`, because ROCm's clang
|
||||
does not pick up the distro gcc's libstdc++ headers on its own. The flags that make it work:
|
||||
A ROCm SDK installed outside `/opt/rocm` (a userspace SDK tree under a virtualenv, or a core-only
|
||||
system install) needs more than `ROCM_PATH`. hipcc is found, but device compilation fails inside
|
||||
`cuda_wrappers/cmath` with `Could not find standard C++ header 'cmath'`, because ROCm's clang does
|
||||
not pick up the distro gcc's libstdc++ headers on its own. Configure with:
|
||||
|
||||
```sh
|
||||
ROCM=/path/to/_rocm_sdk_devel # the SDK root (the venv's site-packages/_rocm_sdk_devel)
|
||||
@@ -108,11 +108,11 @@ cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
||||
export LD_LIBRARY_PATH=$ROCM/lib:$LD_LIBRARY_PATH
|
||||
```
|
||||
|
||||
`--gcc-install-dir` takes the distro gcc's directory (the installed gcc-15's; after a distro gcc
|
||||
upgrade it must be repointed, and the configure cached in `build/CMakeCache.txt` reset with
|
||||
`-c`). The device-lib path is where the SDK tree keeps `amdgcn/bitcode` (under `lib/llvm/` in a
|
||||
userspace SDK, `$ROCM/amdgcn/bitcode` in a core system install). The flags are not needed for a
|
||||
full `/opt/rocm` install, and `DOCKER.md`'s container sidesteps them.
|
||||
`--gcc-install-dir` is the distro gcc's directory (gcc 15 in the example). After a gcc upgrade,
|
||||
repoint it and reset the configure cached in `build/CMakeCache.txt` (`-c`). The device-lib path is
|
||||
where the SDK keeps `amdgcn/bitcode`: under `lib/llvm/` in a userspace SDK, `$ROCM/amdgcn/bitcode`
|
||||
in a core system install. A full `/opt/rocm` install needs none of these flags, and the container
|
||||
in `DOCKER.md` avoids them.
|
||||
|
||||
### 1.3 Check that it works
|
||||
|
||||
@@ -368,7 +368,7 @@ planes, with the tokeniser and chat template.
|
||||
|
||||
**A recipe decides what is quantised**, in rules from weight names to quantisers. Without one,
|
||||
every weight keeps the checkpoint's encoding, which suits a bf16 or block-fp8 checkpoint served at
|
||||
its own precision. Flash-Next's four-bit experts need one:
|
||||
its own precision (Qwen3.8-Flash-Next-FP8 included). Flash-Next's four-bit experts need one:
|
||||
|
||||
```sh
|
||||
rad-convert /srv/models/Qwen/Qwen3.8-Flash-Next -o /srv/models/rad/flashnext-w4.rad \
|
||||
@@ -835,6 +835,22 @@ for the gather (no libr4d) the table is read on the host: `vram` is refused, and
|
||||
locked huge pages, which also needs a memlock limit that large (`--ulimit memlock=-1` in Docker,
|
||||
`LimitMEMLOCK=infinity` under systemd).
|
||||
|
||||
`--ngram-placement ram=DIR` makes the pinned copy a file, `DIR/ngram-<id>.tab`, in a tmpfs, mapped
|
||||
`MAP_SHARED` and pinned for the cards as `ram` pins it, so two engines on separate card sets
|
||||
(`ROCR_VISIBLE_DEVICES`) hold one table in host memory. The first engine to start fills the file
|
||||
from the container; a second finds it complete, checks samples of it against its own container and
|
||||
only pins it. The `<id>` is a hash of the container's path, size and mtime and the table's place in
|
||||
it, so a file never serves another model. A weight under 32 MiB the gather reads beside the table
|
||||
(its scale) keeps a private pinned copy, since its file would be mostly header. The engine that
|
||||
leaves last deletes the file, and one that leaves while another still holds it waits up to a second
|
||||
for it, so two engines stopped together still remove it; after a crash a complete file stays and is
|
||||
reused, or removed by hand. `DIR` must be a tmpfs (`/dev/shm`, or a tmpfs mounted for it, sized for
|
||||
the table); `ram=DIR` needs the card gather kernel and the driver's SVM API, and is refused
|
||||
otherwise. The driver counts a shared page against every process that pins it, so with two engines
|
||||
the pinned total is twice the table: set `amdgpu.no_system_mem_limit=1` (the cap is RAM less 1/64
|
||||
and 1.5 GiB) or the second pin can be refused. The kernel charges the tmpfs pages to the memory
|
||||
cgroup of the engine that filled them.
|
||||
|
||||
**`--weights-disk-tier`** serves a model larger than the card and the host pool together, with every
|
||||
step paced by the drive. A routed expert that fits neither lives only in the container. Before each
|
||||
routed layer's first expert op, on every pass, the engine reads all that layer's on-disk experts into
|
||||
@@ -1193,30 +1209,32 @@ snapshot lets it skip at least 256 tokens of that head, the request takes one wh
|
||||
ends, at the cost of one chunk split, and the requests after it resume there. A conversation's
|
||||
next turn has only its own earlier turn past that point, so it splits nothing extra.
|
||||
|
||||
A prefix hit answers exactly as the same prompt prefilled cold, by default
|
||||
(`--prefix-resume exact`). A kernel can round a row differently at another chunk
|
||||
length (the fp8 GEMM's split-K count is chosen from `M`, spec §17), so a hit that
|
||||
recomputes its tail in other chunks than a cold prefill can flip a near-tie in
|
||||
greedy text. The hit therefore resumes only where an idle server's cold prefill of
|
||||
that prompt starts a chunk: every `--max-num-batched-tokens` tokens (rounded down
|
||||
to the chunk quantum), or every `--checkpoint-interval` when that is smaller. A
|
||||
prompt's tail snapshot is taken where its last chunk starts, a boundary the chunk
|
||||
already ends on, so it costs a copy and no step. An exact repeat re-prefills the
|
||||
cold run's last chunk; an appended turn, that chunk and what the turn added: up to
|
||||
one chunk more than `--prefix-resume nearest`, which resumes at the deepest
|
||||
snapshot or block and splits a prompt's last chunk at its last quantum boundary.
|
||||
The interval must be a multiple of the chunk when it is larger; otherwise it is
|
||||
rounded up, and startup says so:
|
||||
**Where a hit resumes** (`--prefix-resume`). A kernel can round a row differently at another
|
||||
chunk length (the fp8 GEMM's split-K count is chosen from `M`, spec §17), so a hit that recomputes
|
||||
its tail in other chunks than a cold prefill can flip a near-tie in greedy text. Two modes:
|
||||
|
||||
- `exact` (the default): a hit answers exactly as the same prompt prefilled cold. It resumes only
|
||||
where an idle server's cold prefill of that prompt starts a chunk: every
|
||||
`--max-num-batched-tokens` tokens (rounded down to the chunk quantum), or every
|
||||
`--checkpoint-interval` when that is smaller. A prompt's tail snapshot is taken where its last
|
||||
chunk starts, a boundary the chunk already ends on, so it costs a copy and no step. An exact
|
||||
repeat re-prefills the cold run's last chunk; an appended turn re-prefills that chunk and what
|
||||
the turn added.
|
||||
- `nearest`: a hit resumes at the deepest snapshot or block, and a prompt's tail snapshot is at
|
||||
its last quantum boundary. A turn re-prefills up to one chunk less than under `exact`.
|
||||
|
||||
Under `exact` an interval larger than the chunk must be a multiple of it; otherwise it is rounded
|
||||
up, and startup says so:
|
||||
|
||||
```
|
||||
--checkpoint-interval 6144 resolves to 8192: --prefix-resume exact needs it a multiple of the
|
||||
4096-token prefill chunk (--max-num-batched-tokens 4096) ...
|
||||
```
|
||||
|
||||
It is an idle-server property, as greedy batching is: a prefill that shares its
|
||||
steps with other requests or decode rows (`--busy-prefill-chunk`,
|
||||
`--prefill-interleave`) is cut differently, and a request's own checkpoint
|
||||
(`/v1/systemone`'s shared head) resumes where it was asked.
|
||||
Exactness holds on an idle server, as greedy batching does: a prefill that shares its steps with
|
||||
other requests or decode rows (`--busy-prefill-chunk`, `--prefill-interleave`) is cut
|
||||
differently, and a request's own checkpoint (`/v1/systemone`'s shared head) resumes where it was
|
||||
asked.
|
||||
|
||||
**One prefill sequence in two pieces.** At two ranks, on `qwen35_fp8` (and `qwen35_w8a8`, built
|
||||
from it, where its norms do not write rotated int8 codes) and on `gemma3`'s MXFP4 trunk with the
|
||||
@@ -1296,10 +1314,15 @@ head inside the target checkpoint, which needs no flag. `radiance --draft-model`
|
||||
says so. Measure speculation by step time, not tokens per second.
|
||||
|
||||
A drafter with a sliding window over its own cache (DFlash2) keeps that cache outside the prefix
|
||||
cache, so after a prefix hit it cannot draft until its window has slid past the hit, which on a
|
||||
chat's follow-up turn is most of the reply. Such a hit is therefore ended one drafter window before
|
||||
the end of the prompt, at a checkpoint, and the window is recomputed; the reply is the same. A hit
|
||||
whose nearest checkpoint below that point would give back more than two windows is kept whole.
|
||||
cache. Where a hit resumes from a window snapshot (a model whose sliding layers the cache does not
|
||||
index and that keeps no linear state, as the Gemma 4 31B under gemma4_bf16; the 26B-A4B declares
|
||||
its sliding layers full and takes no snapshot), the snapshot carries the drafter's window with the
|
||||
trunk's, so the hit leaves it whole and it drafts from the first decoded token. Elsewhere (a
|
||||
model with linear state, as Qwen3.8), after a prefix hit it could not draft until its window had
|
||||
slid past the hit, which on a chat's follow-up turn is most of the reply. Such a hit is therefore
|
||||
ended one drafter window before the end of the prompt, at a checkpoint, and the window is
|
||||
recomputed; the reply is the same. A hit whose nearest checkpoint below that point would give back
|
||||
more than two windows is kept whole. The startup line `draft floor` says which applies;
|
||||
`radiance:draft_refills_total` counts the hits ended early and `radiance:draft_refill_tokens_total`
|
||||
the tokens recomputed.
|
||||
|
||||
@@ -1332,14 +1355,31 @@ behind the packet processor's barrier bit, which saves most of the launch gap be
|
||||
kernels. The bytes are the same. Plain decode measured slower with them, so they stay off there
|
||||
and on every other model; the startup report's `chained launches` row says which and why.
|
||||
|
||||
**Draft trees.** Where the model's plugin measured a gain (the Gemma 4 31B with DFlash2: +7%
|
||||
single-stream decode and +6-9% aggregate at 1-16 users on 4x R9700, +4% and +6-12% on two,
|
||||
BetterBench with thinking off), a block drafter's proposals are verified as a tree: grown best-first
|
||||
over the drafter's candidates, the deepest path the target agrees with is accepted, and its K and V
|
||||
move into place. A tree changes no token, only how many drafts land a step; the startup report's
|
||||
`draft trees` row says when it is on. Under a tree `--num-speculative-tokens` counts the tree's
|
||||
nodes, grown over the block the drafter was trained at. A request with a grammar (`response_format`,
|
||||
tools) speculates on a tree too: each row is masked against the grammar after its own ancestors.
|
||||
`--draft-coupling on` samples one path, so a coupled drafter proposes the chain.
|
||||
|
||||
**A shorter block under load: `--draft-short-from N`.** A block drafter's block is paid for by
|
||||
every drafting sequence, whatever each one verifies. At one sequence a long block pays; at many, its
|
||||
drafter rows and its weaker first positions cost more than the extra drafts bring. A drafter that also
|
||||
serves a shorter block declares it (PLUGIN.md §11); DFlash2 declares a block of 4 (3 drafts) wherever its
|
||||
own is longer, on `qwen35_fp8` and `gemma3`. With `--draft-short-from N` the engine runs that short block
|
||||
once N sequences decoded in the step just run, and the drafter's own block again only once the count
|
||||
falls two below N, so a load wavering at N does not change the pass shape every step. `0`, the default,
|
||||
never switches. Startup names what it will run:
|
||||
own is longer, on `qwen35_fp8` and `gemma3`, and the Gemma 4 31B's block-16 DFlash2 drafter, as a tree of
|
||||
15 nodes, a block of 8 (a 7-node tree over it). With `--draft-short-from N` the engine runs that short block
|
||||
once N sequences decoded in the step just run, and the drafter's own block again once the count
|
||||
falls two below N or to one sequence, where the long block pays. From N of 3 on, a load wavering at
|
||||
N does not change the pass shape every step; at 2, a load between one and two sequences does, which
|
||||
costs only the other shape's pass. `0` never
|
||||
switches. `auto`, the default, never switches a chain and switches a tree drafter
|
||||
from 2: a tree's nodes are verify rows every drafting sequence pays for, which a wide tree's extra nodes
|
||||
repay at one sequence and not at many; it switches back at one decoding sequence. At the short block the
|
||||
drafter grows a tree of its own over the shorter pass, at most `block - 1` nodes. Startup names what it
|
||||
will run:
|
||||
|
||||
```
|
||||
speculation: from 16 decoding sequences on, 'dflash2' runs its short block of 4 row(s), 3 token(s)
|
||||
@@ -1572,6 +1612,17 @@ hit. Snapshots never take VRAM: each is copied to host memory after the step tha
|
||||
back before the step that resumes from it. `/sessions` shows what is stored, where, and whether the
|
||||
linear half is served.
|
||||
|
||||
On a model with sliding-window layers and no linear state (Gemma 3, and the Gemma 4 31B as gemma4_bf16
|
||||
declares it), the cache does not
|
||||
index the sliding layers, so a hit resumes only from a window snapshot, taken a block short of a
|
||||
prompt's end, where the next turn's rendering still agrees. Under `--prefix-resume nearest` one is
|
||||
taken at the end of every prompt of 528 tokens or more (with `--checkpoint-interval` under 512,
|
||||
from that interval plus a block). Under `exact` it is taken at the start of the prompt's last
|
||||
chunk, once that lies at least one checkpoint interval in, so a conversation whose prompts stay
|
||||
under one prefill chunk reuses nothing there; serve such a model with `--prefix-resume nearest`
|
||||
where short chats matter more than bit-identical hits. A shorter prompt is recomputed: its
|
||||
prefill is cheap, and its snapshot would take a slot from a longer conversation.
|
||||
|
||||
**How many snapshots.** The snapshot store (`--checkpoint-slots`) is shared by every conversation,
|
||||
running or not, and a conversation without a snapshot under its next prompt reuses nothing. With
|
||||
`auto`, the default, each of `--max-num-seqs` gets what `--checkpoint-policy` keeps for one
|
||||
@@ -1589,6 +1640,23 @@ none of it on the card; 10 a sequence for --max-num-seqs 8: geometric-backoff ke
|
||||
200000-token session at a 2048-token interval, and one more for a running turn
|
||||
```
|
||||
|
||||
**The floor outranks the reserve.** A store one snapshot short of its floor is not a smaller store:
|
||||
it is every prefix hit prefilling from the start. `--host-headroom-mib` is a courtesy to the system
|
||||
— the unpooled allocations, the load's staging, the page cache — and it may not, alone, decide the
|
||||
feature off. So when the floor does not fit with the reserve held free, the reserve gives back
|
||||
exactly the shortfall, never below 1 GiB and never above the margin asked for, and the startup line
|
||||
says how much it gave:
|
||||
|
||||
```
|
||||
checkpoint slots: auto: 8 linear-state snapshot(s) of 112.73 MiB ... ; 16 wanted, held to what the
|
||||
host can pin: ... ; the host reserve gave back 835.00 MiB of its 4.00 GiB for the floor of 8
|
||||
snapshot(s), holding 3.19 GiB
|
||||
```
|
||||
|
||||
It is a byte rule over the host's own measurement, so it needs no second case for a wider slot (a
|
||||
model with more linear state), a wider streaming mirror (any KV encoding), or a larger `--tp`: a
|
||||
host that can pin the floor gets it, and one that cannot says what it is short.
|
||||
|
||||
A line that says `held to an eighth of host memory`, or (a warning) `held to what the host can
|
||||
pin`, means the store is smaller than the policy wants; `--checkpoint-slots N` sets the count
|
||||
outright. An agent client with subagents keeps more
|
||||
@@ -1939,7 +2007,7 @@ by 0.002-0.003 nats.
|
||||
| `--attn-prefill-fp8 MODE` | off | `off`, `qk`, `pv` or `both`: the prefill attention's Q·Kᵀ, P·V or both in E4M3 over an `fp8`, `fp8_v4` or `k6_v4` cache; lossy, Qwen3.8-27B (§4.4) |
|
||||
| `--host-pool-mib N` | 0 | pinned host tier (weights) |
|
||||
| `--kv-resident N` | 0 (off) | stream the sparse attention group's KV from pinned host memory, keeping a ring of N tokens on the card. Raised to 32 768 and to one decode step's selection; a ring that covers the context streams nothing. Ignored with a warning on an architecture that cannot stream (§4.4.1, [KV-STREAMING.md](KV-STREAMING.md)) |
|
||||
| `--host-headroom-mib N` | 4096 | host RAM left free for the system when startup pins host memory — kept for the unpooled allocations, staging and page cache (§4.3) |
|
||||
| `--host-headroom-mib N` | 4096 | host RAM left free for the system when startup pins host memory — kept for the unpooled allocations, staging and page cache (§4.3). A snapshot store's floor takes back the shortfall from it, down to 1 GiB, rather than come up with none (`--checkpoint-slots`, §4.8) |
|
||||
| `--embedding-placement WHERE` | ram | `ram` or `vram`: the token embedding pinned in host memory beside `--host-pool-mib` and read in place, or on the card (§4.3) |
|
||||
| `--ngram-placement WHERE` | auto | `auto`, `vram`, `ram` or `disk`: an n-gram table on the card, as a copy in RAM made at load and read by the card, or read from the container (§4.3) |
|
||||
| `--vision-tower-placement WHERE` | vram | `vram` or `ram`: the encoder towers (vision, and audio where a model has one) on the card, or pinned in host memory beside `--host-pool-mib` and read in place once an image (§4.3) |
|
||||
@@ -1970,7 +2038,7 @@ by 0.002-0.003 nats.
|
||||
| `--deterministic` | off | pin placement to the loader's plan, so the resident set cannot change under the heat engine |
|
||||
| `--checkpoint-interval N` | 2048 | linear-attention state checkpoint interval, in tokens |
|
||||
| `--prefill-span N` | 1 | checkpoint intervals one step may carry of a prefill alone in its step, from the prompt's second interval on; needs `--max-num-batched-tokens` of N intervals. Every other step is planned at the budget less the extra intervals, and the checkpoints inside a span are not written (§4.5) |
|
||||
| `--checkpoint-slots N` | auto | linear-state (hybrid) or sliding-window snapshots the server may hold at once, in total, not per sequence. They live in pinned host memory, allocated at startup: one slot is a snapshot of every rank's shard (113 MB on Flash-Next at `--tp 2`, 144 MiB on Qwen3.8-27B; on Gemma 4 31B the 1024-token window of every sliding layer, 406 MiB at `--tp 2`). `auto` gives each of `--max-num-seqs` what `--checkpoint-policy` keeps for a `--max-model-len` session plus one (10 at 200K tokens under geometric backoff), within an eighth of host memory and what the host can pin; the startup line and the report say what it chose and why (§4.8). A full store retires its least recently used snapshot. A count is taken as given: a store the host memory cannot hold or pin stops the start, and a table placed in host memory leaves room for it; `0` serves with none, every prefix hit then prefilling from the start |
|
||||
| `--checkpoint-slots N` | auto | linear-state (hybrid) or sliding-window snapshots the server may hold at once, in total, not per sequence. They live in pinned host memory, allocated at startup: one slot is a snapshot of every rank's shard (113 MB on Flash-Next at `--tp 2`, 144 MiB on Qwen3.8-27B; on Gemma 4 31B the 1024-token window of every sliding layer, 406 MiB, and with its DFlash2 drafter that drafter's 2048-token window too, 487 MiB). `auto` gives each of `--max-num-seqs` what `--checkpoint-policy` keeps for a `--max-model-len` session plus one (10 at 200K tokens under geometric backoff), within an eighth of host memory and what the host can pin; a floor of 8 (or what the policy wants, if fewer) outranks `--host-headroom-mib`, which gives back exactly the shortfall down to 1 GiB rather than take the store to none, and the startup line says so. The startup line and the report say what it chose and why (§4.8). A full store retires its least recently used snapshot. A count is taken as given: a store the host memory cannot hold or pin stops the start, and a table placed in host memory leaves room for it; `0` serves with none, every prefix hit then prefilling from the start |
|
||||
| `--checkpoint-policy NAME` | geometric-backoff | also `tip-only`, `keep-all` |
|
||||
| `--prefix-resume MODE` | exact | `exact`: a prefix hit resumes only where an idle server's cold prefill of the prompt starts a chunk, and a prompt's tail snapshot is taken where its last chunk starts, so a hit answers bit-identically to a cold run; an interval past the chunk is rounded up to a multiple of it. `nearest`: the deepest snapshot or block, up to a chunk less re-prefilled a turn |
|
||||
| `--no-prefix-cache` | prefix cache on | disable prefix caching |
|
||||
@@ -1992,8 +2060,8 @@ by 0.002-0.003 nats.
|
||||
|---|---|---|
|
||||
| `--num-speculative-tokens N` | auto | speculative window; 0 disables. The ceiling under `--draft-window adaptive` |
|
||||
| `--draft-window MODE` | fixed | `fixed` drafts N every step; `adaptive` follows each sequence's acceptance and the measured step cost, serial draft heads only (§4.6) |
|
||||
| `--draft-short-from N` | 0 | a block drafter that declares a shorter block runs it from N decoding sequences on, its own block again two below; 0 never (§4.6) |
|
||||
| `--draft-coupling MODE` | off | `on`: a linear MTP drafter with a 2-bit candidate head (Qwen3.8-Flash-Next) samples each proposal from its reranked top-8 and the sampler maximally couples the target's draw to it. The output distribution is unchanged and a fixed seed yields other tokens than `off`. The head's law is taken at temperature 1, so it pays at high request temperatures and costs at low ones: on Flash-Next TP2 at 2x R9700, tokens per decode step +18% at temperature 1.0 and c1, +11% at 0.7 and c4, -4% at 0.3. Greedy rows are unchanged. A DFlash2 drafter (Qwen3.5/3.8) couples its candidate walk instead: each position is sampled from the softmax of the walk's own scores over its best eight candidates, at temperature `RADIANCE_DFLASH_Q_TEMP` (default 0.6, where acceptance peaked); on Qwen3.8-27B MXFP4 TP2 at 2x R9700 and request temperature 1, tokens per verify step +8% on held-out prompts at c4 (3.53 to 3.82) and decode +2..8% per stream at c1/c4. Any other drafter is refused at startup |
|
||||
| `--draft-short-from N` | auto | a block drafter that declares a shorter block runs it from N decoding sequences on, its own block again two below or at one sequence; 0 never; auto never for a chain and 2 for a tree drafter, which then verifies the short block's nodes (§4.6) |
|
||||
| `--draft-coupling MODE` | off | `on`: a linear MTP drafter with a 2-bit candidate head (Qwen3.8-Flash-Next) samples each proposal from its reranked top-8 and the sampler maximally couples the target's draw to it. The output distribution is unchanged and a fixed seed yields other tokens than `off`. The head's law is taken at temperature 1, so it pays at high request temperatures and costs at low ones: on Flash-Next TP2 at 2x R9700, tokens per decode step +18% at temperature 1.0 and c1, +11% at 0.7 and c4, -4% at 0.3. Greedy rows are unchanged. A DFlash2 drafter (Qwen3.5/3.8) couples its candidate walk instead: each position is sampled from the softmax of the walk's own scores over its best eight candidates, at temperature 0.6 (where acceptance peaked); on Qwen3.8-27B MXFP4 TP2 at 2x R9700 and request temperature 1, tokens per verify step +8% on held-out prompts at c4 (3.53 to 3.82) and decode +2..8% per stream at c1/c4. Any other drafter is refused at startup |
|
||||
| `--draft-model PATH` | | not implemented: merge the drafter at convert time |
|
||||
|
||||
**Server**
|
||||
@@ -2002,7 +2070,7 @@ by 0.002-0.003 nats.
|
||||
|---|---|---|
|
||||
| `--host ADDR` | 0.0.0.0 | listen address |
|
||||
| `--port N` | 8000 | listen port |
|
||||
| `--api-key KEY` | none | require `Authorization: Bearer KEY` or `X-Api-Key: KEY` on every request but `/health`, `/v1/health`, `/ping` and the dashboard page (§6.6) |
|
||||
| `--api-key KEY` | none | require `Authorization: Bearer KEY` or `X-Api-Key: KEY` on every request but `/health`, `/v1/health`, `/ping` and the dashboard page (§6.6); the key must be non-empty |
|
||||
| `--served-model-name NAME` | container's name | the model id `/v1/models` lists, the metrics carry and a response names when its request named none. A request may name any model; the loaded one serves it |
|
||||
| `--mm-max-patches N` | auto | patches one vision-encoder pass carries, and so the largest image (a patch is 16x16 pixels, 14x14 on GLM-5.3). `auto` is 16384 when the container carries a vision tower; 0 serves text only and keeps the tower off the card. A pass is not one tower invocation: inside it the tower batches at most 8 tiles per weight read, and the pass size may reduce that (4 tiles at the 64-pixel grid with the default 16384 patches); a picture contributes a separate pass per grid. See the concurrency notes for Unlimited-OCR (§5.17) |
|
||||
| `--override-chat-template PATH` | container's | a Jinja chat template file served in place of the container's. The reply format (reasoning markers, tool calls) is derived from it too, unless the architecture plugin declares one. An unreadable or empty file stops startup |
|
||||
@@ -2287,12 +2355,11 @@ returns the text as both `prompt` (vLLM) and `content` (llama-server).
|
||||
completions and chat answer 501. One input is one vector and must fit one step
|
||||
(`--max-num-batched-tokens`); a longer one is refused with `context_length_exceeded`.
|
||||
|
||||
nomic-embed-text-v2-moe is converted from its f32 checkpoint with `rad-convert <checkpoint dir>
|
||||
nomic-embed-text-v2-moe converts from its f32 checkpoint with `rad-convert <checkpoint dir>
|
||||
--recipe data/recipes/nomic-embed-v2-moe-bf16.recipe -o nomic-embed-v2-moe-bf16.rad` (959 MB);
|
||||
the directory must contain `tokenizer.json`. The `search_query: ` and `search_document: ` prefixes
|
||||
are the client's text and the engine adds neither; the checkpoint's prompt names work through
|
||||
`prompt_name`. The checkpoint's shared `experts.bias` tensors are not applied and stay in the
|
||||
checkpoint.
|
||||
the directory must contain `tokenizer.json`. The engine adds neither the `search_query: ` nor the
|
||||
`search_document: ` prefix: the client sends it, or names the checkpoint's prompt with
|
||||
`prompt_name`. The checkpoint's shared `experts.bias` tensors are not applied.
|
||||
|
||||
```sh
|
||||
# text, a batch of texts, or token ids
|
||||
@@ -3603,11 +3670,16 @@ With a key, every request must carry `Authorization: Bearer KEY` (or Anthropic's
|
||||
or it is answered 401, `/tokenize` and `/server_info` included. Exempt are `/health`, `/v1/health` and
|
||||
`/ping`, because load balancers cannot send a bearer token, and the dashboard page (`/`,
|
||||
`/dashboard`), which holds no data: on a 401 it asks for the key, keeps it in the browser's storage
|
||||
and sends it on every data fetch.
|
||||
and sends it on every data fetch. The exemption follows those paths' methods -- reads, plus the
|
||||
`POST /ping` of the health-check convention -- so it cannot follow a method no route answers.
|
||||
An empty `--api-key` value is a startup error: it would guard nothing.
|
||||
|
||||
Without a key, `/diagnostics` answers only loopback clients (others get 403), because it describes
|
||||
the host: kernel, boot parameters, PCI layout, memory limits. Read it on the machine, or start the
|
||||
server with `--api-key`.
|
||||
server with `--api-key`. The same loopback-only rule covers the control-vector default and runtime
|
||||
LoRA loads, and a browser page on another origin does not qualify as a loopback client even when
|
||||
its own machine serves the port: that is how a hostile web page would reach these routes through a
|
||||
victim's browser, and a request that says `Origin: http://evil` is refused the way a remote one is.
|
||||
|
||||
The key is not encrypted in transit. On a network you do not control, bind to localhost behind a
|
||||
TLS-terminating reverse proxy:
|
||||
@@ -3651,7 +3723,7 @@ is the part of a log to paste into an issue. Its sections:
|
||||
warning is also printed as a `W` line of its own.
|
||||
|
||||
```
|
||||
I STARTUP REPORT -- radiance 1.13.0
|
||||
I STARTUP REPORT -- radiance 1.14.0
|
||||
I CONFIGURATION -- every option, the value in force, and where it came from
|
||||
I --model /models/flashnext.rad [command line]
|
||||
I --tp 2 [command line]
|
||||
|
||||
Reference in new issue
Block a user