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.
Architecture |
Models |
Example HuggingFace Models |
|
|---|---|---|---|
|
Aquila |
|
✅︎ |
|
Baichuan |
|
✅︎ |
|
ChatGLM |
|
✅︎ |
|
Command-R |
|
|
|
DBRX |
|
|
|
DeciLM |
|
|
|
BLOOM, BLOOMZ, BLOOMChat |
|
|
|
Falcon |
|
|
|
Gemma |
|
✅︎ |
|
GPT-2 |
|
|
|
StarCoder, SantaCoder, WizardCoder |
|
|
|
GPT-J |
|
|
|
GPT-NeoX, Pythia, OpenAssistant, Dolly V2, StableLM |
|
|
|
InternLM |
|
✅︎ |
|
InternLM2 |
|
|
|
Jais |
|
|
|
LLaMA, LLaMA-2, Vicuna, Alpaca, Yi |
|
✅︎ |
|
Mistral, Mistral-Instruct |
|
✅︎ |
|
Mixtral-8x7B, Mixtral-8x7B-Instruct |
|
✅︎ |
|
MPT, MPT-Instruct, MPT-Chat, MPT-StoryWriter |
|
|
|
OLMo |
|
|
|
OPT, OPT-IML |
|
|
|
Orion |
|
|
|
Phi |
|
|
|
Qwen |
|
|
|
Qwen2 |
|
✅︎ |
|
Qwen2MoE |
|
|
|
StableLM |
|
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 for instructions on how to implement support for your model. Alternatively, you can raise an issue on our GitHub project.
Note
Currently, the ROCm version of vLLM supports Mistral and Mixtral only for context lengths up to 4096.
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)