pub struct SpecTelemetry {
pub rounds: u64,
pub drafted: u64,
pub accepted: u64,
pub pos_drafted: [u64; 8],
pub pos_accepted: [u64; 8],
}Expand description
Always-on per-draft-position acceptance telemetry (lane/accept-telemetry, 2026-08-05 —
the llama.cpp #26389 / vLLM spec-decode counter schema, upstream-sweeps 2026-08-05).
Lives on the SpecSession and accumulates across bursts; the serve worker diffs a
stashed copy per burst for its per-model /metrics aggregation and per-request usage.
Same normalization as the [spec-stats] line: p-min-discarded chain tokens are counted
in NEITHER drafted nor accepted.
Fields§
§rounds: u64verify rounds completed (a round-stream burst counts each of its M rounds).
drafted: u64tokens drafted / accepted across all rounds.
accepted: u64§pos_drafted: [u64; 8]how often draft position j (0-based within a round’s chain) was offered / accepted. Positions >= SPEC_TELEM_POS are untracked (totals still count them). The opt-in round-stream arm (MEMRA_SPEC_STREAM=1) reads back only totals, so under it these arrays cover the standard-path rounds only and their sums may undercount the totals.
pos_accepted: [u64; 8]Implementations§
Source§impl SpecTelemetry
impl SpecTelemetry
Sourcepub fn delta_since(&self, prev: &SpecTelemetry) -> SpecTelemetry
pub fn delta_since(&self, prev: &SpecTelemetry) -> SpecTelemetry
Fieldwise self - prev — the worker’s per-burst delta off a copy stashed before the
burst call. Saturating: a caller diffing against the wrong snapshot gets zeros, not
a wrapped counter.
Sourcepub fn merge(&mut self, d: &SpecTelemetry)
pub fn merge(&mut self, d: &SpecTelemetry)
Fieldwise self += d — the worker’s per-model aggregation.
Trait Implementations§
Source§impl Clone for SpecTelemetry
impl Clone for SpecTelemetry
Source§fn clone(&self) -> SpecTelemetry
fn clone(&self) -> SpecTelemetry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more