Registration options
There are two ways to register a model with vLLM:- Built-in models: Add your model directly to the vLLM library
- Out-of-tree models: Load an external model using a plugin
Built-in models
To add a model directly to the vLLM library:Fork and build vLLM
Start by forking the GitHub repository and then build it from source.This gives you the ability to modify the codebase and test your model.
Implement your model
After implementing your model (see adding models guide), place it in the
vllm/model_executor/models directory.Register in model registry
Add your model class to
_VLLM_MODELS in vllm/model_executor/models/registry.py so that it is automatically registered upon importing vLLM:vllm/model_executor/models/registry.py
Update documentation
Update the list of supported models to promote your model.
The list of models in each section should be maintained in alphabetical order.
Out-of-tree models
You can load an external model using a plugin without modifying the vLLM codebase. This is useful for:- Proprietary models that cannot be open-sourced
- Experimental models still under development
- Custom modifications to existing models
Creating a plugin
Multimodal models
If your model is a multimodal model, ensure the model class implements theSupportsMultiModal interface:
Plugin system details
vLLM’s plugin system uses the standard Pythonentry_points mechanism. Every plugin has three parts:
- Plugin group: The name of the entry point group (e.g.,
vllm.general_plugins) - Plugin name: The name of the plugin (e.g.,
register_my_model) - Plugin value: The fully qualified name of the function or module to register
Example: Complete plugin
Here’s a complete example of a plugin that registers a custom model:Next steps
Testing guide
Write tests to verify your model
Plugin system
Learn more about the plugin system