PrefixAnvil

Prefix/KV-cache fragmentation detector & normalizer for agent LLM traffic — running the published prefixanvil analyze in your browser.

PrefixAnvil canonicalizes agent prompts so a self-hosted engine can actually reuse its KV cache. On a 377-request synthetic agent trace, token-weighted prefix-cache hit rate rose 74.71% → 81.79% (L1) and recomputed prefill tokens fell −28.7% (−35.8% with the L2 relocation); with NVIDIA Dynamo KV routing on 2 × T4 the worker-summed hit rate went 60.2% → 65.2% with L1. L1/L2 are deterministic, meaning-preserving prompt transforms (equivalence checked by a CI suite); generated text is not guaranteed byte-identical.

Measured on 2 × Tesla T4 (Kaggle free tier), Qwen2.5-7B-Instruct-AWQ, vLLM 0.33.0 — these are T4 reference values, not H100-class. Hit rate and prefill-token counts are determined by the cache algorithm and are GPU-independent; any TTFT / GPU-seconds are T4 reference only.  ·  Code: github.com/NagaYu/prefixanvil

Analyze a trace

Loading runtime (Pyodide + tokenizer)… first load fetches ~15 MB from CDNs and the Hub.

The interactive report runs the Phase-1 prefixanvil analyze simulator (a spec-based approximation of vLLM V1 prefix caching, no server-side vLLM normalization), so its figures are the analyzer's numbers — byte-for-byte what the local CLI produces on the same trace and tokenizer (verified by the Space's parity gate). They differ slightly from the measured GPU headline above, which used vLLM rendering on real T4s. Nothing is precomputed: every request is tokenized and simulated here, in your browser. Your trace never leaves the page.