ofa_vllm

Auto-started vLLM servers, so large models work like the Ollama ones.

ofa --model <name> with a name from RECIPES reuses the user’s running server for that model, or submits tools/vllm-serve.sbatch with the model’s recipe and waits until it answers. The server stops itself after OFA_VLLM_IDLE_MINUTES without requests, so it is reused across sessions but does not hold nodes indefinitely.

Stdlib only: bin/ofa runs this on the login node before allocating a GPU.

Settings (environment):

OFA_VLLM_MODELS_DIR shared weights directory (default $OFA_ROOT/vllm-models) OFA_VLLM_PARTITION partition for the server job (default gpu-h100s) OFA_VLLM_WALLTIME walltime for the server job (default 04:00:00) OFA_VLLM_IDLE_MINUTES stop after this many idle minutes (default 60; 0 = never) OFA_VLLM_EXCLUDE nodes to avoid, e.g. known-bad GPU nodes OFA_ACCOUNT SLURM account (default: your default account)

Functions

endpoint_path(model)

ensure_server(model)

Return the endpoint file of a healthy server for model, starting one if needed.

healthy(path)

is_vllm_model(model)

ofa_vllm.is_vllm_model(model)[source]
Parameters:

model (str | None)

Return type:

bool

ofa_vllm.endpoint_path(model)[source]
Parameters:

model (str)

Return type:

str

ofa_vllm.healthy(path)[source]
Parameters:

path (str)

Return type:

bool

ofa_vllm.ensure_server(model)[source]

Return the endpoint file of a healthy server for model, starting one if needed. None if model is not a vLLM model. Exits with a message on failure.

Parameters:

model (str)

Return type:

str | None