- Offline mode. vLLM loads the model on your machine, inside your Python process.
- Online mode. vLLM runs as a separate server, and Curator sends requests to it.
Prerequisites
- Python 3.10 or later.
- Curator and vLLM, installed with
pip install "bespokelabs-curator[vllm]". - A GPU.
Define the model and the generator
Run this code first. Offline mode usesRecipe and RecipeGenerator, and both modes use the cuisines list.
Offline mode
Setbackend="vllm" and pass the vLLM settings in backend_params.
Offline settings
Online mode
1
Start the vLLM server
2
Connect Curator to the server
Use the LiteLLM backend with the
hosted_vllm/ prefix on the model name. This example asks for plain text, so it uses its own LLM subclass.