Supported Models#
vLLM supports a variety of generative Transformer models in HuggingFace Transformers. The following is the list of model architectures that are currently supported by vLLM. Alongside each architecture, we include some popular models that use it.
Decoder-only Language Models#
Architecture |
Models |
Example HuggingFace Models |
|
---|---|---|---|
|
Aquila & Aquila2 |
|
✅︎ |
|
Arctic |
|
|
|
Baichuan & Baichuan2 |
|
✅︎ |
|
BLOOM, BLOOMZ, BLOOMChat |
|
|
|
ChatGLM |
|
✅︎ |
|
Command-R |
|
|
|
DBRX |
|
|
|
DeciLM |
|
|
|
EXAONE-3 |
|
✅︎ |
|
Falcon |
|
|
|
Gemma |
|
✅︎ |
|
Gemma2 |
|
✅︎ |
|
GPT-2 |
|
|
|
StarCoder, SantaCoder, WizardCoder |
|
✅︎ |
|
GPT-J |
|
|
|
GPT-NeoX, Pythia, OpenAssistant, Dolly V2, StableLM |
|
|
|
InternLM |
|
✅︎ |
|
InternLM2 |
|
|
|
Jais |
|
|
|
Jamba |
|
✅︎ |
|
Llama 3.1, Llama 3, Llama 2, LLaMA, Yi |
|
✅︎ |
|
MiniCPM |
|
|
|
MiniCPM3 |
|
|
|
Mistral, Mistral-Instruct |
|
✅︎ |
|
Mixtral-8x7B, Mixtral-8x7B-Instruct |
|
✅︎ |
|
MPT, MPT-Instruct, MPT-Chat, MPT-StoryWriter |
|
|
|
Nemotron-3, Nemotron-4, Minitron |
|
✅︎ |
|
OLMoE |
|
|
|
OLMo |
|
|
|
OPT, OPT-IML |
|
|
|
Orion |
|
|
|
Phi |
|
✅︎ |
|
Phi-3 |
|
|
|
Phi-3-Small |
|
|
|
Phi-3.5-MoE |
|
|
|
Persimmon |
|
|
|
Qwen |
|
|
|
Qwen2 |
|
✅︎ |
|
Qwen2MoE |
|
|
|
StableLM |
|
|
|
Starcoder2 |
|
|
|
EXAONE-3 |
|
|
|
Xverse |
|
Note
Currently, the ROCm version of vLLM supports Mistral and Mixtral only for context lengths up to 4096.
Multimodal Language Models#
Architecture |
Models |
Modalities |
Example HuggingFace Models |
|
---|---|---|---|---|
|
BLIP-2 |
ImageE |
|
|
|
Chameleon |
Image |
|
|
|
Fuyu |
Image |
|
|
|
InternVL2 |
ImageE+ |
|
|
|
LLaVA-1.5 |
ImageE+ |
|
|
|
LLaVA-NeXT |
ImageE+ |
|
|
|
LLaVA-NeXT-Video |
Video |
|
|
|
LLaVA-Onevision |
Image+ / Video |
|
|
|
MiniCPM-V |
Image+ |
|
|
|
Llama 3.2 |
Image |
|
|
|
PaliGemma |
ImageE |
|
|
|
Phi-3-Vision, Phi-3.5-Vision |
ImageE+ |
|
|
|
Pixtral |
Image+ |
|
|
|
Qwen-VL |
ImageE+ |
|
|
|
Qwen2-VL (see note) |
Image+ / Video+ |
|
|
|
Ultravox |
AudioE+ |
|
Note
For openbmb/MiniCPM-V-2
, the official repo doesn’t work yet, so we need to use a fork (HwwwH/MiniCPM-V-2
) for now.
For more details, please see: vllm-project/vllm#4087
Note
For Qwen2-VL
, the latest release of huggingface/transformers
doesn’t work yet, so we need to use a developer version (21fac7abba2a37fae86106f87fcf9974fd1e3830
) for now.
This can be installed by running the following command:
pip install git+https://github.com/huggingface/transformers.git@21fac7abba2a37fae86106f87fcf9974fd1e3830
If your model uses one of the above model architectures, you can seamlessly run your model with vLLM. Otherwise, please refer to Adding a New Model and Enabling Multimodal Inputs for instructions on how to implement support for your model. Alternatively, you can raise an issue on our GitHub project.
Tip
The easiest way to check if your model is supported is to run the program below:
from vllm import LLM
llm = LLM(model=...) # Name or path of your model
output = llm.generate("Hello, my name is")
print(output)
If vLLM successfully generates text, it indicates that your model is supported.
Tip
To use models from ModelScope instead of HuggingFace Hub, set an environment variable:
$ export VLLM_USE_MODELSCOPE=True
And use with trust_remote_code=True
.
from vllm import LLM
llm = LLM(model=..., revision=..., trust_remote_code=True) # Name or path of your model
output = llm.generate("Hello, my name is")
print(output)
Model Support Policy#
At vLLM, we are committed to facilitating the integration and support of third-party models within our ecosystem. Our approach is designed to balance the need for robustness and the practical limitations of supporting a wide range of models. Here’s how we manage third-party model support:
Community-Driven Support: We encourage community contributions for adding new models. When a user requests support for a new model, we welcome pull requests (PRs) from the community. These contributions are evaluated primarily on the sensibility of the output they generate, rather than strict consistency with existing implementations such as those in transformers. Call for contribution: PRs coming directly from model vendors are greatly appreciated!
Best-Effort Consistency: While we aim to maintain a level of consistency between the models implemented in vLLM and other frameworks like transformers, complete alignment is not always feasible. Factors like acceleration techniques and the use of low-precision computations can introduce discrepancies. Our commitment is to ensure that the implemented models are functional and produce sensible results.
Issue Resolution and Model Updates: Users are encouraged to report any bugs or issues they encounter with third-party models. Proposed fixes should be submitted via PRs, with a clear explanation of the problem and the rationale behind the proposed solution. If a fix for one model impacts another, we rely on the community to highlight and address these cross-model dependencies. Note: for bugfix PRs, it is good etiquette to inform the original author to seek their feedback.
Monitoring and Updates: Users interested in specific models should monitor the commit history for those models (e.g., by tracking changes in the main/vllm/model_executor/models directory). This proactive approach helps users stay informed about updates and changes that may affect the models they use.
Selective Focus: Our resources are primarily directed towards models with significant user interest and impact. Models that are less frequently used may receive less attention, and we rely on the community to play a more active role in their upkeep and improvement.
Through this approach, vLLM fosters a collaborative environment where both the core development team and the broader community contribute to the robustness and diversity of the third-party models supported in our ecosystem.
Note that, as an inference engine, vLLM does not introduce new models. Therefore, all models supported by vLLM are third-party models in this regard.
We have the following levels of testing for models:
Strict Consistency: We compare the output of the model with the output of the model in the HuggingFace Transformers library under greedy decoding. This is the most stringent test. Please refer to models tests for the models that have passed this test.
Output Sensibility: We check if the output of the model is sensible and coherent, by measuring the perplexity of the output and checking for any obvious errors. This is a less stringent test.
Runtime Functionality: We check if the model can be loaded and run without errors. This is the least stringent test. Please refer to functionality tests and examples for the models that have passed this test.
Community Feedback: We rely on the community to provide feedback on the models. If a model is broken or not working as expected, we encourage users to raise issues to report it or open pull requests to fix it. The rest of the models fall under this category.