lmcache tool#
The lmcache tool command groups offline analysis utilities bundled with
LMCache.
lmcache tool <tool-name> <action> [options]
Currently one tool is available: cache-simulator.
Note
cache-simulator depends on the optional plot extras
(sortedcontainers / matplotlib). If they are not installed, the
sub-command is silently omitted from the CLI. Install the extras to enable
it.
cache-simulator#
Replay LMCache lookup-hash JSONL logs through an LRU cache to measure the KV-cache token hit rate. It has three actions:
lmcache tool cache-simulator {simulate,sweep,gen-dataset} [options]
Action |
Description |
|---|---|
|
Replay logs at a fixed cache capacity; print a text report and save a 7-panel statistics PNG. |
|
Sweep across a range of cache capacities and save a hit-rate vs. capacity PNG. |
|
Generate a |
Each action has its own flags. Run the built-in help for the full list:
lmcache tool cache-simulator simulate --help
lmcache tool cache-simulator sweep --help
lmcache tool cache-simulator gen-dataset --help