chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:24:33 +08:00
commit f213ec8976
2101 changed files with 494002 additions and 0 deletions
@@ -0,0 +1,32 @@
.. _cachegen:
CacheGen
===================
.. warning::
This page documents the behavior of LMCache's in-process mode (deprecated). Please consider using :doc:`LMCache MP mode </mp/index>` for better feature support and performance. For the MP mode equivalent of this page, see :doc:`/mp/cachegen`.
Cachegen leverages KV cache's distributional properties to encode a KV cache into more compact bitstream representations with negligible decoding overhead.
Configuring CacheGen in LMCache
---------------------------------------
The settings should be very similar to :ref:`naive KV cache sharing <share_kv_cache>`.
Only minor configurations need to be done to enable CacheGen.
To enable CacheGen in offline inference, we need to set:
.. code-block:: python
# Enable cachgen compression in LMCache
os.environ["LMCACHE_REMOTE_SERDE"] = "cachegen"
To enable CacheGen in online inference, we need to set the ``remote_serde`` in the configuration yaml:
.. code-block:: yaml
# Enable cachgen compression in LMCache
remote_serde: "cachegen"
@@ -0,0 +1,13 @@
Compression
===========
KV cache compression can greatly reduces the size of the cache, which can be beneficial for both storage/memory usage and loading speed.
Currently, we support the following compression algorithms:
- :ref:`CacheGen <cachegen>`: `CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving <https://dl.acm.org/doi/10.1145/3651890.3672274>`_
.. toctree::
:maxdepth: 1
cachegen