radiance 1.13.0

New models:
- Tencent Hy-Memory (HYV3) from its BF16, FP8 and GGUF checkpoints, with its native tool calls
- M2XFP4: metadata-augmented MXFP4 weights for Qwen3.8-27B and its DFlash2 drafter (top-1 89.1% ->
  92.4% against plain MXFP4), its quantiser and recipe, and ParoQuant's M2XFP4 checkpoints
- Gemma 4 E2B/E4B audio input; NVIDIA-Nemotron-3.5-Bolt-E4B in int8 and 4-bit, on two cards by
  default; Ornith-1.5-122B compose files

Speed:
- Weight reads beside the decode all-reduces (qwen35_fp8, gemma3; --weight-prefetch, on by default):
  the 27B MXFP4 with DFlash2 61.2 -> 67.9 tok/s at c1, TranslateGemma 27B +13%
- Head-256 split-KV decode attention at 256 workgroups and without bank conflicts (27B: +3-5% a
  step at 25-41K context), and the prefill KV split for small launches (a short turn over a long
  context decodes the other sequences 27% faster in that step)
- MXFP4 decode gate_up, activation and fp8 quantiser in one launch (27B, Gemma 3 up to 64 rows:
  TranslateGemma +2-5% at 2-8 streams)
- ParoQuant int4/int5 tiled GEMMs 6-9% faster
- Speculation: a step's tokens are sent before the drafter's passes end, no step waits behind one
  that ends its requests, and the MTP head's first draft no longer collapses after short chats in
  the prefix cache

Features:
- --kv-resident N: KV streaming for a context bigger than VRAM (qwen4exp_fp8, GLM-5.3)
- MiniMax-H3: reference media and keyframe conditioning with the VAE encoders
- Krea 2 rebalance presets balanced, detail and subtle
- The dashboard's request history; a stall watch that reports a frozen step's thread and stack
- rad-tune at the served configuration, collectives measured as the exchange; Gemma 4 E2B/E4B's
  per-layer embeddings read ahead off the step path
- A GPTQ calibration tap and recipe for Gemma 4 31B's w4a8 container

Fixes:
- The two-rank all-reduce checks that a peer's push has landed before reducing it
- z-lab's DFlash drafter on Gemma 4 31B keeps drafting after a prefix-cache hit
- MiniMax-H3's modulation rows

Changes: Plugin ABI 31: out-of-tree plugins must be rebuilt. RADIANCE_PREFETCH_BESIDE is
--weight-prefetch now; RADIANCE_NO_HUGE_PAGES, RADIANCE_IDS_EARLY, RADIANCE_ATTN_BAND_SPLIT,
R4D_PREFILL_SPLITS, RAD_PLE_TIMING and RAD_PLE_CACHE_ROWS are gone.
This commit is contained in:
Deadcode committed 2026-10-27 16:47:35 +01:00
198 files changed
+20904 -3240

No files matched your search

