Archived
bbf90ebaa2bcdf2ce6e8b24b36345e1c9c18b681
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e60810116c |
chat: tagged calls whose name the opener opens -- GLM-5's <tool_call>NAME<arg_key>
GLM-5 writes <tool_call>NAME<arg_key>K</arg_key><arg_value>V</arg_value>...</tool_call>: no prefix of the name's own and no suffix, the name ends at the first argument or at the call's close. The tagged family now takes an empty name_suffix when name_prefix opens the call (no call_open): the derivation from the template makes the per-call opener the prefix and its closer call_end, the grammar takes eps() for the suffix, and the streaming parser finds the name's end byte by byte (name_stop, name_plausible) and reads the closing tag as the first item of the body. arg_name_suffix and arg_value_prefix may both be set and are read back to back, so chat_format_markers keeps both tags. value_newlines comes from a probe render of the template rather than a constant (GLM and MiniCPM false, Qwen true). The ABI struct is unchanged; its comments say what an empty name_suffix means now. chatparse_test: GLM's template serves tools; the derived format equals the one a plugin would declare; every rendered reply in the corpus reads back as the message it rendered, split at every byte; and replies that stray from the grammar. Each fails without this change. The Gemma refusal names call_end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
1e968f6e1d |
radiance 1.7.0
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves every shipped container - Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime - /v1/messages works with Claude Code as it ships (gearwave00001) - a long agent conversation keeps its cached history when the client rewrites its last turn (manueloverride) - a stream's first event goes out with the first token, so llama-benchy measures prefill right - opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42) - four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b) - NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA adapters (baKon) - many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool arguments and the CPU's vision and audio encoders - plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt |
||
|
|
b93b531f63 |
radiance 1.5.0
- Gemma 4 31B (PRs #74, #75, #81, #86; sfjes, keptn42): sliding and global attention with their own kernels, the assistant head as a drafter that reads the trunk's cache, the vision tower, a fused w4a8 decode step, bf16 and compressed-tensors int4 checkpoints, and window snapshots so a prefix hit on a sliding-window model resumes instead of prefilling again. deploy/compose/gemma4-31b-w4a8.yaml serves keptn42's container on two cards - ParoQuant (PRs #65, #66, #67; malic): Qwen3.8-27B checkpoints with learned Givens rotations, as int4, int5 and MXFP4, imported without re-quantising, the prefill's rotations on the matrix cores. deploy/compose/qwen3.8-27b-paro.yaml serves them on one card. A ParoQuant container made with the PR builds is refused: convert it again with --reuse <old container> - Gemma 4 26B-A4B with z-lab's DFlash drafter (PR #88; Perire): arch/gemma4 serves Google's bf16 checkpoint with the routed experts in block fp8 or bf16 (data/recipes/gemma4-26b-a4b-df*.recipe), and libr4d gains its windowed paged attention, the fused sandwich-norm joins, expert_scale and the sharded draft head's pair_argmax. A prefill chunk runs as two slices with its all-reduces beside the compute, bit-exact with the whole step. The 31B's global layers take the windowed attention too: an 11.5K-token prefill on two R9700s in 3.1 s instead of 4.9 - a startup that logs nothing for two minutes says where it waits (#89): the system call (a KFD request by name), the library that made it, and its stack, which addr2line resolves against the binary - the prefix cache is kept in VRAM and host memory only (#70): the disk tier wrote every block and snapshot a prompt produced, and its copies never outlived the process. --prefix-cache-host-mib is renamed --prefix-cache-mib; --prefix-cache-dir and --prefix-cache-disk-mib are removed, and startup refuses all three with what replaced them. The compose files no longer mount /data, and .env no longer needs RADIANCE_STATE - --prefix-cache-ttl S (default 3600, 0 never): a conversation no request has used for that long leaves the cache, whichever tier holds it; radiance:prefix_cache_expired_total counts them. A full host tier now drops its least recently used conversations - --vision-tower-placement vram|ram (#84): ram keeps an encoder tower in pinned host memory and gives its VRAM to the KV cache, read over the link once an image - timings carry ttft_ms and total_ms (#85): the server's own time from the request body's arrival to the first and the last token, queueing and tokenisation included - a KV-cache recall that found a moved expert with nowhere to go stopped halfway and leaked the slots it had already freed: after it every recall failed, the cache stayed short until a restart, and requests failed with HTTP 500. A recall now waits for the slots it is owed and always finishes - a tool result or tool-call arguments that are not JSON are no longer refused as nesting past 1024 levels for their unmatched brackets (#90): only text that parses as JSON is held to the bound, since nothing else is parsed into a tree - the host-pool refusal names the limit that applies to pinned memory (RAM less 1/64 and 1.5 GiB), not ttm.pages_limit - --embedding-placement auto, removed in 1.3.0, is refused with what replaced it - for out-of-tree kernel libraries: gemm_nt_q gains two operands (pb1, pb2, the part bounds), and the loader requires identical op schemas, so a library built against 1.4.0 must be rebuilt. For architecture plugins, rad_op_declared(b, op) asks whether an op is in the loaded vocabulary without declaring it |
||
|
|
368d0363eb |
arch: Gemma 4's reply format into arch/common, for both Gemma 4 plugins
Two plugins are about to serve Gemma 4 -- gemma4_bf16 the CT-INT4 dense release and arch/gemma4 the bf16 / fp8-expert containers -- and the reply format is the model's, not the weights': the thought channel, and calls written as a name and one object in Gemma's dialect of JSON. One declaration in the shared header library (installed as <arch/rad_gemma4_chat.h>), so the two cannot drift apart and the reply-format tests read what both export. The declaration moves unchanged, from gemma4_bf16::chat_format_decl() to rad::arch::gemma4_chat_format(); chatparse_gemma4_test follows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ab4ae529f8 |
chat: a string the model leaves open ends at the call's close
Gemma 4 sometimes skips the <|"|> that closes a string and writes the object's `}` and <tool_call|> straight after the text (measured on the 31B: the close delimiter at p=0.86, `}` at p=0.08). The object reader only ended a dialect string at its own close, so the call's close, a repeated close, an empty thought channel and the next call's opening were read into the value -- up to the next call's <|"|>, which then "closed" it. Inside a string, the call's close now ends the string and the call when the closers just before it close every open bracket of the object, as vLLM's and HF's Gemma 4 parsers end a call at the first `}<tool_call|>`. Those closers are the object's and leave the value, a repeated close goes with them, and a quote or backtick just before them that leaves the string with an odd count of its kind was the string's close in the wrong spelling (seen with thinking on). The call's close inside a string that does not close the object is text, as before. A value opened with a plain `"` or `'` in a dialect with strings of its own is read the way the model writes it there (measured: `'...'` for nested arguments, `"..."` verbatim, or with only `\"` escaped): verbatim but for an escaped quote, never with JSON's other escapes -- `\n` stays the two characters, as in the JS source it came from. It ends at a quote the object's syntax goes on after (a member, an element, the closers and the call's close), or at <|"|>. Single-quoted values were read as bare words before. The object grammar admits such a value too. Refused, the model took the next token the grammar allowed, a `-`, and every single-quoted string came out as a number (-1, -2, ... at temperature 0). Held bytes stay bounded (a 16-byte run, 32 bytes of lookahead). |
||
|
|
d59e0bb003 |
gemma4: declare the reply format -- the thought channel and calls as one object
Gemma 4's template is one llama.cpp reads with a hand-written handler, so the template analysis
found no format in it: the server warned "this model's reply format cannot be described",
returned the thought channel as content and refused every request with tools (HTTP 400).
The plugin now states the format its tokenizer_config.json declares (`response_template`), in
gemma4_chat_format.h, exported through RAD_ARCH_CHAT_FORMAT:
thinking <|channel>thought\n ... <channel|>, reasoning_anywhere
calls <|tool_call>call:NAME{...}<tool_call|>, repeated, triggers on <|tool_call>
the object bare keys, strings between <|"|> and <|"|>, other values as JSON writes them
The template closes an empty channel in the generation prompt when thinking is off and opens one
after a tool response when it is on; RAD_CHAT_THINK_FROM_PROMPT reads both. llama.cpp's handler
records an extra thought channel after the answer and a lone <channel|>; reasoning_anywhere reads
the first as reasoning and drops the second, so neither reaches the content.
chatparse_gemma4_test, against the model's own template (tests/data/chat/gemma4) and llama.cpp's
Gemma 4 parser as the oracle (tests/legacy, which now takes a declared format): every reply the
template renders reads back as the message it rendered, byte for byte as llama.cpp reads it; the
shapes the model writes and the ways it leaves the format; thinking on, off, and after a tool
response; reasoning_format none; a conversation with role:tool results rendered into the open
turn and continued; every truncation, fuzzed replies and a 200 KB string under the streaming
contract; the call grammar against llama.cpp's on rendered calls, tool_choice required and a
response format; and the chat bridge serving it, with the decoder rendering <|"|>.
arch_test holds the export to the header.
End to end on the 31B QAT checkpoint, two R9700 at TP 2: 60 requests over greedy and
temperature 1.0 / top_k 64 / top_p 0.95, streaming and not, thinking on and off. Every request
with tools came back with finish_reason "tool_calls" and JSON arguments -- one call, two parallel
calls, integer and boolean arguments -- every follow-up with role:tool results as an answer with
finish_reason "stop", and no <|channel>, <channel|>, <|tool_call> or <|"|> reached any content or
reasoning_content. With thinking off the model writes <|channel>thought\n<channel|> itself
before its answer to a tool result; it is read as an empty thought.
|