Skip to content

add prefix warmup to prime cache before server startup - #9

Merged
Tushar-ml merged 4 commits into
feat/add-flash-attn-gemma4from
feat/add-prefix-warmup
Jun 3, 2026
Merged

add prefix warmup to prime cache before server startup#9
Tushar-ml merged 4 commits into
feat/add-flash-attn-gemma4from
feat/add-prefix-warmup

Conversation

@lawjarp-simplismart

Copy link
Copy Markdown
Collaborator

Adds --prefix-warmup-file: runs chat warmup requests through the engine before
/health is exposed, to prime the prefix/KV cache and absorb one-time JIT/CUDA-graph
costs (pod warmup). Warmup goes through the normal chat path (template/tokenization match
real traffic). Fatal on failure.

Test Plan

gemma-4-31B-FP8, 100 cold-start requests, 10k input (7k shared prefix) / 50 output, with
vs without --prefix-warmup-file.

Test Result

Metric No warmup Warmup
P99 TTFT 8.56 s 0.33 s (−96%)
P99 e2e 8.87 s 0.77 s (−91%)
P50 (steady) unchanged unchanged
Startup → /health 424 s 412 s (warmup ~16s, within noise)

Warmup runs before /health (verified in logs); steady-state unchanged; startup tail removed.

@Tushar-ml
Tushar-ml marked this pull request as ready for review June 3, 2026 12:18
@Tushar-ml
Tushar-ml merged commit c58ab58 into feat/add-flash-attn-gemma4 Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants