vLLM Beam Search Plugin
MRV2 beam-search scheduler and sampler plugin for vLLM V1.
This package provides:
vllm_beam_search.scheduler.BeamSearchScheduler- plugin-local sequence, token, and KV admission for complete beam groups
- an MRV2 custom sampler wrapper installed through a plugin-local
ModelStatehook - plugin-local runtime hooks for MRV2 worker history rewrites
The current production path targets MRV2 generate models with async scheduling.
The sampler hook is model-state generic; BART-family models still need the
companion vllm-bart-plugin for encoder-decoder model support.
The plugin does not require a vLLM fork or source patch. It carries explicit
plugin-local scheduler implementations for vLLM 0.24.0, 0.26.0, the tested
0.26.1 development build, 0.28.0, and 0.31.0. Startup fails closed on an
unsupported scheduler.
Each vendored scheduler has an adjacent .diff recording its exact changes
from the hashed upstream Scheduler.schedule; the test suite verifies both.
The Git repository, installable Python distribution, and PyPI project are named
vllm-beam-search-plugin; the import package is vllm_beam_search.
For BART-family encoder-decoder serving, see
BART_BEAM_SEARCH.md.
Install
Install the published distribution from PyPI with an exact version pin:
uv pip install 'vllm-beam-search-plugin==0.1.5'
The plugin metadata constrains its tested NumPy, PyTorch, and Triton API ranges. vLLM remains the owner of their accelerator-specific builds. In a prebuilt RHAII 3.5 image, preserve the image runtime and install only the pure-Python plugin:
uv pip install --no-deps \
'vllm-beam-search-plugin==0.1.5'
The vLLM 0.24.0 and 0.28.0 paths have been unit-, correctness-, concurrency-,
and sustained-memory-tested. The vLLM 0.31.0 path has been unit-, correctness-,
and concurrency-tested with decoder-only models. Each selects its explicit
vendored scheduler directly; the plugin does not use inspect.getsource,
source-text matching, or runtime exec.
For stress tooling:
uv pip install 'vllm-beam-search-plugin[stress]==0.1.5'
Server
MODEL=${MODEL:-meta-llama/Meta-Llama-3-8B-Instruct}
SERVED_MODEL=${SERVED_MODEL:-llama3-8b}
CUDA_VISIBLE_DEVICES=0 \
VLLM_USE_FLASHINFER_SAMPLER=0 \
vllm serve "${MODEL}" \
--served-model-name "${SERVED_MODEL}" \
--dtype bfloat16 \
--port 8005 \
--scheduler-cls vllm_beam_search.scheduler.BeamSearchScheduler
Request Shape
{
"model": "llama3-8b",
"prompt": "Write a concise summary of why beam search is useful:",
"max_tokens": 128,
"temperature": 0,
"add_special_tokens": false,
"vllm_xargs": {
"beam_width": 4,
"no_repeat_ngram_size": 3
}
}
Validation
Run unit tests:
uv run --with pytest python -m pytest tests -q
Run sustained stress plus memory sampling against a running server:
vllm-beam-stress \
--base-url http://localhost:8005 \
--model llama3-8b \
--rounds 100 \
--requests-per-round 32 \
--concurrency 64 \
--abort-rounds 3
The stress tool writes CSV samples with request count, RSS, and GPU memory.
Runtime Knobs
VLLM_BEAM_GROUP_STATE_CAPACITYcontrols GPU beam-state pool capacity.VLLM_BEAM_TRANSITION_BUFFER_SLOTScontrols async transition buffer slots.
Metadata
Release files for vllm-beam-search-plugin 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vllm_beam_search_plugin-0.1.5.tar.gz | 91.6 kB | Without provenance | Details for vllm_beam_search_plugin-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vllm_beam_search_plugin-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for vllm_beam_search_plugin-0.1.5-py3-none-any.whl |
Total release size: 180.6 kB
Release files / vllm_beam_search_plugin-0.1.5.tar.gz
| Download URL | vllm_beam_search_plugin-0.1.5.tar.gz |
|---|---|
| Size | 91.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4bfef999e151f7d751fd5d7b5e7fae5ff4a7883eb4925a12bd0ffc895e81c51
|
|
BLAKE2b-256 checksum How to use checksums |
8ebf6a305ce4965db9a5e92ac7fbe6f7c92325ba23c9b4094fe4056799856088
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vllm_beam_search_plugin-0.1.5-py3-none-any.whl
| Download URL | vllm_beam_search_plugin-0.1.5-py3-none-any.whl |
|---|---|
| Size | 89.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
125ac2bef08f990932796b53cf39aa70215c2dfd7586ee0e1b372375e7c59708
|
|
BLAKE2b-256 checksum How to use checksums |
cb50a3b052b46554b0c7028f5584e4387c2b018688cac5486e096928fee024f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for vllm-beam-search-plugin 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.