Skip to main content
Most LLMs need specific configuration to run properly on vLLM. Default settings work for some models, but many require custom tokenization, attention mechanisms, or feature flags. Without the right settings, workers may fail to load or produce incorrect outputs. When deploying a model, check its Hugging Face README and the vLLM documentation for required settings.

Environment variables

vLLM is configured using command-line flags. On Runpod, set these as environment variables instead. Convert flag names to uppercase with underscores. For example:
Becomes:

Example: Deploying Mistral

CLI command:
Equivalent Runpod environment variables:

Model-specific configurations

Recommended environment variables for popular model families. Check your model’s documentation for exact requirements.

GPU selection

vLLM pre-allocates memory for its KV cache, so you need more VRAM than the minimum to load the model.

VRAM estimation

  • FP16/BF16: 2 bytes per parameter.
  • INT8: 1 byte per parameter.
  • INT4 (AWQ/GPTQ): 0.5 bytes per parameter.
  • KV cache: vLLM reserves 10-30% of remaining VRAM for concurrent requests.

Troubleshooting memory issues

  • OOM errors: Lower GPU_MEMORY_UTILIZATION from 0.90 to 0.85, or reduce MAX_MODEL_LEN.
  • Context window limits: More context means more KV cache. A 7B model that OOMs at 32k context often runs fine at 16k.
  • Limited VRAM: Use quantized models (AWQ/GPTQ) to reduce memory by 50-75%.
For production workloads, select multiple GPU types in your endpoint configuration for hardware fallback.

Additional resources