radiance 1.0.7

- Chat responses report usage.completion_tokens_details.reasoning_tokens: how much of
  completion_tokens was the reasoning block. A reply that ran out of max_tokens inside <think>
  now reads as that, instead of as a model that answered nothing.
- thinking_token_budget (vLLM's name; thinking_budget is read as the same field) caps the
  reasoning. At that many tokens the block is closed and the model answers from what it has
  reasoned so far. It holds under speculative decoding and at any temperature.
  --thinking-token-budget sets the default for clients that send none.
- Every completion response carries a `timings` object in llama.cpp's shape: prompt and generated
  token counts, times and rates, and the speculative tokens drafted and accepted for that request.
  It is on the buffered response, on each streamed choice's final chunk and on the usage chunk,
  so a proxy such as llama-swap can read per-request speed. /metrics stays the aggregate.
- Peer-to-peer access between the cards is checked at launch. The all-reduce kernels need it; on
  a machine where the cards cannot reach each other's memory, startup stops and names device.p2p
  instead of the first all-reduce faulting or hanging. A kernel library can require it with a
  constraint on the new "device." keys, which match the machine and not the op's parameters.
- A pool allocation the driver refuses says why, with the card's free VRAM at that moment and,
  for the host pool, the pinned memory taken against the amdgpu limit (ttm.pages_limit). Every
  rank pins its own --host-pool-mib, so --tp 2 pins it twice.
This commit is contained in:
Deadcode committed 2026-10-04 21:23:07 +02:00
1 parent 6df26315b9
commit 966bda899a
39 files changed
+1304 -52

No files matched your search

+23
View File
@@ -159,6 +159,11 @@ static const RadConstraint kCNorm4096[] = {
static const RadConstraint kCTie[] = {
RAD_CGE("M", 1),
};
/* A kernel that reaches another card's memory: a constraint on the machine, not the geometry. */
static const RadConstraint kCPeer[] = {
RAD_CGE("M", 1),
RAD_CEQ(RAD_FACT_P2P, 1),
};
/* Constraint ORDER is the order the miss message reports in: the first unmet one is what a reader
* is told, so the cheapest and most identifying predicate goes first. */
static const RadConstraint kCAttn[] = {
@@ -197,6 +202,10 @@ static const RadOpSchema kSchemas[] = {
"a derived key its kernel does not pin" },
{ "t_skinny", kPGemm, NELEM(kPGemm), kOpdGemm, NELEM(kOpdGemm), "a range with a hole in it" },
{ "t_eq", kPTie, NELEM(kPTie), kOpdNorm, NELEM(kOpdNorm), "an EQ band boundary" },
{ "t_peer", kPTie, NELEM(kPTie), kOpdNorm, NELEM(kOpdNorm),
"a peer kernel with a fallback beneath it" },
{ "t_peer_only", kPTie, NELEM(kPTie), kOpdNorm, NELEM(kOpdNorm),
"a peer kernel and nothing else" },
};
static const RadKernelInfo kKernels[] = {
@@ -236,6 +245,20 @@ static const RadKernelInfo kKernels[] = {
.computes = "nothing; a registry row", .shape = "any", .dtypes = "any",
.domain = RAD_DOMAIN_HOST, .priority = 10, .launch = t_launch },
/* Peer access is the machine's: the direct row needs it, the staged one does not. */
{ .name = "t_peer_direct", .op = "t_peer", .family = "ar",
.computes = "nothing; a registry row", .shape = "M >= 1, cards reach each other",
.dtypes = "any", .domain = RAD_DOMAIN_DEVICE, .priority = 20,
.constraints = kCPeer, .n_constraints = NELEM(kCPeer), .launch = t_launch },
{ .name = "t_peer_staged", .op = "t_peer", .family = "ar",
.computes = "nothing; a registry row", .shape = "M >= 1", .dtypes = "any",
.domain = RAD_DOMAIN_DEVICE, .priority = 10,
.constraints = kCTie, .n_constraints = NELEM(kCTie), .launch = t_launch },
{ .name = "t_peer_only_direct", .op = "t_peer_only", .family = "ar",
.computes = "nothing; a registry row", .shape = "M >= 1, cards reach each other",
.dtypes = "any", .domain = RAD_DOMAIN_DEVICE, .priority = 10,
.constraints = kCPeer, .n_constraints = NELEM(kCPeer), .launch = t_launch },
/* Same op, same priority, same constraints. Ties break on declaration order, so t_tie_first
* wins -- and if it ever does not, the tie rule has silently changed. */
{ .name = "t_tie_first", .op = "t_tie", .family = "norm",