+5 -8
View File
@@ -168,14 +168,11 @@ RAD_ADV_FN void adv_row(const AdvanceArgs& a, int i) {
ctx[i] = base;
/* The context ends at the last committed position, not at the run's end. Attention places
* row j of a q_len-row run at seqused - q_len + j and reads keys up to there (attn_paged's
* contract, libref/ref_attn.cpp). The rows past `last` sit at the last committed position
* but are counted as if at base + j, so with the run's whole length the last row -- round
* 1, the one row whose output goes on -- would also read the n_spec - acc positions after
* it, which the head has not written for this sequence: last step's speculative rounds, or
* whatever the block held before it was handed out (another request's K and V, or bytes
* the expert slab left on a recalled loan). Ending it there puts the last row where it
* is; earlier rows count lower than their positions, but nothing reads their output, and
* every row's K and V still store at the slot of its own position. */
* contract). With the run's whole length the last row, the only one whose output is used,
* would also read the n_spec - acc positions after it, which the head has not written for
* this sequence (stale rounds, or another request's K and V). Earlier rows then count
* lower than their positions, but nothing reads their output, and every row's K and V
* still store at its own position's slot. */
adv_groups(a, i, k, base, n, last + 1);
return;
}
+16 -12
View File
@@ -4,6 +4,7 @@
#include "mm/processor.h"
#include "derive.h"
#include "device/device.h"
#include "kvstream/bind.h"
#include <algorithm>
#include <cassert>
@@ -12,11 +13,9 @@
namespace rad {
/* How many steps of the following prompt the PLE read-ahead queue stages (RadBatch::n_ahead):
* the arch's reader thread drains the queue at disk speed, off the step path, so a prefill
* chunk's table rows are already cached when its gather runs. Keep in step with rad_block_ple.h
* (kAheadChunks), which clamps to the buffer it declared; a mismatch degrades to a smaller queue,
* never an overflow. */
/* Steps of the following prompt a prefill batch carries for the PLE read-ahead queue
* (RadBatch::n_ahead), whose rows the arch's reader thread prefetches off the step path. Keep in
* step with rad_block_ple.h's kAheadChunks, which clamps to the buffer it declared. */
static constexpr int64_t k_ahead_chunks = 8;
/* Alignment of each staging array carved from a set's slab. One slab per set means a couple of
@@ -104,9 +103,7 @@ void BatchBuilder::carve(Set& s, char* h) {
*ph = ::rad::carve<int32_t>(h, oh, n);
*pd = ::rad::carve<int32_t>(d, od, n);
};
/* The step's tokens, then the PLE read-ahead queue -- k_ahead_chunks steps of the following
* prompt (RadBatch::n_ahead), which the arch's reader thread prefetches off the step path
* (rad_block_ple.h, which clamps to the same count). */
/* The step's tokens, then k_ahead_chunks steps of the following prompt (RadBatch::n_ahead). */
pair(&s.h_tok, &s.d_tok, (1 + k_ahead_chunks) * T);
pair(&s.h_pos, &s.d_pos, T);
pair(&s.h_parent, &s.d_parent, T);
@@ -241,6 +238,7 @@ int BatchBuilder::alloc_set(Set& s, const std::vector<KVGroupInfo>& groups) {
for (Out& o : out_) {
o.kv.assign(ranks_.size(), std::vector<RadKVGroupBatch>(s.groups.size()));
o.stream.assign(ranks_.size(), std::vector<RadKVStream>(s.groups.size()));
o.batch.assign(ranks_.size(), RadBatch{});
}
pitch_.assign(s.groups.size(), 1);
@@ -829,6 +827,8 @@ int BatchBuilder::build_groups(const StepPlan& plan, const IKVManager& kv, Set&
a.tlen_off = (const char*)s.d_tlen - d0;
}
/* Each rank's own view of the group's ring and mirror (kvstream_step_view). */
const RadKVStream* sv = kv.stream_view((int32_t)gi);
for (size_t r = 0; r < ranks_.size(); ++r) {
void* base = s.dev[r];
RadKVGroupBatch& b = o.kv[r][gi];
@@ -841,6 +841,10 @@ int BatchBuilder::build_groups(const StepPlan& plan, const IKVManager& kv, Set&
b.state_index_pitch = g.sidx_pitch;
b.block_size = L.block_size;
b.max_blocks = pitch;
b.stream = kvstream_step_view(&o.stream[r][gi],
ranks_[r].kv_streams ? ranks_[r].kv_streams[gi] : sv,
ranks_[r].kv_streams != nullptr,
ranks_[0].kv_base, ranks_[r].kv_base);
/* The group's arrays are uploaded with the rest of the slab in build(). */
}
@@ -1052,10 +1056,10 @@ const RadBatch* BatchBuilder::build(const StepPlan& plan, const IKVManager& kv,
}
}
/* Up to the read-ahead queue's worth of the last sequence's following tokens, after this
* step's own (RadBatch::n_ahead). Only on a trunk pass whose last entry is a prefill chunk,
* bounded by the tokens the request has; like token_at, a re-prefill after preemption
* continues into its own output. The arch clamps to the rows it declared. */
/* Up to k_ahead_chunks steps of the last sequence's following tokens, after this step's own
* (RadBatch::n_ahead). Only on a trunk pass whose last entry is a prefill chunk, bounded by the
* tokens the request has; like token_at, a re-prefill after preemption continues into its own
* output. The arch clamps to the rows it declared. */
int64_t n_ahead = 0;
if (n_seq > 0 && plan.draft_pass == 0 && plan.tok_shift == 0) {
const StepEntry& e = plan.e[(size_t)(n_seq - 1)];
+9
View File
@@ -105,6 +105,13 @@ public:
int device = 0;
RadStream stream = nullptr;
Program* prog = nullptr;
/* This rank's KV pool base, for rebasing rank 0's map pointers when no per-rank views are
* given (kvstream_step_view). */
void* kv_base = nullptr;
/* Per group, this rank's stream view or null, owned by the engine. Each rank's view names its
* own maps and its own mirror. Pointers rather than the manager, so a test that drives the
* builder without a device does not link the manager. */
const RadKVStream* const* kv_streams = nullptr;
};
/* `prog` is non-const because derived buffers are written into its arena, whose pointer lands
@@ -242,6 +249,8 @@ private:
static constexpr int kOut = RAD_SCHED_MAX_SPEC + 4;
struct Out {
std::vector<std::vector<RadKVGroupBatch>> kv;
/* Per rank and group, the RadKVStream a batch names: each rank's own copy, outside the slab. */
std::vector<std::vector<RadKVStream>> stream;
std::vector<RadBatch> batch;
};
+18
View File
@@ -94,6 +94,8 @@ struct IKVManager {
/* Blocks held by anything, as opposed to free_blocks (what can be handed out now). On an
* elastic pool they differ by what the cache released (KVManager::held_blocks). */
virtual int64_t held_blocks(int32_t group) const = 0;
/* KVManager::held_top_blocks; a manager that cannot answer says the whole row. */
virtual int64_t held_top_blocks(int32_t group) const { (void)group; return INT64_MAX; }
/* The pool in bytes, the only unit that sums across groups. Asked of the manager because its
* plan knows whether a group counts blocks or states. */
@@ -102,6 +104,15 @@ struct IKVManager {
/* What the carve gave the group; an elastic pool may have released part of it. */
virtual int64_t pool_bytes_carved(int32_t group) const = 0;
/* A streamed group's RadKVStream for the step batch, or null for a resident group; its addresses
* are fixed from bring-up. */
virtual const RadKVStream* stream_view(int32_t group) const { (void)group; return nullptr; }
/* The resolve's cumulative traffic and the rings' depth, for the metrics; zero without
* streaming. */
virtual int64_t stream_misses() const { return 0; }
virtual int64_t stream_bytes_in() const { return 0; }
virtual int64_t stream_resident_blocks() const { return 0; }
/* Tokens one block covers, or 0 for a stateful group. */
virtual int64_t block_tokens(int32_t group) const = 0;
/* A checkpoint slot carries this group's window (KVGroupPlan::win_snap): a prefix hit, which
@@ -329,9 +340,16 @@ struct KVBinding final : IKVManager {
int64_t free_blocks(int32_t g) const override { return m->free_blocks(g); }
int64_t total_blocks(int32_t g) const override { return m->total_blocks(g); }
int64_t held_blocks(int32_t g) const override { return m->held_blocks(g); }
int64_t held_top_blocks(int32_t g) const override { return m->held_top_blocks(g); }
int64_t pool_bytes(int32_t g) const override { return m->pool_bytes(g); }
int64_t pool_bytes_used(int32_t g) const override { return m->pool_bytes_used(g); }
int64_t pool_bytes_carved(int32_t g) const override { return m->pool_bytes_carved(g); }
const RadKVStream* stream_view(int32_t g) const override { return m->stream_view(g); }
int64_t stream_misses() const override { return (int64_t)m->stream_stats().misses; }
int64_t stream_bytes_in() const override { return (int64_t)m->stream_stats().bytes_in; }
int64_t stream_resident_blocks() const override {
return m->stream_stats().resident_blocks;
}
int64_t block_tokens(int32_t g) const override {
const KVGroupPlan* p = m->plan(g);
return p && p->paged() ? p->block_size : 0;
+5
View File
@@ -77,6 +77,11 @@ struct SchedMetrics {
* difference is the VRAM the elastic pool released behind unheld blocks. */
int64_t bytes_carved = 0;
} kv[RAD_SCHED_MAX_KV_GROUPS];
/* KV streaming: the rings' depth over every streamed group, and the resolve's cumulative misses
* and bytes copied in from the host mirrors. Zero when nothing streams. */
int64_t kv_resident_blocks = 0;
int64_t kv_stream_misses = 0;
int64_t kv_stream_bytes_in = 0;
/* Prefix caching (§7.3). Attention and linear are reported separately because they hit at
* different granularities. */
+72 -23
View File
@@ -483,6 +483,7 @@ void Scheduler::trim_prefix_cache() {
void Scheduler::close_request(SchedReq& s, ReqState st, const char* reason, bool defer_free,
bool publish, int status, const char* why) {
++step_finished_;
/* Publish before freeing: this is the only moment the whole prefix is both computed and still
* owned. insert() takes its own KV references, so the blocks survive the free below. Cancelled
* and failed requests are published too; their prompts were computed, and a client that hangs
@@ -563,6 +564,44 @@ void Scheduler::reserve_ckpt(StepEntry& e, const Request& r, int64_t pos, int32_
++m_.checkpoints_written;
}
int Scheduler::fail_prefilling(const char* why) {
std::lock_guard<std::mutex> lk(mu_);
/* The sink keeps this pointer past the call (Sink::why_). */
stream_why_ = why ? why : "kv streaming overflow";
why = stream_why_.c_str();
int n = 0;
/* The prompts the step just committed completed; when it produced no row (a middle prefill
* chunk), every request still prefilling, whose next chunk would read the failed table. */
const bool by_step = !last_prefill_ids_.empty();
auto fail = [&](SchedReq& s) {
if (s.req->state != ReqState::Running && s.req->state != ReqState::Preempted &&
s.req->state != ReqState::Waiting)
return;
/* The next step may already be issued, so blocks it names stay until its commit, as for
* cancel(). */
const bool in_flight = in_step(s) || block_holds(s.req->id);
/* RAD_E_FULL: the ring ran out (RAD_E_STATE would read "called in the wrong phase"). */
close_request(s, ReqState::Failed, "kv_stream_overflow", in_flight,
/*publish=*/false, RAD_E_FULL, why);
++n;
};
if (by_step) {
for (uint64_t id : last_prefill_ids_) {
auto it = by_id_.find(id);
if (it != by_id_.end()) fail(*reqs_[(size_t)it->second]);
}
} else {
std::vector<int32_t> live(running_);
live.insert(live.end(), waiting_.begin(), waiting_.end());
for (int32_t slot : live) {
if (slot < 0 || (size_t)slot >= reqs_.size() || !reqs_[(size_t)slot]) continue;
SchedReq& s = *reqs_[(size_t)slot];
if ((int64_t)s.req->n_computed < (int64_t)s.req->prompt.size()) fail(s);
}
}
return n;
}
int Scheduler::cancel(uint64_t id) {
std::lock_guard<std::mutex> lk(mu_);
auto it = by_id_.find(id);
@@ -1843,15 +1882,12 @@ bool Scheduler::is_eog(int32_t id) const {
return std::binary_search(eog_.begin(), eog_.end(), id);
}
/* Whether the step just issued ends every request it carries: when it can bring each to its
* max_tokens -- certainly with the token it emits, possibly with the drafts it verifies, since it
* commits that token and every draft it accepts -- or, most likely, when those drafts hold an
* end-of-generation id (not for an ignore_eos request). A step issued ahead behind it would verify
* nothing, its rows' requests finished by the commit in between, yet the card runs its whole
* forward pass and the drafter's passes behind it, and a request that arrives once the last token
* is out (a client's next turn, sent as this one ends) queues behind them: a decode step of TTFT
* (#225). A guess that misses (a drafted end the verify rejects, or too few drafts accepted to
* reach max_tokens) costs one step built after the commit instead of before it. */
/* Whether the step just issued likely ends every request it carries: its token and accepted drafts
* can reach each request's max_tokens, or its drafts hold an end-of-generation id (unless
* ignore_eos). A step issued ahead behind it would verify nothing, yet the card would run its
* forward pass and drafter passes, and a request arriving as the reply ends (a client's next turn)
* would wait behind them, about a decode step of TTFT. A wrong guess costs one step built after
* the commit instead of before it. */
bool Scheduler::ends_every_request() const {
for (const StepEntry& e : plan_.e) {
if (!e.produces_token || e.slot < 0 || (size_t)e.slot >= reqs_.size()) return false;
@@ -1875,8 +1911,7 @@ const RadBatch* Scheduler::step_next_locked() {
/* Once the hold is spent, the held chunk goes into the next full step rather than waiting
* behind decode steps issued ahead. */
if (held_prefill_ > 0 && interleave_left_ == 0) return nullptr;
/* Nothing behind a step that ends every request it carries (ends_every_request). Before the
* loop below, which reserves the next step's KV. */
/* Before the loop below, which reserves the next step's KV. */
if (ends_every_request()) return nullptr;
plan_next_.reset();
@@ -1975,14 +2010,16 @@ void Scheduler::promote_next() {
}
/* ------------------------------------------------------------------ commit */
/* With early ids (Engine::collect_step waits on tok_end_, not step_end_), this runs while the card
* may still be running the drafter's passes behind the step. So it issues no device work and
* allocates nothing: what it releases (KV blocks, StepSlot cards, prefix-cache publications) may
* still be read by those passes, and is reused only by work the engine issues after its wait for
* step_end_. Device work or an allocation added here must move behind that wait. */
int Scheduler::commit(const StepResult& res) {
/* This may run while the card still runs the drafter's passes behind the step (Engine::StepOut::
* early). It therefore issues no device work and allocates nothing: what it releases (KV blocks,
* StepSlot cards, prefix-cache publications) may still be read by those passes, and is reused only
* by work the engine issues after waiting for step_end_. */
int Scheduler::commit(StepResult& res) {
std::lock_guard<std::mutex> lk(mu_);
if (!step_open_) return RAD_E_STATE;
/* StepResult's counts describe this step only. */
step_finished_ = 0;
last_prefill_ids_.clear();
if (res.n_seq != (int)plan_.e.size()) {
RAD_ERR("commit of %d sequences against a step of %d", res.n_seq, (int)plan_.e.size());
return RAD_E_INVAL;
@@ -2045,8 +2082,12 @@ int Scheduler::commit(const StepResult& res) {
r.n_cached);
/* Once, when the prompt is fully placed: the usage block's admission accounting.
* `n_cached` is what the prefix cache supplied. */
if (r.n_computed >= (int64_t)r.prompt.size())
if (r.n_computed >= (int64_t)r.prompt.size()) {
server::sink_prompt_stats(r.sink, (int32_t)r.prompt.size(), r.n_cached);
/* From here a decode step reads the ring, and the engine checks the resolve's
* overflow. */
last_prefill_ids_.push_back(r.id);
}
if (e.produces_token && res.token && r.embed) {
/* The answer is the pooled vector the engine already put in the sink; there is
* no token to emit, and `eos` ends the request below. */
@@ -2172,8 +2213,8 @@ int Scheduler::commit(const StepResult& res) {
} else if (eos) {
close_request(s, ReqState::Finished, "stop", carried);
}
/* -v: a step issued ahead behind a request this commit ended verifies nothing; why the
* rule in step_next_locked let it through (ends_every_request). */
/* -v: a request ended with a step issued ahead behind it, which ends_every_request did not
* predict. */
if (carried && r.state != ReqState::Running && (int)log_level() >= (int)Log::Debug) {
const int32_t acc = res.n_accepted ? res.n_accepted[i] : 0;
bool drafted_end = false;
@@ -2195,10 +2236,11 @@ int Scheduler::commit(const StepResult& res) {
/* Every entry is retired, so anything deferred on this step, or on a drafter snapshot that
* block_end() / serial_end() has since cleared, can be released: every pass naming them was
* issued before this step's readback. That readback may return while the drafter's passes
* behind it still run (Engine::StepOut::early), and the engine then waits for them before it
* issues anything else, so nothing reuses what is released here before they end. */
* issued before this step's readback, and the engine waits for the drafter's passes behind it
* before issuing anything that could reuse what is released here. */
sweep_deferred();
res.n_prefill_done = (int)last_prefill_ids_.size();
res.n_finished = step_finished_;
return RAD_OK;
}
@@ -2413,6 +2455,9 @@ const RadBatch* Scheduler::serial_batch(int round, int step) {
serial_plan_.reset();
serial_plan_.phase = RAD_PHASE_DECODE;
/* The deployment's window, though no draft-pass entry verifies: the pass's KV view is chosen
* from its row shape against 1 + n_spec (kv_pass_view). */
serial_plan_.n_spec = cfg_.n_spec > 0 ? cfg_.n_spec : 0;
/* Negative is the history pass; positive is draft round r. The sign is what the plugin reads
* to decide whether the pass ends in the lm_head (rad_runtime.h). */
serial_plan_.draft_pass = round == 0 ? -1 : round;
@@ -2847,6 +2892,10 @@ SchedMetrics Scheduler::metrics_locked() const {
m.kv[i].bytes_used = kv_->pool_bytes_used(i);
m.kv[i].bytes_carved = kv_->pool_bytes_carved(i);
}
/* Zero on a server whose groups are all resident. */
m.kv_resident_blocks = kv_->stream_resident_blocks();
m.kv_stream_misses = kv_->stream_misses();
m.kv_stream_bytes_in = kv_->stream_bytes_in();
if (pc_) { m.prefix_evictions = pc_->evictions();
m.prefix_ckpt_evictions = pc_->ckpt_evictions();
+21 -7
View File
@@ -127,12 +127,15 @@ struct SchedReq {
class Scheduler {
public:
/* What the sampler hands back after a step: per sequence, how many drafts survived, the token
* sampled at the accepted position, and whether the sequence ended. No logits. */
* sampled at the accepted position, and whether the sequence ended. No logits. commit() fills
* in the two counts. */
struct StepResult {
int n_seq = 0;
const int32_t* n_accepted = nullptr; /* [n_seq] drafted tokens accepted, 0..n_spec */
const int32_t* token = nullptr; /* [n_seq] token sampled at the accepted position */
const uint8_t* eos = nullptr; /* [n_seq] 1 when the sequence ended */
int n_prefill_done = 0; /* prompts this step fully placed */
int n_finished = 0; /* requests that ended during this step */
/* Logprobs, null on a step where no request asked: entry i's j-th emitted token (its
* accepted drafts first, then the sampled token) is lp[first_row[i] + j]. */
const TokenLogprobs* lp = nullptr;
@@ -176,6 +179,10 @@ public:
* under exactly the load that cancels. */
int cancel(uint64_t id);
Request* find(uint64_t id);
/* Fail every request prefilling in the step just committed, with `why` for the client: a streamed
* group's resolve latched overflow, so their selection tables no longer address the pool
* (docs/KV-STREAMING.md §3.4). */
int fail_prefilling(const char* why);
/* Whether the request is still admitted and Running, read under the lock. */
bool running(uint64_t id) const;
/* What the step just committed left for `seq`, copied by commit under the lock. False when
@@ -274,9 +281,8 @@ public:
* cache. Takes the step lock because the step path inserts into the map (live sequences hold
* their own block references). See IScheduler::reset_prefix_cache. */
int64_t reset_prefix_cache();
/* The vocabulary's end-of-generation ids, the ones the card's acceptance reads: step_next()
* issues no step ahead behind one whose drafts end every request it carries. Set once at
* start; none (the default) leaves only the max_tokens half of that rule. */
/* The end-of-generation ids the card's acceptance reads, for ends_every_request. Set once at
* start; without them only max_tokens ends are predicted. */
void set_eog(std::vector<int32_t> ids);
/* Forget one stored conversation, by label or engine id, keeping its first `keep_tokens`
* (IPrefixCache::release_session). Refused with RAD_E_STATE while a request of that
@@ -311,12 +317,14 @@ public:
void expect_draft(uint64_t id, int n);
const RadBatch* step_next();
const RadBatch* step_next_locked();
/* Whether the step just issued ends every request it carries (step_next_locked). */
/* Whether the step just issued likely ends every request it carries; step_next_locked then
* issues nothing behind it. */
bool ends_every_request() const;
void promote_next();
/* Fold the step's outcome back in: append tokens, roll back rejected speculation, retire
* finished requests, feed the draft controller. */
int commit(const StepResult& r);
* finished requests, feed the draft controller, and fill `r`'s report counts
* (n_prefill_done, n_finished). */
int commit(StepResult& r);
/* Ends the step for timing; call once per loop iteration that ran a step, after the drafter,
* so the draft rounds are charged to the step (see the definition). Without it the counters
* stay correct but there is no timing. */
@@ -564,6 +572,10 @@ private:
std::vector<int32_t> running_;
std::vector<int32_t> waiting_;
std::vector<uint64_t> completed_;
/* StepResult's counts for the step being committed: the ids whose prompt it completed, and the
* requests it ended. Reset at every commit. */
std::vector<uint64_t> last_prefill_ids_;
int step_finished_ = 0;
/* Requests whose release waits on something that still refers to them (a deferred reap or a
* deferred free). A count, so the sweeps cost nothing on the steps where there are none. */
@@ -588,6 +600,8 @@ private:
* lives here). See add_locked. */
int64_t pool_tokens_ = -1;
std::string pool_refusal_;
/* fail_prefilling()'s message; a sink keeps the pointer until the HTTP thread writes it. */
std::string stream_why_;
/* Scratch for a prefix-cache hit's block ids, one row per cached group. Reserved at init so
* an admission does not reach the allocator. */