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
This commit is contained in:
Deadcode committed 2026-10-16 18:25:18 +02:00
1 parent b068190326
commit 1e968f6e1d
739 files changed
+128447 -84632

No files matched your search

+13 -16
View File
@@ -1,16 +1,13 @@
/* table_copy.h -- a container table copied into host memory (--ngram-placement ram): locked memory
* for the host gather, made here, or pinned memory a card reads, which the caller allocates and
* table_copy_fill fills. What follows is about the locked copy; the read and the check are both's.
* for the host gather (made here), or pinned memory a card reads (allocated by the caller, filled
* by table_copy_fill). Both share the read and the check.
*
* A COPY IN HUGE PAGES, NOT THE MAPPING LOCKED. Faulting a container's mapping in costs a fault every
* 4 KiB page and leaves every row behind a 4 KiB translation, so a gather of scattered rows walks
* the page tables on nearly every row; an anonymous MADV_HUGEPAGE region covers thousands of rows a
* page. The region is locked as each page is first touched (MLOCK_ONFAULT), so nothing filled is
* swapped out while the rest fills; it is read from the container by parallel positional reads, the
* container's pages dropped behind them so the table is not held twice; and it is checked against
* the mapping before anyone is handed it, because a wrong offset would serve every row from the
* wrong place without an error. A host kernel reads an address no file backs as the memory it is
* (libavx's table_file), so no plugin takes part. */
* The locked copy uses huge pages rather than locking the mapping: the mapping costs a fault per
* 4 KiB page and a TLB walk on nearly every scattered row, while a MADV_HUGEPAGE region covers
* thousands of rows per page. It is locked on first touch (MLOCK_ONFAULT); filled by parallel
* positional reads, dropping the container's pages behind so the table is not held twice; and
* checked against the mapping before use, since a wrong offset would silently serve wrong rows.
* A host kernel reads an address no file backs as plain memory (libavx's table_file). */
#pragma once
#include "radfile.h"
@@ -25,17 +22,17 @@ struct TableCopy {
size_t bytes = 0; /* the mapping's length: the table rounded up to 2 MiB */
};
/* Copies [src, src + n) of `file`'s mapping, which lies at file offset `foff`, into a new locked
* region. RAD_OK with `out` filled, or a refusal with `why` saying what failed and nothing held. */
/* Copy [src, src + n) of `file`'s mapping (file offset `foff`) into a new locked region. RAD_OK with
* `out` filled, or an error with `why` and nothing held. */
int table_copy_make(const RadFile& file, const uint8_t* src, int64_t n, int64_t foff,
TableCopy* out, std::string* why);
/* The read and the check table_copy_make makes, into [dst, dst + n) the caller allocated: pinned
* memory a card reads in place, when a device kernel gathers the table (--ngram-placement ram). */
/* table_copy_make's read and check, into caller-allocated [dst, dst + n): pinned memory a card
* reads in place when a device kernel gathers the table. */
int table_copy_fill(const RadFile& file, const uint8_t* src, int64_t n, int64_t foff,
uint8_t* dst, std::string* why);
/* Unlocks and unmaps it; a copy never made is a no-op. */
/* Unlock and unmap; a no-op for a copy never made. */
void table_copy_free(TableCopy* c);
} /* namespace rad */