vllm.v1.worker.gpu.sample.logits_processor.loader
¶
Loading of custom logits processor classes for the V2 model runner.
This module is deliberately import-light: the frontend process uses it to
validate per-request params, so importing it must not pull in model-runner
side modules (torch, triton, worker state). Imports needed to instantiate
processors are deferred to build_custom_logits_processors.
Functions:
-
build_custom_logits_processors–Load and instantiate custom logits processors, entrypoint plugins first.
-
build_custom_logits_processors_params_validator–Load custom processor classes once and return a params validator.
_load_v2_logitsprocs(logits_processors)
¶
Load all custom logits processors for the V2 model runner.
Combines installed plugins (validated as V2 processors) with the user-specified list of processor types and FQCN strings.
_load_v2_logitsprocs_by_fqcns(logits_processors)
¶
Resolve a mixed list of processor types and FQCN strings into types.
FQCN syntax is
_load_v2_logitsprocs_plugins()
¶
Load installed logits processor plugins.
Plugins registered under LOGITSPROCS_GROUP ship V1-interface
processors today; those crash under the V2 sampler, so reject them at
load time.
build_custom_logits_processors(vllm_config, req_states, is_pooling_model, custom_logitsprocs=())
¶
Load and instantiate custom logits processors, entrypoint plugins first.
Raises:
-
ValueError–if a pooling model specifies custom processors, or a loaded class does not implement the V2 interface.
-
RuntimeError–if an FQCN fails to import.
build_custom_logits_processors_params_validator(custom_logitsprocs)
¶
Load custom processor classes once and return a params validator.
Called from the frontend at startup. The returned callable runs each
processor's validate_params at request admission.
Raises:
-
ValueError–if a loaded class does not implement the V2 interface.
-
RuntimeError–if an FQCN fails to import.