Files
esh-pfi-infrastructure/stacks/vllm/.env.example
T
vh c35f6510bf feat(fv-ml1): rebalance GPUs 0/1 by usage; contexts to published maximums; gen-small default output cap
Layout: GPU 0 = cyberprev (KV 16 -> 15 GiB, 1.29x), erp-seat (moved from
GPU 1, KV 8.49 -> 5.5 GiB, 1.32x), voices (ctx 8,192 -> 40,960, its native
maximum, KV 6 GiB, 1.07x), coder (moved from GPU 1, ctx 16,384 -> 32,768,
the card maximum, 2.35x), parakeet-nemo. GPU 1 = gen-small (moved from
GPU 0, 5.5 GiB, 1.76x), meromero-rp (22 GiB, 1.32x), intern-decision.

Sizing rule: KV >= 1.25x max context rounded up to 0.5 GiB, checked against
7 days of LiteLLM traffic and the engines' own KV-usage logs. Each card keeps
spare memory for its bursty tenant (parakeet's cap on GPU 0, intern-decision's
32k call on GPU 1). YaRN extensions are not enabled: they do not fit, and the
Qwen cards warn static YaRN degrades short prompts.

gen-small gets --override-generation-config max_new_tokens 32768. It applies
only to requests that omit max_tokens (vLLM get_max_tokens) and answers 9
runaway ~260k-token replies in 7 days; the longest normal reply was 6,357.

Applied with playbooks/fv-ml1-rebalance-20261005.yaml (boot-check guard and
health/KV verification per seat); all nine seats healthy, gateway smoke
tests pass.
2026-10-05 22:51:17 -07:00

102 lines
5.5 KiB
Bash

