VLLM.ConfigHelper (VLLM v0.3.0)

Copy Markdown View Source

Runtime configuration helper for using vLLM safely via SnakeBridge/Snakepit.

This module composes SnakeBridge.ConfigHelper and adds a vLLM-specific safeguard around vLLM v1 multiprocessing (which can spawn child processes).

v1 multiprocessing (vLLM 0.14+)

vLLM can spawn subprocesses for the engine core. Under Snakepit, those subprocesses must be cleaned up deterministically on shutdown to avoid orphaned GPU processes holding memory.

Configure with:

config :vllm, v1_multiprocessing: :auto | :on | :off
  • :off - always forces VLLM_ENABLE_V1_MULTIPROCESSING=0
  • :on - forces VLLM_ENABLE_V1_MULTIPROCESSING=1 and fails fast unless Snakepit process-group cleanup is available
  • :auto - enables only when safe; otherwise forces off with a warning

When v1 multiprocessing is enabled, this helper also sets VLLM_WORKER_MULTIPROC_METHOD=spawn (unless already provided) to avoid forking a multi-threaded Python gRPC server.

Summary

Functions

Auto-configure Snakepit for SnakeBridge and enforce safe vLLM multiprocessing.

Types

v1_multiprocessing_mode()

@type v1_multiprocessing_mode() :: :auto | :on | :off

Functions

configure_snakepit!(opts \\ [])

@spec configure_snakepit!(keyword()) :: :ok

Auto-configure Snakepit for SnakeBridge and enforce safe vLLM multiprocessing.

Intended for config/runtime.exs:

import Config
VLLM.ConfigHelper.configure_snakepit!()

Options: