vllm-hust-clm-lifecycle
CLM: Context Lifecycle Management perception plugin for vLLM-HUST.
Consumes the scheduler-level request lifecycle events exposed by the host
(RequestFinished / RequestPreempted, contract vllm.request-lifecycle.v1)
and reports session-level KV growth to an out-of-tree CLM controller, which
decides when to compact a long conversation.
Bundle ID: org.vllm-hust.clm-lifecycle (Extension Bundle v1, schema 1.0)
What it does
- Lifecycle-sink component (contract
vllm.request-lifecycle.v1, execution planescheduler): registers a sink on the engine's default-off typedEventBus. When a request finishes or is preempted, the sink attributes the KV footprint to a session (engine-sidesession_id, or a__default__bucket) and reports growth to a controller endpoint. - Default-off, zero-overhead when absent: the events only exist on hosts
that carry the request-lifecycle hook; without them
register()skips gracefully. Reports never block serving (failures are swallowed).
Install
pip install vllm-hust-clm-lifecycle
Enable
Requires a host that exposes vllm.v1.events (vllm-hust with the
request-lifecycle hook). Enable via plugin loading:
# runtime registration (vllm.general_plugins)
export VLLM_PLUGINS=ascend,clm_lifecycle
# observation / static discovery (vllm.extension_bundles)
vllm-hust-ext extension inspect org.vllm-hust.clm-lifecycle
Environment
| Variable | Default | Meaning |
|---|---|---|
VLLM_CLM_CONTROLLER |
(empty) | HTTP endpoint receiving JSON reports ({"session_id","event","kv_blocks","total_tokens"}). Empty = observation-only (no reports sent). |
VLLM_CLM_REPORT_BLOCKS |
128 |
KV-block accumulation threshold per session before a report fires. |
VLLM_CLM_REPORT_INTERVAL |
5.0 |
Minimum seconds between two reports of the same session. |
Parse failures on these variables fall back to defaults (empty values are tolerated).
Disable
unset VLLM_CLM_CONTROLLER VLLM_CLM_REPORT_BLOCKS VLLM_CLM_REPORT_INTERVAL
# or simply do not list clm_lifecycle in VLLM_PLUGINS
pip uninstall vllm-hust-clm-lifecycle
Development
pip install -e ".[test]"
python -m pytest tests/
ruff check .
tests/conftest.py stubs vllm.v1.events before the plugin is imported, so
the test suite runs without a vLLM install.
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vllm_hust_clm_lifecycle-0.1.0.tar.gz.
File metadata
- Download URL: vllm_hust_clm_lifecycle-0.1.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
537513718d015b5f8eabffc05d51d1b9507433446a8eaa623fc0bc10436c9c83
|
|
| MD5 |
80e5466da4f1c360192041f6fb36dd07
|
|
| BLAKE2b-256 |
51870c659277641c52b260a55e023edcde64f9e6a75824ae33bedffdaa44ea84
|
File details
Details for the file vllm_hust_clm_lifecycle-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vllm_hust_clm_lifecycle-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c2642cd1e2be37da081b4e204f8073a8294dad0acb848a06f8881e3b8bfba91
|
|
| MD5 |
30537bde79c62cc31694fcc3bd4bd5f7
|
|
| BLAKE2b-256 |
99930f1dde956504d3c8a4510a997ba98be8a2fccfd945bbabdac932406336ac
|