Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
5e757b8
perf(skippy): reuse prompt prefixes without eager KV snapshots
i386 Oct 31, 2026
284ccb9
fix(skippy): report independent checkpoint RAM retention
i386 Oct 31, 2026
dfb5de0
docs: track reusable four-model KV validation jobs
i386 Oct 31, 2026
fc45513
fix(skippy): admit requests against the full KV pool
i386 Oct 31, 2026
2774f42
docs: cover admission and retained KV scaling in validation
i386 Oct 31, 2026
0ae5e10
feat(ggml): add indexed KV attention for validation
i386 Oct 31, 2026
493892c
docs(skippy): distinguish attention layout rounding from indexing
i386 Oct 31, 2026
52ee087
perf(ggml): bound indexed attention tuning and mask construction
i386 Oct 31, 2026
88c0e4a
test(skippy): add reusable four-model KV validation commands
i386 Oct 31, 2026
5e45c6a
test(skippy): drain snapshot fixture output while children run
i386 Oct 31, 2026
0f741cd
docs(skippy): record throughput parity and four-model CUDA validation
i386 Oct 31, 2026
d871b37
test(skippy): verify native checkpoint cold offload and restart
i386 Oct 31, 2026
5b50723
perf(ggml): route indexed decode through the vector attention kernel
jaredwy Oct 31, 2026
0c4a0ca
feat(bench): add reusable fixed-work AgentX comparison campaigns
i386 Oct 31, 2026
31a0eb8
fix(skippy): enable resident prefix reuse with one lane
i386 Oct 31, 2026
83a052f
fix(bench): bind offline AgentX tokenizers to pinned snapshots
i386 Oct 31, 2026
25f3bb7
fix(bench): parse structured output independently of diagnostic redac…
i386 Oct 31, 2026
58dbff8
fix(skippy): admit queued requests until their actual deadline
i386 Oct 31, 2026
ae2b64f
fix(skippy): restore cooperative prefill and longest-prefix reuse
i386 Oct 31, 2026
1501768
fix(skippy): preserve upstream CUDA attention selection
i386 Oct 31, 2026
59c670b
test(skippy): verify large cold offload disk concurrency and restart
i386 Oct 31, 2026
85ff92f
fix(skippy): preserve standard attention arithmetic
i386 Oct 31, 2026
db52a30
fix(skippy): prevent cache restores waiting behind a partial wave
i386 Oct 31, 2026
623b524
fix(skippy): avoid waiting for an empty direct decode batch
i386 Nov 1, 2026
e3c43f6
perf(skippy): use upstream per-owner KV rows for attention
i386 Nov 2, 2026
4ae8c55
docs(skippy): record final row-attention gates and fleet policy
i386 Nov 2, 2026
e4ae069
fix(skippy): enforce shared prefix admission and evidence
i386 Nov 6, 2026
5be9a56
ci(agentx): admit the pinned upstream client environment
i386 Nov 6, 2026
3ea4eef
fix(skippy): preserve fair admission and native boundaries
i386 Nov 6, 2026
cfa7587
fix: address cache and AgentX review findings
i386 Nov 6, 2026
80a919d
perf(skippy): match llama.cpp decode on Metal and resume multi-turn c…
jaredwy Nov 9, 2026
63602d8
perf(skippy): rebase the Metal decode work onto the new llama pin
jaredwy Nov 12, 2026
73e7268
fix(skippy): restore multi-turn checkpoints and span nesting lost in …
jaredwy Nov 12, 2026
2ab38ae
perf(skippy): place each request's share of a batch together in the K…
jaredwy Nov 12, 2026
42005f4
feat(skippy): batch policy API, configurable sampling executor, revie…
jaredwy Nov 12, 2026
2230468
test(skippy): add a concurrent wave to the cache reuse smoke
jaredwy Nov 12, 2026
c537fec
test(skippy): check row-list attention on the GPU for pooled list lay…
jaredwy Nov 12, 2026
ee8d792
fix(skippy): give the task pool test the source include path
jaredwy Nov 12, 2026
ea6de46
fix(skippy): keep every concurrent session's exact-state entry past t…
i386 Nov 15, 2026
e821ec3
fix(skippy): scale exact-state capture admission with the serving lan…
i386 Nov 15, 2026
2b25bb6
feat(xtask): reproducible parallel AgentX fleet benchmarks
i386 Nov 15, 2026
69f2785
feat(xtask): build AgentX fleet inputs from pinned source, move bytes…
i386 Nov 16, 2026
fbd6ae2
fix(xtask): build fleet inputs without sccache on fresh machines
i386 Nov 16, 2026
98ac0d7
fix(xtask): disable fleet in-job sccache through the build script's s…
i386 Nov 16, 2026
3acd8e8
fix(xtask): retry refused connections in the fleet smoke probe
i386 Nov 16, 2026
e06ea6a
fix(xtask): ship smoke serve logs as artifacts and stagger probe starts
i386 Nov 16, 2026
ec18faf
fix(xtask): gate fleet smoke probes on real server readiness
i386 Nov 16, 2026
943b8a0
fix(xtask): collect llama-server's companion libs from build/bin too
i386 Nov 16, 2026
9737f96
feat(xtask): decode-profile pass in the fleet smoke
i386 Nov 16, 2026
d5d7dcc
fix(skippy): make the hard byte cap enforce above the retention floor…
i386 Nov 16, 2026
625d2f4
feat(xtask): prefill chunk-size sweep in the fleet smoke
i386 Nov 16, 2026
b6dc1a4
feat(xtask): emit skippy stderr telemetry spans during the decode pro…
i386 Nov 16, 2026
381d3c9
fix(xtask): wait for serve processes to exit before starting the next
i386 Nov 16, 2026
56fab3a
fix(xtask): repair mangled skippy profile serve invocation
i386 Nov 16, 2026
d3d8b6d
feat(xtask): skippy no-cache profile pass to isolate prefill overhead
i386 Nov 16, 2026
06d0221
feat(xtask): nsys CUDA timeline profiling for prefill overhead isolation
i386 Nov 16, 2026
8b5e87b
Merge main 90286bb7 into skippy/metal-placement-batching
jaredwy Nov 18, 2026
25770dc
fix(skippy): stop building native test targets no patch defines
jaredwy Nov 18, 2026
738bef6
fix(skippy): keep compacted KV rows when their chunk had been released
jaredwy Nov 18, 2026
ec1fa11
fix(skippy): check every row-list entry before Metal reads a block fr…
jaredwy Nov 18, 2026
275f71e
fix(skippy): keep a task pool helper within the limit of the run it s…
jaredwy Nov 18, 2026
12de9dd
fix(skippy): apply the KV memory opt-outs to MSA, DSA-ISWA and DeepSe…
jaredwy Nov 18, 2026
89c4a21
fix(skippy): end process tracing when the host exits, not when a mode…
jaredwy Nov 18, 2026
aa4bb28
fix(skippy): report native checkpoint bytes against the checkpoint bu…
jaredwy Nov 18, 2026
470e81c
fix(skippy): release a discarded span's Tracy lane
jaredwy Nov 18, 2026
837cb73
fix(skippy): read the current row-list attention layout in the KV matrix
jaredwy Nov 18, 2026
76a06e5
docs(skippy): move the KV validation plan beside its README
jaredwy Nov 18, 2026
46c314b
Merge main 152ecf5a into skippy/metal-placement-batching
michaelneale Nov 19, 2026
1ec8152
fix: defer unpinned Qwen performance suites
i386 Nov 19, 2026
01eb926
ci: merge latest main into PR 3031
i386 Nov 19, 2026
7f54431
ci: declare the KV validation model list as a cache input and match m…
michaelneale Nov 19, 2026
ede388c
ci: stop requiring an eager kv-recurrent record from dense resident s…
michaelneale Nov 19, 2026
8af030b
ci: expect resident prefixes for the hybrid model in the split smoke
michaelneale Nov 19, 2026
3afad3e
Merge branch 'main' into skippy/metal-placement-batching
michaelneale Nov 19, 2026
b31d74b
chore: merge skippy/metal-placement-batching into fix/pr3031-prefix-r…
michaelneale Nov 19, 2026
d3c020a
fix(xtask): drop unused probe_url_range
michaelneale Nov 19, 2026
7271922
fix(ci): review fleet-worker python probes, drop standalone probe scr…
michaelneale Nov 19, 2026
e8b3351
Merge origin/main into fix/pr3031-prefix-retention
michaelneale Nov 20, 2026
f5e1d2c
fix(skippy-serving): keep explicit exact budgets strict and floor per…
michaelneale Nov 20, 2026
aff032f
chore(agentx): split fleet launcher out of the prefix-retention fix
michaelneale Nov 20, 2026
012de4e
fix(skippy): restore the hybrid checkpoint test from its page and rec…
michaelneale Nov 20, 2026
f8c9800
fix(skippy): record the patch queue digest after the hybrid checkpoin…
michaelneale Nov 20, 2026
678d162
fix(skippy): recheck model content when file stamps fall inside the t…
michaelneale Nov 20, 2026
e6037b0
perf(skippy): defer batch synchronization to export time for CPU/GPU …
i386 Nov 20, 2026
6e88aea
Merge remote-tracking branch 'origin/main' into w3098
michaelneale Nov 20, 2026
4e851c2
fix(skippy): address exact-state retention and runtime review findings
i386 Nov 20, 2026
9d69c02
Merge main into prefix retention
i386 Nov 20, 2026
e9c35db
Stabilize inference and cancellation tests on slow Windows runners
i386 Nov 20, 2026
e60fe81
fix(skippy): account for embeddings after the cleanup fence
i386 Nov 20, 2026
04164fc
Merge remote-tracking branch 'origin/main' into fix/pr3031-prefix-ret…
michaelneale Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -720,13 +720,15 @@ async fn dropped_native_stream_cancels_local_and_remote_generation_under_backpre
/// Both the consumer and the provider must keep it alive: the window is per
/// chunk, not per request, wherever the chunk is produced.
async fn slow_generation_survives_the_window(remote: bool) {
let window = Duration::from_millis(150);
let chunks = 15usize;
// Allow for scheduling and QUIC setup on shared CI runners. The paced
// fixture still takes at least 1.5 inactivity windows to deliver all chunks.
let window = Duration::from_secs(2);
let chunks = 12;
let (provider, _, _) = serving_node(Some(vec!["high".into()])).await;
provider.set_native_stream_idle(window);
let backend = Arc::new(RecordingBackend {
pacing: Some(Pacing::Slow {
every: Duration::from_millis(20),
every: window / 8,
chunks,
}),
..Default::default()
Expand All @@ -752,11 +754,11 @@ async fn slow_generation_survives_the_window(remote: bool) {
.await
.unwrap();
let mut seen = 0usize;
while let Some(chunk) = tokio::time::timeout(Duration::from_secs(5), stream.next_chunk())
while let Some(chunk) = tokio::time::timeout(Duration::from_secs(30), stream.next_chunk())
.await
.unwrap_or_else(|error| panic!("slow stream stalled (remote={remote}): {error}"))
{
chunk.unwrap();
chunk.unwrap_or_else(|error| panic!("slow stream failed (remote={remote}): {error:#}"));
seen += 1;
}
let elapsed = started.elapsed();
Expand Down
2 changes: 1 addition & 1 deletion skippy/crates/skippy-api/src/split-certified.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"native_recipe": {
"llama_upstream_sha": "8954f194837d2ec4d5f67f20c81b84abe63883ba",
"skippy_abi": "0.1.86",
"patch_queue_sha256": "3a02d72808e96026b3b4e3ccbfed64a795681d3d03af7617d668f2aadcf774af"
"patch_queue_sha256": "85a61b8d48b96bdcd030664304197d0e55157200edf49e9c6aa8bcd85cf3254d"
},
"architectures": [
"afmoe",
Expand Down
103 changes: 103 additions & 0 deletions skippy/crates/skippy-cache/src/radix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,35 @@ impl<R, E> UnifiedRadixCache<R, E> {
})
}

/// Evict the least-recently-used unreferenced recurrent entry that is a
/// strict prefix of another recurrent entry in its namespace. A longer
/// entry already continues that conversation, so the shorter one is the
/// cheapest snapshot to lose.
pub fn evict_lru_superseded_recurrent(&mut self) -> Option<RadixEviction<E>> {
let mut victim = None;
for (namespace, root) in &self.roots {
collect_lru_superseded_recurrent(namespace, root, &mut Vec::new(), &mut victim);
}
let victim = victim?;
let value = self.remove_recurrent(&victim.namespace, &victim.tokens)?;
self.recurrent_evictions = self.recurrent_evictions.saturating_add(1);
Some(RadixEviction {
namespace: victim.namespace,
tokens: victim.tokens,
logical_bytes: victim.logical_bytes,
value,
})
}

/// Recurrent entries with no longer recurrent entry below them: the latest
/// continuation of each distinct conversation.
pub fn recurrent_leaf_entries(&self) -> usize {
self.roots
.values()
.map(|root| count_recurrent_leaves(root).0)
.sum()
}

pub fn stats(&self) -> UnifiedRadixCacheStats {
let mut stats = UnifiedRadixCacheStats {
namespaces: self.roots.len(),
Expand Down Expand Up @@ -933,6 +962,59 @@ fn collect_lru_victim<R, E>(
path.truncate(original_len);
}

/// Returns (leaf recurrent entries, whether the subtree holds any recurrent entry).
fn count_recurrent_leaves<R, E>(node: &RadixNode<R, E>) -> (usize, bool) {
let mut leaves = 0;
let mut below = false;
for child in node.children.values() {
let (child_leaves, child_any) = count_recurrent_leaves(child);
leaves += child_leaves;
below |= child_any;
}
let here = node.components.recurrent.is_some();
if here && !below {
leaves += 1;
}
(leaves, here || below)
}

/// Returns whether the subtree holds any recurrent entry.
fn collect_lru_superseded_recurrent<R, E>(
namespace: &str,
node: &RadixNode<R, E>,
path: &mut Vec<i32>,
victim: &mut Option<Victim>,
) -> bool {
let original_len = path.len();
path.extend_from_slice(&node.edge);
let mut below = false;
for child in node.children.values() {
below |= collect_lru_superseded_recurrent(namespace, child, path, victim);
}
let entry = node.components.recurrent.as_ref();
if below && let Some(entry) = entry.filter(|entry| entry.active_refs == 0) {
let replace = victim.as_ref().is_none_or(|current| {
(entry.last_used, namespace, path.as_slice())
< (
current.last_used,
current.namespace.as_str(),
current.tokens.as_slice(),
)
});
if replace {
*victim = Some(Victim {
namespace: namespace.to_string(),
tokens: path.clone(),
logical_bytes: entry.logical_bytes,
last_used: entry.last_used,
retention: 0,
});
}
}
path.truncate(original_len);
below || entry.is_some()
}

fn collect_resident_eviction_candidates<R: Clone, E>(
namespace: &str,
node: &RadixNode<R, E>,
Expand Down Expand Up @@ -1370,6 +1452,27 @@ mod tests {
assert!(cache.release_resident("stage", &[1]));
}

#[test]
fn superseded_recurrent_eviction_keeps_each_conversations_latest_entry() {
let mut cache = UnifiedRadixCache::<(), &str>::new();
cache
.insert_recurrent("stage", &[1, 2], 1, "a-prefill")
.unwrap();
cache
.insert_recurrent("stage", &[7, 8], 1, "b-prefill")
.unwrap();
cache
.insert_recurrent("stage", &[1, 2, 3, 4], 1, "a-decode")
.unwrap();
assert_eq!(cache.recurrent_leaf_entries(), 2);
assert_eq!(
cache.evict_lru_superseded_recurrent().unwrap().value,
"a-prefill"
);
assert!(cache.evict_lru_superseded_recurrent().is_none());
assert_eq!(cache.recurrent_leaf_entries(), 2);
}

#[test]
fn component_eviction_preserves_other_payload_at_same_prefix() {
let mut cache = UnifiedRadixCache::new();
Expand Down
10 changes: 10 additions & 0 deletions skippy/crates/skippy-serving/src/frontend/generation/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,16 @@ pub(in crate::frontend) fn prewarm_generation_sessions(
let timer = PhaseTimer::start();
let mut runtime = lock_runtime(runtime);
let generation_graph_warmed = runtime.warmup_generation_graph()?;
// The one-token warmup above does not reserve the graphs real traffic
// uses: the first full prefill ubatch and the first concurrent decode
// wave each grow the reservation mid-request. Warm the serving shapes
// now so no request pays the graph growth.
let warmup_prefill_tokens = config
.n_ubatch
.or(config.n_batch)
.unwrap_or(512)
.min(config.ctx_size.saturating_sub(64)) as usize;
runtime.warmup_serving_shapes(warmup_prefill_tokens)?;
let sessions = runtime.prewarm_idle_sessions(generation_concurrency)?;
let mut attrs = lifecycle_attrs(config);
attrs.insert(
Expand Down
82 changes: 43 additions & 39 deletions skippy/crates/skippy-serving/src/frontend/tests/generation.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use super::*;
use crate::frontend::generation::run_blocking_generation_worker;
use skippy_inference_api::chat::ChatCompletionRequest;
use std::sync::atomic::AtomicBool;

fn assert_generation_rate_limit(error: InferenceError, message_fragment: &str) {
assert_eq!(error.status(), StatusCode::TOO_MANY_REQUESTS);
Expand Down Expand Up @@ -203,65 +202,70 @@ fn queued_arrival_cannot_be_overtaken_when_a_lane_opens() {

#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn cancelled_worker_stops_before_the_next_request_acquires_the_only_lane() {
use tokio::sync::oneshot;

struct CancelOnDrop(InferenceRequestContext);
impl Drop for CancelOnDrop {
fn drop(&mut self) {
self.0.cancel();
}
}

let wait = Duration::from_secs(30);
let generation_limit = Arc::new(Semaphore::new(1));
let queue_depth = Arc::new(AtomicUsize::new(0));
let first_permit = acquire_generation_permit_with_queue(
generation_limit.clone(),
queue_depth.clone(),
1,
Duration::from_secs(1),
wait,
)
.await
.unwrap();
let first_context = InferenceRequestContext::new();
let worker_started = Arc::new(AtomicBool::new(false));
let worker_stopped = Arc::new(AtomicBool::new(false));
let started = worker_started.clone();
let stopped = worker_stopped.clone();
let first_context = CancelOnDrop(InferenceRequestContext::new());
let (started, worker_started) = oneshot::channel();
let (cancelled, worker_cancelled) = oneshot::channel();
let (finish, worker_finish) = oneshot::channel();
let first_worker = tokio::spawn(run_blocking_generation_worker(
first_permit,
first_context.clone(),
first_context.0.clone(),
move |cancellation| {
started.store(true, Ordering::Release);
while !cancellation.is_cancelled() {
std::thread::sleep(Duration::from_millis(1));
}
stopped.store(true, Ordering::Release);
tokio::runtime::Handle::current().block_on(async move {
let _ = started.send(());
// A failed assertion must not strand a blocking worker at runtime shutdown.
tokio::time::timeout(wait, async {
cancellation.cancelled().await;
let _ = cancelled.send(());
let _ = worker_finish.await;
})
.await
.expect("worker must receive cancellation and permission to finish");
});
},
));

tokio::time::timeout(Duration::from_millis(100), async {
while !worker_started.load(Ordering::Acquire) {
tokio::task::yield_now().await;
}
})
.await
.expect("first generation worker started");

let second_limit = generation_limit.clone();
let second_queue_depth = queue_depth.clone();
let second = tokio::spawn(async move {
let permit = acquire_generation_permit_with_queue(
second_limit,
second_queue_depth,
1,
Duration::from_secs(1),
)
tokio::time::timeout(wait, worker_started)
.await
.expect("first generation worker started")
.unwrap();
assert!(
worker_stopped.load(Ordering::Acquire),
"the first worker must stop before its permit is released"
);
drop(permit);
});
let second =
acquire_generation_permit_with_queue(generation_limit.clone(), queue_depth, 1, wait);
tokio::pin!(second);
assert!(futures_util::poll!(second.as_mut()).is_pending());

first_context.cancel();
tokio::time::timeout(Duration::from_millis(200), second)
first_context.0.cancel();
tokio::time::timeout(wait, worker_cancelled)
.await
.expect("second request acquired the lane promptly")
.expect("first worker observed cancellation")
.unwrap();
assert!(
futures_util::poll!(second.as_mut()).is_pending(),
"the first worker must retain its permit while unwinding"
);
finish.send(()).unwrap();
let second_permit = second.await.expect("second request acquired the lane");
first_worker.await.unwrap().unwrap();
drop(second_permit);
assert_eq!(generation_limit.available_permits(), 1);
}

Expand Down
Loading
Loading