You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a way to clear the whole prompt cache (slots + host RAM)
#30746
I found that with the default settings, erasing all slots does not clear the host RAM cache. The next request loads the prompt back from it.
I want to clear the whole prompt cache of the server between benchmark runs, so that a run does not hit the cache of the previous run. Right now, the only ways to do this are: (1) restart the server, or (2) use --cache-ram 0 and erase all slots.
Both have a problem. With (1), the server reloads the model on every restart, so the runs take longer. With (2), I can only measure with the host RAM cache turned off, but it is on by default. So I measure a setup that is different from what users normally run.
vLLM (/reset_prefix_cache) and SGLang (/flush_cache) have an endpoint to clear the cache, and their benchmark tools use it between runs.
So I propose one of these: (a) a new endpoint, or (b) an option for the existing erase action that also clears the host RAM cache.
My measurements:
Version: 0.7.0-dev (build 11716, commit 797de63b2), official Windows CPU build
Model: Qwen/Qwen3-0.6B-GGUF, Q8_0
Server: llama-server -m Qwen3-0.6B-Q8_0.gguf -c 8192 --slot-save-path ./slots
P, Q: two different prompts, about 1,300 tokens each
Steps: P -> Q -> erase all slots (POST /slots/{id}?action=erase) -> P
timings.cache_n of the last P (prompt = 1318 tokens):
server options
cache_n
(default)
1317
--parallel 2
1317
--cache-ram 0
0
--parallel 2 --cache-ram 0
0
Without Q in between (P -> erase all slots -> P), cache_n = 0 in all four cases.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I found that with the default settings, erasing all slots does not clear the host RAM cache. The next request loads the prompt back from it.
I want to clear the whole prompt cache of the server between benchmark runs, so that a run does not hit the cache of the previous run. Right now, the only ways to do this are: (1) restart the server, or (2) use
--cache-ram 0and erase all slots.Both have a problem. With (1), the server reloads the model on every restart, so the runs take longer. With (2), I can only measure with the host RAM cache turned off, but it is on by default. So I measure a setup that is different from what users normally run.
vLLM (
/reset_prefix_cache) and SGLang (/flush_cache) have an endpoint to clear the cache, and their benchmark tools use it between runs.So I propose one of these: (a) a new endpoint, or (b) an option for the existing erase action that also clears the host RAM cache.
My measurements:
timings.cache_nof the last P (prompt = 1318 tokens):--parallel 2--cache-ram 0--parallel 2 --cache-ram 0Without Q in between (P -> erase all slots -> P),
cache_n= 0 in all four cases.All reactions