AI Developer Tools
PSI KV Governor
A reference implementation using Linux Pressure Stall Information to trim LLM KV cache under memory pressure.
PSI KV Governor
What is PSI KV Governor?
PSI KV Governor is a small reference implementation that leverages Linux Pressure Stall Information (PSI) to automatically trim the key-value (KV) cache of large language models when the system is under memory pressure, helping to prevent out-of-memory issues and improve stability during LLM inference on Linux systems.
PSI KV Governor vs Similar AI Tools
| Pricing Model | Free | Free | Custom Pricing | Free, Paid |
| Free Credits | ||||
| Key Features |
|
|
|
|
| Pros |
|
|
|
|
| Cons |
|
|
|
|
| Best For |
|
|
|
|
How to use PSI KV Governor?
- 1Check PSI availability: cat /proc/pressure/memory
- 2Run reference simulator: PYTHONPATH=src python -m psi_kv_governor.cli simulate
- 3Build llama.cpp runner: scripts/build_llama_runner.sh
- 4Download demo model: python scripts/download_demo_model.py
- 5Run PSI benchmark: PYTHONPATH=src python benchmarks/pressure_bench.py [options]
PSI KV Governor Key Features
- PSI-based KV cache trimming
- Reference implementation for LLM inference
- Integration with llama.cpp
- Benchmark scripts for evaluating performance
- Configurable trimming parameters
PSI KV Governor Use Cases
- Preventing out-of-memory errors during LLM inference on Linux
- Optimizing memory usage for serving LLMs on constrained systems
- Testing PSI-aware cache management strategies
PSI KV Governor Pricing & Free Credits
PSI KV Governor currently operates on a Free model.
This tool is completely free to use
PSI KV Governor Pros & Cons
Pros
- Leverages Linux kernel PSI for accurate memory pressure detection
- Lightweight and easy to integrate with existing LLM runtimes
- Open-source and customizable
Cons
- Linux-only due to PSI dependency
- Experimental, not production-ready
- Limited documentation and examples
What is PSI KV Governor best for?
- Developers optimizing LLM inference on Linux
- Users of llama.cpp on memory-constrained systems
- Researchers exploring memory-efficient LLM serving