flash-next-seat: full 262K context, KV pinned at a measured 14 GiB, gen-large on the gateway
Operator-directed: raise context to the model's native maximum and take as much KV as the card safely allows, and expose the seat through LiteLLM as `gen-large`. max_model_len 131,072 -> 262,144 KV cache 8.76 -> 14.00 GiB (332,721 -> 560,654 tokens) concurrency 2.54x@128K -> 2.14x@262K ⚠ 16.00 GiB WAS TRIED FIRST AND IS TOO AGGRESSIVE. A 155,497-token non-repeating prefill drove GPU 2 to 97,074 of 97,887 MiB and the caching allocator logged "OOM on device 0 while trying to allocate 488636416 bytes (free: 422117376)" -- 466 MiB wanted against 403 MiB free. The request completed, so nothing failed visibly; that is one step before the shape that crashed stacks/mog-sec twice on 2026-09-10 (~1.04 GiB wanted, ~600 MB free). Backed off to 14.00 GiB, which re-probes clean: zero allocator warnings, a 155,557-token prefill in 14.2 s, and 2,085 MiB still free at peak. The reason the first estimate was wrong is worth keeping, because it is not obvious and it inverts the usual advice: --kv-cache-memory makes vLLM SKIP MEMORY PROFILING ENTIRELY and ignore --gpu-memory-utilization. The profiler was the thing accounting for deep-prefill activation, so pinning bytes switched off the protection that the pin was supposed to formalise. vLLM's own "--kv-cache-memory=18745235968 (17.46 GiB) to fully utilize gpu memory" line is computed from a profile measured at max-num-batched-tokens depth and sits 3.5 GiB above what a 150K-token request survives; open #54764 compounds it, since PLE short-conv prefill pads every request in a batch to the batch-MAX query length. max-num-batched-tokens stays at 8192 -- it is what bounds the activation peak, and doubling max_model_len left the profiled peak unchanged at 1.65 GiB precisely because the peak tracks chunk size, not context length. Gateway: `gen-large` added to the LiteLLM model_list, pointing at fv-ml1:8022. One alias on purpose -- a single alias cannot trip the shared-config enable_thinking mutation footgun, which needs two over the same (model, api_base). Sampling is the checkpoint's own declared set (temp 1.0 / top_p 0.95 / top_k 20); presence_penalty, min_p and repetition_penalty are left unset because the checkpoint declares no canonical value for them. Verified registered for both the infra-ops admin key and the shared all-agents key, since a new model behind a scoped allowlist 403s silently. Also adds services/flash-next-mtp-bench/ -- the MTP measurement campaign and its rationale. MTP stays off, but on "not yet measured here" rather than on vLLM's 4xH100 recipe number, which is a cross-harness comparison and not evidence about a TP=1 Blackwell seat.
This commit is contained in:
@@ -37,21 +37,33 @@ FN_SERVED_NAME_THINK=qwen3.8-flash-next-uncensored-thinking
|
||||
# where host and device share one unified pool and "offload" frees nothing.
|
||||
FN_ENGRAM_CONFIG={"cpu_offload": true}
|
||||
|
||||
# ── Memory and context ──────────────────────────────────────────────────────
|
||||
# FIRST-BOOT. Card is dedicated, so 0.90 (the vLLM recipe's own figure for offload
|
||||
# configs) is not competing with a neighbour. Expected resident weights ~78 GiB of
|
||||
# 95.6, leaving ~8-9 GiB for KV + activation inside the 0.90 budget.
|
||||
# ⚠ NEXT STEP after first boot: read vLLM's budget line and replace this with an
|
||||
# explicit --kv-cache-memory in BYTES. A ratio sizes the KV calculation but does
|
||||
# not bound peak activation — that is what bit stacks/mog-sec twice on 2026-09-10.
|
||||
FN_GPU_MEM_UTIL=0.90
|
||||
# Card is dedicated -- one tenant, nothing to compete with. Measured at 262K:
|
||||
# weights 74.36 GiB resident, 560,654 KV tokens, 2.14x concurrency.
|
||||
# ⚠ This ratio is now ADVISORY ONLY -- see the KV pin below, which overrides it.
|
||||
FN_GPU_MEM_UTIL=0.96
|
||||
# ⚠⚠ 14.00 GiB, PINNED IN BYTES AND MEASURED THE HARD WAY (2026-09-13).
|
||||
# 16.00 GiB was tried first and nearly OOM'd: a 155,497-token prefill drove GPU 2 to
|
||||
# 97,074 of 97,887 MiB and the allocator logged "OOM on device 0 while trying to
|
||||
# allocate 488636416 bytes (free: 422117376)" -- 466 MiB wanted, 403 MiB free. The
|
||||
# request survived but that is one step before the mog-sec crash shape.
|
||||
# ⚠ WHY THE ESTIMATE WAS WRONG: --kv-cache-memory makes vLLM SKIP MEMORY PROFILING
|
||||
# and ignore --gpu-memory-utilization entirely. The profiler was the thing accounting
|
||||
# for deep-prefill activation; pinning bytes turns it off. Do NOT take vLLM's
|
||||
# "17.46 GiB to fully utilize" suggestion -- it is computed from a profile taken at
|
||||
# max-num-batched-tokens depth and is 3.5 GiB above what a 150K request survives.
|
||||
# Re-raising requires re-running the deep probe and reading the allocator log.
|
||||
# VERIFIED at 14.00 GiB: 0 OOM warnings, 155,557-token prefill in 14.2 s, 2,085 MiB
|
||||
# still free on the card at peak.
|
||||
FN_KV_CACHE_MEMORY=15032385536
|
||||
|
||||
# FIRST-BOOT. 128K, against a 262,144 native ceiling. Raising this is gated on a
|
||||
# depth bisect with a NON-REPEATING prompt, because two open upstream issues make
|
||||
# depth the risky axis: #54764 (PLE short-conv prefill pads every request in a
|
||||
# batch to the batch-max query length) and #54919 (long prefill starving decode
|
||||
# for 3-7 minutes). See the compose comment.
|
||||
FN_MAX_MODEL_LEN=131072
|
||||
# FULL NATIVE 262,144 (operator-directed 2026-09-13). The KV pool holds ~641K
|
||||
# tokens, so a single max-length request fits with ~2.4x concurrency to spare.
|
||||
# ⚠ STARTUP IS NOT A DEPTH TEST. Two open upstream issues make depth the risky
|
||||
# axis -- #54764 (PLE short-conv prefill pads every request in a batch to the
|
||||
# batch-MAX query length) and #54919 (long prefill starving active decode for 3-7
|
||||
# minutes) -- and vLLM's own recipe admits a single 262K request was never tested.
|
||||
# If deep requests misbehave, --max-num-batched-tokens is the lever, not this.
|
||||
FN_MAX_MODEL_LEN=262144
|
||||
FN_MAX_NUM_SEQS=16
|
||||
FN_MAX_NUM_BATCHED_TOKENS=8192
|
||||
FN_MAMBA_CACHE_MODE=align
|
||||
|
||||
@@ -104,7 +104,56 @@ services:
|
||||
# KV calculation but does not bound peak activation, and it silently yields a
|
||||
# different cache depending on what is resident at start time.
|
||||
- --gpu-memory-utilization
|
||||
- ${FN_GPU_MEM_UTIL:-0.90}
|
||||
- ${FN_GPU_MEM_UTIL:-0.96}
|
||||
# ⚠ KV PINNED IN BYTES, and the figure is MEASURED at 262K, not derived.
|
||||
# The ratio above sizes the KV calculation but does NOT bound actual usage:
|
||||
# peak activation is profiled once at startup and real long-context work
|
||||
# exceeds the profile. stacks/mog-sec proved that twice on 2026-09-10, where
|
||||
# vLLM's own budget line showed the seat running 0.9 GiB OVER its stated
|
||||
# reservation. An explicit figure is reproducible; a ratio silently yields a
|
||||
# different cache depending on what else is resident at start time.
|
||||
#
|
||||
# ⚠⚠ 16.00 GiB WAS TRIED FIRST AND WAS TOO AGGRESSIVE -- MEASURED, 2026-09-13.
|
||||
# A 155,497-token non-repeating prefill drove GPU 2 to 97,074 of 97,887 MiB and
|
||||
# the allocator logged
|
||||
# OOM on device 0 while trying to allocate 488636416 bytes (free: 422117376)
|
||||
# i.e. it wanted 466 MiB with 403 MiB left. The request still completed (the
|
||||
# caching allocator recovered) but that is ONE STEP before the mog-sec crash
|
||||
# shape: ~1.04 GiB wanted with ~600 MB free. 14.00 GiB restores ~2 GiB of
|
||||
# headroom and was chosen over the 16.00 that nearly failed.
|
||||
#
|
||||
# ⚠ THE REASON THE FIRST ESTIMATE WAS WRONG, because it is not obvious: setting
|
||||
# --kv-cache-memory makes vLLM SKIP MEMORY PROFILING ENTIRELY and ignore
|
||||
# --gpu-memory-utilization ("reserved 16.0 GiB ... and skipped memory profiling.
|
||||
# This does not respect the gpu_memory_utilization config"). So the 0.96 cap
|
||||
# stops protecting anything, and the 1.65 GiB "peak activation" figure -- which
|
||||
# was profiled against max-num-batched-tokens=8192, not against real depth --
|
||||
# stops being subtracted at all. The profiler was the thing keeping deep
|
||||
# prefills safe, and pinning bytes turns it off.
|
||||
#
|
||||
# 15,032,385,536 B = 14.00 GiB. For reference the 262K boot's own accounting:
|
||||
# free on device 94.42 GiB
|
||||
# weights+non-torch 75.07
|
||||
# peak activation 1.65 (profiled against max-num-batched-tokens,
|
||||
# 8192 here -- NOT against max-model-len,
|
||||
# which is why doubling context to 262K left
|
||||
# this number unchanged)
|
||||
# CUDA graphs 0.10
|
||||
# → theoretical KV 17.60 GiB (on paper; NOT achievable at depth)
|
||||
#
|
||||
# ⚠ vLLM's own "--kv-cache-memory=18745235968 (17.46 GiB) to fully utilize gpu
|
||||
# memory" suggestion is 3.5 GiB ABOVE what survives a deep prefill here. Do not
|
||||
# take it. That line is computed from the startup profile, which is measured at
|
||||
# max-num-batched-tokens depth and says nothing about a 150K-token request.
|
||||
# Open upstream #54764 compounds it -- PLE short-conv batched prefill pads every
|
||||
# request in a batch to the batch-MAX query length, so one deep request inflates
|
||||
# the whole step's activation above anything the profile saw.
|
||||
#
|
||||
# Raising this again requires re-running the deep-prefill probe in
|
||||
# services/flash-next-mtp-bench/ and reading the allocator log, not just
|
||||
# checking that the seat starts. Startup is not a depth test.
|
||||
- --kv-cache-memory
|
||||
- ${FN_KV_CACHE_MEMORY:-15032385536}
|
||||
# ⚠ 128K TO START, NOT the native 262,144 the checkpoint advertises, and the
|
||||
# gap is deliberate. Two open upstream issues make depth the risky axis here:
|
||||
# #54764 (PLE short-conv batched prefill pads every request to the batch-max
|
||||
|
||||
Reference in New Issue
Block a user