The steps to install LMCache are as follows:
- Preparing the environment: Ensure the system is Linux, Python ≥ 3.10, CUDA ≥ 12.1, and Conda is recommended to create a virtual environment.
- clone warehouse: Clone the official LMCache repository via Git.
- Installing LMCache: Stable or pre-release versions can be installed via PyPI, or from source.
- Installing vLLM: LMCache needs to be used with vLLM, and vLLM needs to be installed separately.
To verify the installation, execute the following Python code to check the version number:
import lmcache
from importlib.metadata import version
print(version("lmcache"))
If the version number is output (e.g. 0.2.2.dev57), the installation is successful. In addition, LMCache provides Docker images that can be pulled and deployed directly.
This answer comes from the articleLMCache: A Key-Value Cache Optimization Tool for Accelerating Reasoning on Large Language ModelsThe