Each model can override parts of Aphrodite's input processing pipeline via INPUT_REGISTRY
and MULTIMODAL_REGISTRY
.
Currently, this mechanism is only utilized in multi-modal models for preprocessing multi-modal input data in addition to input prompt, but it can be extended to text-only language models when needed.
AphroditeEngine
(or AsyncAphrodite
for asynchronous inference).INPUT_REGISTRY.process_input
.ExecutorBase
.WorkerBase
to ModelRunnerBase
.MULTIMODAL_REGISTRY.map_input
.PIL.Image.Image
input to its pixel values for a vision model.