Supported Models#
vLLM supports a variety of generative and embedding models from HuggingFace (HF) Transformers. This page lists the model architectures that are currently supported by vLLM. Alongside each architecture, we include some popular models that use it.
For other models, you can check the config.json
file inside the model repository.
If the "architectures"
field contains a model architecture listed below, then it should be supported in theory.
Tip
The easiest way to check if your model is really supported at runtime 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.
Otherwise, please refer to Adding a New Model and Enabling Multimodal Inputs for instructions on how to implement your model in vLLM. Alternatively, you can open an issue on GitHub to request vLLM support.
Note
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)
Text-only Language Models#
Text Generation#
Architecture |
Models |
Example HF Models |
||
---|---|---|---|---|
|
Aquila, Aquila2 |
|
✅︎ |
✅︎ |
|
Arctic |
|
✅︎ |
|
|
Baichuan2, Baichuan |
|
✅︎ |
✅︎ |
|
BLOOM, BLOOMZ, BLOOMChat |
|
✅︎ |
|
|
BART |
|
||
|
ChatGLM |
|
✅︎ |
✅︎ |
|
Command-R |
|
✅︎ |
✅︎ |
|
DBRX |
|
✅︎ |
|
|
DeciLM |
|
✅︎ |
|
|
DeepSeek |
|
✅︎ |
|
|
DeepSeek-V2 |
|
✅︎ |
|
|
EXAONE-3 |
|
✅︎ |
✅︎ |
|
Falcon |
|
✅︎ |
|
|
FalconMamba |
|
✅︎ |
|
|
Gemma |
|
✅︎ |
✅︎ |
|
Gemma2 |
|
✅︎ |
✅︎ |
|
GLM-4 |
|
✅︎ |
✅︎ |
|
GPT-2 |
|
✅︎ |
|
|
StarCoder, SantaCoder, WizardCoder |
|
✅︎ |
✅︎ |
|
GPT-J |
|
✅︎ |
|
|
GPT-NeoX, Pythia, OpenAssistant, Dolly V2, StableLM |
|
✅︎ |
|
|
Granite 3.0, PowerLM |
|
✅︎ |
✅︎ |
|
Granite 3.0 MoE, PowerMoE |
|
✅︎ |
✅︎ |
|
InternLM |
|
✅︎ |
✅︎ |
|
InternLM2 |
|
✅︎ |
✅︎ |
|
Jais |
|
✅︎ |
|
|
Jamba |
|
✅︎ |
|
|
Llama 3.1, Llama 3, Llama 2, LLaMA, Yi |
|
✅︎ |
✅︎ |
|
Mamba |
|
||
|
MiniCPM |
|
✅︎ |
✅︎ |
|
MiniCPM3 |
|
✅︎ |
✅︎ |
|
Mistral, Mistral-Instruct |
|
✅︎ |
✅︎ |
|
Mixtral-8x7B, Mixtral-8x7B-Instruct |
|
✅︎ |
✅︎ |
|
MPT, MPT-Instruct, MPT-Chat, MPT-StoryWriter |
|
✅︎ |
|
|
Nemotron-3, Nemotron-4, Minitron |
|
✅︎ |
✅︎ |
|
OLMo |
|
✅︎ |
|
|
OLMo2 |
|
✅︎ |
|
|
OLMoE |
|
✅︎ |
✅︎ |
|
OPT, OPT-IML |
|
✅︎ |
|
|
Orion |
|
✅︎ |
|
|
Phi |
|
✅︎ |
✅︎ |
|
Phi-3 |
|
✅︎ |
✅︎ |
|
Phi-3-Small |
|
✅︎ |
|
|
Phi-3.5-MoE |
|
✅︎ |
✅︎ |
|
Persimmon |
|
✅︎ |
|
|
Qwen |
|
✅︎ |
✅︎ |
|
Qwen2 |
|
✅︎ |
✅︎ |
|
Qwen2MoE |
|
✅︎ |
|
|
StableLM |
|
✅︎ |
|
|
Starcoder2 |
|
✅︎ |
|
|
Solar Pro |
|
✅︎ |
✅︎ |
|
TeleChat2 |
|
✅︎ |
✅︎ |
|
XVERSE |
|
✅︎ |
✅︎ |
Note
Currently, the ROCm version of vLLM supports Mistral and Mixtral only for context lengths up to 4096.
Text Embedding#
Architecture |
Models |
Example HF Models |
||
---|---|---|---|---|
|
BERT-based |
|
||
|
Gemma2-based |
|
✅︎ |
|
|
Llama-based |
|
✅︎ |
✅︎ |
|
Qwen2-based |
|
✅︎ |
✅︎ |
|
RoBERTa-based |
|
||
|
XLM-RoBERTa-based |
|
Important
Some model architectures support both generation and embedding tasks.
In this case, you have to pass --task embedding
to run the model in embedding mode.
Tip
You can override the model’s pooling method by passing --override-pooler-config
.
Note
ssmits/Qwen2-7B-Instruct-embed-base
has an improperly defined Sentence Transformers config.
You should manually set mean pooling by passing --override-pooler-config '{"pooling_type": "MEAN"}'
.
Note
Unlike base Qwen2, Alibaba-NLP/gte-Qwen2-7B-instruct
uses bi-directional attention.
You can set --hf-overrides '{"is_causal": false}'
to change the attention mask accordingly.
On the other hand, its 1.5B variant (Alibaba-NLP/gte-Qwen2-1.5B-instruct
) uses causal attention
despite being described otherwise on its model card.
Reward Modeling#
Architecture |
Models |
Example HF Models |
||
---|---|---|---|---|
|
Llama-based |
|
✅︎ |
✅︎ |
|
Qwen2-based |
|
✅︎ |
✅︎ |
Important
For process-supervised reward models such as peiyi9979/math-shepherd-mistral-7b-prm
, the pooling config should be set explicitly,
e.g.: --override-pooler-config '{"pooling_type": "STEP", "step_tag_id": 123, "returned_token_ids": [456, 789]}'
.
Note
As an interim measure, these models are supported in both offline and online inference via Embeddings API.
Classification#
Architecture |
Models |
Example HF Models |
||
---|---|---|---|---|
|
Qwen2-based |
|
✅︎ |
✅︎ |
Note
As an interim measure, these models are supported in both offline and online inference via Embeddings API.
Sentence Pair Scoring#
Architecture |
Models |
Example HF Models |
||
---|---|---|---|---|
|
BERT-based |
|
||
|
RoBERTa-based |
|
||
|
XLM-RoBERTa-based |
|
Note
These models are supported in both offline and online inference via Score API.
Multimodal Language Models#
The following modalities are supported depending on the model:
Text
Image
Video
Audio
Any combination of modalities joined by +
are supported.
e.g.:
T + I
means that the model supports text-only, image-only, and text-with-image inputs.
On the other hand, modalities separated by /
are mutually exclusive.
e.g.:
T / I
means that the model supports text-only and image-only inputs, but not text-with-image inputs.
Text Generation#
Architecture |
Models |
Inputs |
Example HF Models |
||
---|---|---|---|---|---|
|
Aria |
T + I |
|
✅︎ |
|
|
BLIP-2 |
T + IE |
|
✅︎ |
|
|
Chameleon |
T + I |
|
✅︎ |
|
|
Fuyu |
T + I |
|
✅︎ |
|
|
GLM-4V |
T + I |
|
✅︎ |
✅︎ |
|
H2OVL |
T + IE+ |
|
✅︎ |
|
|
Idefics3 |
T + I |
|
✅︎ |
|
|
InternVL2 |
T + IE+ |
|
✅︎ |
|
|
LLaVA-1.5 |
T + IE+ |
|
✅︎ |
|
|
LLaVA-NeXT |
T + IE+ |
|
✅︎ |
|
|
LLaVA-NeXT-Video |
T + V |
|
✅︎ |
|
|
LLaVA-Onevision |
T + I+ + V+ |
|
✅︎ |
|
|
MiniCPM-V |
T + IE+ |
|
✅︎ |
✅︎ |
|
Llama 3.2 |
T + I+ |
|
||
|
Molmo |
T + I |
|
✅︎ |
|
|
NVLM-D 1.0 |
T + IE+ |
|
✅︎ |
|
|
PaliGemma |
T + IE |
|
✅︎ |
|
|
Phi-3-Vision, Phi-3.5-Vision |
T + IE+ |
|
✅︎ |
|
|
Pixtral |
T + I+ |
|
✅︎ |
|
|
Qwen-VL |
T + IE+ |
|
✅︎ |
✅︎ |
|
Qwen2-Audio |
T + A+ |
|
✅︎ |
|
|
Qwen2-VL |
T + IE+ + VE+ |
|
✅︎ |
✅︎ |
|
Ultravox |
T + AE+ |
|
✅︎ |
Important
To enable multiple multi-modal items per text prompt, you have to set limit_mm_per_prompt
(offline inference)
or --limit-mm-per-prompt
(online inference). For example, to enable passing up to 4 images per text prompt:
llm = LLM(
model="Qwen/Qwen2-VL-7B-Instruct",
limit_mm_per_prompt={"image": 4},
)
vllm serve Qwen/Qwen2-VL-7B-Instruct --limit-mm-per-prompt image=4
Note
vLLM currently only supports adding LoRA to the language backbone of multimodal models.
Note
The official openbmb/MiniCPM-V-2
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
Multimodal Embedding#
Architecture |
Models |
Inputs |
Example HF Models |
||
---|---|---|---|---|---|
|
LLaVA-NeXT-based |
T / I |
|
✅︎ |
|
|
Phi-3-Vision-based |
T + I |
|
🚧 |
✅︎ |
|
Qwen2-VL-based |
T + I |
|
✅︎ |
Important
Some model architectures support both generation and embedding tasks.
In this case, you have to pass --task embedding
to run the model in embedding mode.
Tip
You can override the model’s pooling method by passing --override-pooler-config
.
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.
Tip
When comparing the output of model.generate
from HuggingFace Transformers with the output of llm.generate
from vLLM, note that the former reads the model’s generation config file (i.e., generation_config.json) and applies the default parameters for generation, while the latter only uses the parameters passed to the function. Ensure all sampling parameters are identical when comparing outputs.
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.