**vLLM's source is not modified.** No file in the vLLM tree or in
`site-packages/vllm` is edited; the checkout is clean upstream (0 commits ahead,
0 uncommitted) and the installed wheel is stock `0.28.0+cpu`. There is no patch
series to apply and no vLLM fork to maintain — `pip install vllm==0.28.0+cpu`
gives you exactly upstream, and this package changes its behaviour at import.
### The three CPU monkey-patches
| patch | what it changes | why it is a patch and not a hook |
|---|---|---|
| `_patch_cpu_aot_compile_cache_load` | vLLM's CPU path fails to load its own AOT artifact (`finalize_loading` missing on a plain function), treats it as a miss, and recompiles on every start | replaces `torch.compiler.load_compiled_function`; torch offers no hook |
| `_patch_cpu_explicit_kv_cache_memory` | `CpuPlatform.check_and_update_config` overwrites `kv_cache_memory_bytes` from `VLLM_CPU_KVCACHE_SPACE` unconditionally, so a per-stage budget had no effect — this is what made "KV sizing is not a memory lever" look true | wraps a classmethod on a platform class |
| `_patch_cpu_release_memory_after_load` | returns freed allocator arenas to the OS after weight load | wraps `CPUWorker.load_model` and `compile_or_warm_up_model` |
They are guarded with `getattr`, made idempotent by a marker attribute, and
gated on `current_platform.is_cpu()`. They are **not** covered by any stability
contract: each is keyed to a specific method on a specific vLLM class, and an
upstream rename or behaviour change can break them or silently turn them into
no-op wrappers. Two of the three exist to work around upstream bugs and should
disappear when those are fixed.
### The genuine extension points
These are registries vLLM publishes, and they are stable across upgrades in a