Chapter 6 · Part II

vLLM Inference Engine

vLLM is a high-throughput inference engine for large language models, built around PagedAttention — a memory management technique that eliminates KV-cache fragmentation and dramatically increases GPU utilization. It exposes an OpenAI-compatible REST API and supports tensor parallelism across multiple GPUs, making it the model-serving engine of choice on the DGX Spark Bundle cluster.

Startup Time Expectations

ScenarioTime
First startup (14GB model download)~25 minutes
Subsequent startups (cached)3–5 minutes

Key vLLM Configuration Flags

FlagValuePurpose
--tensor-parallel-size2One rank per GPU/node
--distributed-executor-backendrayUse Ray for distribution
--gpu-memory-utilization0.8585% GPU for KV cache
--max-num-seqs4Max concurrent sequences

Monitor Startup

kubectl logs -n core-services \
  -l ray.io/node-type=head \
  --follow
# Wait for: "Application startup complete."

Verification

HEAD=$(kubectl get pods -n core-services -l ray.io/node-type=head -o name | head -1)

# List models
kubectl exec -n core-services $HEAD -- \
  curl -s http://localhost:8000/v1/models

# Test chat completion
kubectl exec -n core-services $HEAD -- \
  curl -s http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Qwen/Qwen2.5-7B-Instruct",
    "messages": [{"role": "user", "content": "What is tensor parallelism?"}],
    "max_tokens": 100
  }'

Models You Can Serve

ModelHuggingFace IDNotes
Qwen2.5-7B (default)Qwen/Qwen2.5-7B-InstructFast, fits easily
Qwen2.5-72BQwen/Qwen2.5-72B-InstructNeeds --max-model-len
Llama 3.3 70Bmeta-llama/Llama-3.3-70B-InstructNeeds HF access request
Mistral 7Bmistralai/Mistral-7B-Instruct-v0.3Good alternative