Adds a vllm.io_processor_plugins entry point (bge_m3_sparse_plugin) that serves learned sparse vectors of BAAI/bge-m3 over POST /pooling, on top of the BgeM3EmbeddingModel architecture that already ships with vLLM. - plugin/: python package, sparse (token_classify) and dense (embed) modes, batch support, per-request weight threshold - entrypoint.sh: pip install the plugin from a read-only mount at container start - docker-compose.yml: stack ready for Portainer (git repository deployment) Verified against vLLM 0.30.0 on an RTX 5070: single/batch/parallel requests, validation errors, and weights matching the FlagEmbedding reference formula.
16 lines
530 B
Python
16 lines
530 B
Python
"""IO processor plugin that serves BAAI/bge-m3 sparse (learned sparse) vectors.
|
|
|
|
Registered under the ``vllm.io_processor_plugins`` entry point group; the entry
|
|
point value is the fully qualified name of the IOProcessor class, so vLLM can
|
|
import it lazily without pulling vllm into this package's import path.
|
|
"""
|
|
|
|
__all__ = ["register"]
|
|
|
|
__version__ = "0.1.0"
|
|
|
|
|
|
def register() -> str:
|
|
# resolved by vllm.utils.import_utils.resolve_obj_by_qualname -> dotted path
|
|
return "bge_m3_sparse.io_processor.BgeM3SparseIOProcessor"
|