# vllm stack tunables. Copy this to `.env` on the server before deploying.
#
# cp .env.example .env
# # edit .env with real values
# docker compose up -d
# Image version — PINNED. Do not put `latest` here: every service in this file
# shares this one variable, so a bare `docker compose up -d` would silently
# upgrade the whole stack's vLLM at once. Pinned 2026-08-20 to the version all
# seats were already running (`latest` and `v0.24.0` were the same local image,
# 4091d5593f77, so the pin changed nothing at runtime). Bump deliberately.
VLLM_VERSION=v0.24.0
# Host ports (container always listens on 8000 internally)
# (EMBED_PORT 8001 / RERANK_PORT 8013 retired 2026-09-25 with their seats —
# embedding + reranking moved to TEI on esh-ml1, stacks/embed-rerank.)
# REWARD_PORT=8003 (retired here 2026-09-25 — the reward seat moved to esh-ml1, stacks/reward-seat)
# GPU assignment — all services share this GPU
# (ana-ml2 has 0 and 1; default 1 keeps 0 free for heavy LLM work in llama-swap)
GPU_ID=1
# Models
# Skywork is a local-path AWQ output, not from HF Hub. Bind-mounted into the
# reward container at /local-models — see compose.yaml. No env var here for
# the model path itself since it's hard-coded in the compose command.
# GPU memory split — fractions are of TOTAL GPU memory, not free memory.
# vLLM profiles each service independently, so each slice must be large enough
# to fit that service's model + KV cache with no awareness of the others.
# Setting any one too low causes that container to OOM on KV cache allocation
# with `Available KV cache memory: -X.XX GiB`.
#
# Layout on a 48 GB Ada, RIGHT-SIZED 2026-06-05 to free room for the granite
# summarizer's CUDA graphs + a LoRA hedge. The trio was wildly over-provisioned:
# embed ran a 5.89x KV pool, reward 3.90x — pure waste for utility models that
# need ~1.5x. Trimmed to free ~10 GB. (Utilization = fraction of TOTAL GPU mem;
# each service profiles independently. Too low → that container OOMs on KV with
# `Available KV cache memory: -X.XX GiB`.)
# EMBED 0.07 (~3.4 GB) — 0.6B Qwen3 embed @8k; 1.1GB weights + ~2GB KV (~3x)
# RERANK 0.07 (~3.4 GB) — 0.6B Qwen3 rerank @8k; comfortable
# REWARD 0.18 (~8.6 GB) — 8B Skywork AWQ @16k; 4.4GB weights + ~3.5GB KV (~1.5x)
#
# RETUNED 2026-06-12 for the Ada->Blackwell swap (cards are now 96 GB, so the
# Ada-era fractions reserved ~2x the bytes for the same models). Empirically
# re-floored: util climbed in 0.01 steps until each service was stable under
# 20x parallel inference.
# embed/rerank 0.05 (~4.8 GB ea) — the load-floor for the 0.6B models (0.04
# OOMs on engine init; their footprint is fixed weights+context, not KV).
# reward 0.10 (~9.6 GB) — the real over-provision was here (0.18 -> 0.10).
# Net: ~11 GB freed on GPU 1. (Fractions are of TOTAL card VRAM — re-floor if
# the cards change again.)
# 0.03 each — REBALANCED 2026-06-14 (was 0.05): the 0.6B models sat at ~5.5 GB
# each at 0.05 (mostly util-reservation waste); 0.03 (~3.6 GB) fits weights +
# CUDA context with room, freeing ~4 GB back to granite. Recreate them ONE AT A
# TIME — concurrent recreate races the memory-profiling assertion.
# REWARD_GPU_MEM_UTIL=0.10 (retired here 2026-09-25 — the reward seat moved to esh-ml1, stacks/reward-seat)
# Context length caps — lower these if VRAM is tight.
# Qwen3-Embedding supports up to 32k; reranker up to 32k.
# Skywork capped at 16k server-side as defense-in-depth; JudgeClient also
# enforces the cap at dispatch time per spec.
# REWARD_MAX_MODEL_LEN=16384 (retired here 2026-09-25 — the reward seat moved to esh-ml1, stacks/reward-seat)
# Optional API key — leave blank for no auth (fine on the internal network).
# If set, all three services require `Authorization: Bearer <key>`.
API_KEY=
# HuggingFace token — only needed for gated models in the HF-Hub-loaded
# services (embed/rerank). Reward is local-path, ignores this.
HF_TOKEN=
# === granite-4.1-8b — RETIRED 2026-08-12, vars removed 2026-08-20 ===
# Was the production summarizer. The `summarizer` / `classifier` gateway aliases
# were repointed at the gen seat and the container stopped; the service block and
# these tunables are now gone. See the tombstone in compose.yaml for the lesson
# this cost us (nevermore stayed pinned to the dead `granite-4.1-8b` alias and
# failed silently for 8 days).
# Qwen2.5-Coder-1.5B (BASE) — FIM code-completion seat for Zed editor inline
# edit-predictions (deep-research pick 2026-07-27, Apache-2.0). GPU-1, alongside the
# small-model trio + (phasing-out) granite. Reached via LiteLLM `coder-fast` alias
# and the keyless zed-fim-proxy (stacks/zed-fim-proxy). util 0.06 (~5.7 GB) holds
# the 1.5B fp16 + fp8 KV; 8192 ctx is ample for FIM (KV = 13.75x concurrency).
CODER_PORT=8020
# 2026-10-05 rebalance: GPU 0; context raised to the card-published maximum (32,768).
CODER_GPU_ID=0
CODER_MODEL=Qwen/Qwen2.5-Coder-1.5B
CODER_SERVED_NAME=qwen2.5-coder-1.5b
CODER_MAX_MODEL_LEN=32768
CODER_KV_CACHE_DTYPE=fp8
CODER_GPU_MEM_UTIL=0.06
# KV pinned 2026-10-05 (77,056 tokens; see compose.yaml). Util now only gates the boot check.
CODER_KV_CACHE_MEMORY=1104674816
CODER_MAX_NUM_SEQS=32
# === LFM2.5-2.6B — RETIRED PERMANENTLY 2026-08-20 (operator directive) ===
# Eval-only bake-off seat vs granite-4.1-8b that never got its production ruling;
# its comparator was retired first, and it logged 0 calls in the 4 days before it
# came down. Container removed, service block and tunables deleted, gateway alias
# dropped. Weights remain in the shared HF cache.