SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.18999 · 2026

Randomization Boosts KV Caching, Learning Balances Query Load: A Joint Perspective

Richard Zhang, Sandeep Silwal, Fangzhou Wu, Prefix Match

arXiv · PDF · Open in the Atlas

Code that ran

15 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 13 failures of our instrument; 5 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2601.18999.json · badge: /api/ran/2601.18999.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
fzwark/KVRouting canonical (classifier label)
classifier basis: census
15 ran · 5 no recorded run
FunctionStatusWhere it lives
benchmark_sequential_vs_batch Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/benchmark_batch/benchmark_tokenizer.py
pointer only (licence: NONE) · get_code("64f004b9216b7322")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_event_triple_prompt Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/generative_agents/agent_functions.py
pointer only (licence: NONE) · get_code("83900d0c3ab83065")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_pronunciatio_prompt Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/generative_agents/agent_functions.py
pointer only (licence: NONE) · get_code("577ff88cf5082d20")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_random_prompt Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/benchmark_batch/benchmark_batch.py
pointer only (licence: NONE) · get_code("9afb749e3f5b90cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_random_prompts Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/benchmark_batch/benchmark_tokenizer.py
pointer only (licence: NONE) · get_code("5139455c0f07d032")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_unique_prefix Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/bench_in_batch_prefix/bench_in_batch_prefix.py
pointer only (licence: NONE) · get_code("19faa93c902e1c91")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_answer_value Ran
ran, honoured the contract we drafted
fzwark/KVRouting/sglang-0.4.6/benchmark/gsm8k/bench_other.py
pointer only (licence: NONE) · get_code("4c13c3bdb761b46c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_few_shot_examples Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/gsm8k/bench_other.py
pointer only (licence: NONE) · get_code("9e0d3df1a2d9a123")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_one_example Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/gsm8k/bench_other.py
pointer only (licence: NONE) · get_code("2e994f473fac61f9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

linearize_groups Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/long.py
pointer only (licence: NONE) · get_code("cfc65b69a3b0312f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_loogle_shared_groups Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/long.py
pointer only (licence: NONE) · get_code("8ed03cefbc15ee2d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

poignancy_event_prompt Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/generative_agents/agent_functions.py
pointer only (licence: NONE) · get_code("e4b32a865322152c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

remove_prefix Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/multi-turn.py
pointer only (licence: NONE) · get_code("3e1789fce8e33aeb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

send_batch_request Ran
ran; our contract draft was wrong, not the code
fzwark/KVRouting/sglang-0.4.6/benchmark/benchmark_batch/benchmark_batch.py
pointer only (licence: NONE) · get_code("5bc9a6f07218ab7b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

send_sglang_generate Ran
ran on a synthesized input
fzwark/KVRouting/long.py
pointer only (licence: NONE) · get_code("fb49aa7bab3d3faf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

force_len_tokens Not yet run
unverified (harvested, no recorded run)
fzwark/KVRouting/multi-turn.py
pointer only (licence: NONE) · get_code("515f4c8a6cb6c34a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

generate_random_string Not yet run
unverified (harvested, no recorded run)
fzwark/KVRouting/sglang-0.4.6/benchmark/bench_in_batch_prefix/bench_in_batch_prefix.py
pointer only (licence: NONE) · get_code("70f1d10961d52f6d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_tokenizer Not yet run
unverified (harvested, no recorded run)
fzwark/KVRouting/multi-turn.py
pointer only (licence: NONE) · get_code("c394a8da9a5a21e3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

prepare_all_prompts Not yet run
unverified (harvested, no recorded run)
fzwark/KVRouting/sglang-0.4.6/benchmark/benchmark_batch/benchmark_batch.py
pointer only (licence: NONE) · get_code("60d747ff8e6ab539")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

prepare_prompts Not yet run
unverified (harvested, no recorded run)
fzwark/KVRouting/sglang-0.4.6/benchmark/bench_in_batch_prefix/bench_in_batch_prefix.py
pointer only (licence: NONE) · get_code("e5914c7114b177c6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fzwark/KVRouting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 14 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 14 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_answer_value 3 other papers
1 dated earlier, 2 later
2312.07104 (2023-12)
SGLang: Efficient Execution of Structured Language Model Programs
2602.10718 (2026-02)
SnapMLA: Efficient Long-Context MLA Decoding via Hardware-Aware FP8 Quantized Pipelining
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
get_one_example 3 other papers
2 dated earlier, 1 later
2312.07104 (2023-12)
SGLang: Efficient Execution of Structured Language Model Programs
2406.18665 (2024-06)
RouteLLM: Learning to Route LLMs with Preference Data
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
benchmark_sequential_vs_batch 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
generate_event_triple_prompt 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
generate_pronunciatio_prompt 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
generate_random_prompt 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
generate_random_prompts 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
generate_random_string 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
generate_unique_prefix 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
get_few_shot_examples 2 other papers
1 dated earlier, 1 later
2312.07104 (2023-12)
SGLang: Efficient Execution of Structured Language Model Programs
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
poignancy_event_prompt 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
prepare_all_prompts 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
prepare_prompts 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning
send_batch_request 2 other papers
2 later
2602.11683 (2026-02)
THINKROUTER: Efficient Reasoning via Routing Thinking between Latent and Discrete Spaces
2604.27998 (2026-04)
Latent-GRPO: Group Relative Policy Optimization for Latent Reasoning

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

KV caching is a fundamental technique for accelerating Large Language Model (LLM) inference by reusing key-value (KV) pairs from previous queries, but its effectiveness under limited memory is highly sensitive to the eviction policy. The default Least Recently Used (LRU) eviction algorithm struggles with dynamic online query arrivals, especially in multi-LLM serving scenarios, where balancing query load across workers and maximizing cache hit rate of each worker are inherently conflicting objectives. We give the first unified mathematical model that captures the core trade-offs between KV cache eviction and query routing. Our analysis reveals the theoretical limitations of existing methods and leads to principled algorithms that integrate provably competitive randomized KV cache eviction with learning-based methods to adaptively route queries with evolving patterns, thus balancing query load and cache hit rate. Our theoretical results are validated by extensive experiments across 4 benchmarks and 3 prefix-sharing settings, demonstrating improvements of up to 6.92× in cache hit rate, 11.96× reduction in latency, 14.06× reduction in time-to-first-token (TTFT), and 77.4% increase in throughput over the state-of-the-art methods. Our code is available at https://github.com/fzwark/KVRouting.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2601.18999")
get_code_for_paper("2601.18999")
have("2601.18999")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2601.18999.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2601.18999.svg)](https://syntology.ai/paper/2601.18999)

Connect an agent — have() is free.