frank-small: revert to bf16 KV — the only dtype that boots Gemma4
int8_per_token_head: page-size unification fails (scale tensor breaks the 256/512 head-dim ratio). turboquant_k8v4: backend validation fails (no mm-prefix attention, which Gemma4's vision/audio path requires). fp8: hardware-dead on sm_86. bf16 it is; history documented in frank-small.env, seam pins auto + no backend pin.
This commit is contained in:
1 parent
7e6ef1ac99
commit
bab8f7f839
3 files changed
+24
-27
No files matched your search
+12
-11
@@ -84,17 +84,18 @@ LISTEN_PORT=8000
|
|||||||
# 16k prefill chunk, 4-token MTP draft (the assistant carries 4 layers).
|
# 16k prefill chunk, 4-token MTP draft (the assistant carries 4 layers).
|
||||||
MAX_MODEL_LEN=262144
|
MAX_MODEL_LEN=262144
|
||||||
GPU_MEM_UTIL=0.95
|
GPU_MEM_UTIL=0.95
|
||||||
KV_CACHE_DTYPE=turboquant_k8v4
|
KV_CACHE_DTYPE=auto
|
||||||
# ATTENTION_BACKEND: Gemma4's config hook force-selects TRITON_ATTN for the
|
# KV quant history (measured 2026-09-19, all on this image): bf16 (auto)
|
||||||
# mixed 256/512 head dims whenever no backend is selected, and TRITON_ATTN
|
# is the ONLY dtype that boots Gemma4 here. int8_per_token_head dies in
|
||||||
# rejects the turboquant KV dtype (measured: ValueError "kv_cache_dtype not
|
# unify_kv_cache_spec_page_size — its separate fp32 scale tensor makes the
|
||||||
# supported", crash loop). Pin the TURBOQUANT backend explicitly via the
|
# per-token page bytes 4160 (SWA, head_dim 256) vs 8256 (full, head_dim
|
||||||
# --attention-backend flag (this vLLM build removed the VLLM_ATTENTION_
|
# 512), not an integer ratio. turboquant_k8v4 dies in backend validation —
|
||||||
# BACKEND env var — it warns "Unknown vLLM environment variable" and
|
# the TURBOQUANT backend rejects "partial multimodal token full attention"
|
||||||
# ignores it). The TURBOQUANT backend accepts any head size and the
|
# (the mm-prefix path Gemma4's vision/audio tokens require), and the
|
||||||
# turboquant_* dtypes, and the Gemma4 MTP speculator carries the target's
|
# VLLM_ATTENTION_BACKEND env var does not exist in this build (the pin
|
||||||
# selected backend through to the draft layers, so the drafter follows.
|
# goes through --attention-backend). fp8 is hardware-dead on sm_86
|
||||||
ATTENTION_BACKEND=TURBOQUANT
|
# (cvt.e4m3x2 is sm_89+). Revisit on a vLLM release that documents TurboQuant
|
||||||
|
# mm-prefix support.
|
||||||
MAX_NUM_SEQS=16
|
MAX_NUM_SEQS=16
|
||||||
MAX_NUM_BATCHED_TOKENS=16384
|
MAX_NUM_BATCHED_TOKENS=16384
|
||||||
SPEC_NUM_TOKENS=4
|
SPEC_NUM_TOKENS=4
|
||||||
@@ -44,7 +44,6 @@ fi
|
|||||||
: "${MAX_NUM_SEQS:=16}"
|
: "${MAX_NUM_SEQS:=16}"
|
||||||
: "${MAX_NUM_BATCHED_TOKENS:=16384}"
|
: "${MAX_NUM_BATCHED_TOKENS:=16384}"
|
||||||
: "${SPEC_NUM_TOKENS:=4}"
|
: "${SPEC_NUM_TOKENS:=4}"
|
||||||
: "${ATTENTION_BACKEND:=TURBOQUANT}"
|
|
||||||
: "${ENFORCE_EAGER:=0}"
|
: "${ENFORCE_EAGER:=0}"
|
||||||
|
|
||||||
# Fail loudly rather than half-loading a model into VRAM: a missing file here
|
# Fail loudly rather than half-loading a model into VRAM: a missing file here
|
||||||
@@ -67,7 +66,6 @@ VLLM_FLAGS=(
|
|||||||
--kv-cache-dtype "$KV_CACHE_DTYPE"
|
--kv-cache-dtype "$KV_CACHE_DTYPE"
|
||||||
--max-num-seqs "$MAX_NUM_SEQS"
|
--max-num-seqs "$MAX_NUM_SEQS"
|
||||||
--max-num-batched-tokens "$MAX_NUM_BATCHED_TOKENS"
|
--max-num-batched-tokens "$MAX_NUM_BATCHED_TOKENS"
|
||||||
--attention-backend "$ATTENTION_BACKEND"
|
|
||||||
--speculative-config "$SPEC_CONFIG"
|
--speculative-config "$SPEC_CONFIG"
|
||||||
--reasoning-parser gemma4
|
--reasoning-parser gemma4
|
||||||
--enable-auto-tool-choice
|
--enable-auto-tool-choice
|
||||||
|
|||||||
+12
-14
@@ -98,7 +98,7 @@ QUADLET_LARGE="$REPO_ROOT/dankclaw/frank-large/quadlet/frank-large.container"
|
|||||||
! grep -q 'HALOGEN_VISION_TOWER' "$QUADLET_LARGE"
|
! grep -q 'HALOGEN_VISION_TOWER' "$QUADLET_LARGE"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "frank-small serves the full window with turboquant KV on a dedicated card" {
|
@test "frank-small serves the full window with bf16 KV on a dedicated card" {
|
||||||
local maxlen kvdtype util seqs
|
local maxlen kvdtype util seqs
|
||||||
maxlen="$(sed -nE 's/^MAX_MODEL_LEN=([0-9]+)$/\1/p' "$ENV_FILE")"
|
maxlen="$(sed -nE 's/^MAX_MODEL_LEN=([0-9]+)$/\1/p' "$ENV_FILE")"
|
||||||
kvdtype="$(sed -nE 's/^KV_CACHE_DTYPE=(.+)$/\1/p' "$ENV_FILE")"
|
kvdtype="$(sed -nE 's/^KV_CACHE_DTYPE=(.+)$/\1/p' "$ENV_FILE")"
|
||||||
@@ -106,19 +106,17 @@ QUADLET_LARGE="$REPO_ROOT/dankclaw/frank-large/quadlet/frank-large.container"
|
|||||||
seqs="$(sed -nE 's/^MAX_NUM_SEQS=([0-9]+)$/\1/p' "$ENV_FILE")"
|
seqs="$(sed -nE 's/^MAX_NUM_SEQS=([0-9]+)$/\1/p' "$ENV_FILE")"
|
||||||
# The model's FULL trained window (262144), not a divided one.
|
# The model's FULL trained window (262144), not a divided one.
|
||||||
[ "$maxlen" = "262144" ]
|
[ "$maxlen" = "262144" ]
|
||||||
# TurboQuant k8v4 KV (K 8-bit, V 4-bit, in-tensor block scales,
|
# bf16 KV (auto): the only dtype that boots Gemma4 in this vLLM build.
|
||||||
# dedicated TURBOQUANT backend with an Ampere path). The int8/fp8
|
# int8_per_token_head dies in unify_kv_cache_spec_page_size (separate
|
||||||
# per-token-head dtypes cannot boot this model: their separate fp32
|
# fp32 scale tensor breaks the 256/512 head-dim page-size ratio),
|
||||||
# scale tensor breaks the page-size ratio between Gemma4's SWA
|
# turboquant_k8v4 dies in backend validation (no mm-prefix attention),
|
||||||
# (head_dim 256) and full-attention (head_dim 512) layers, and fp8 is
|
# and fp8 is hardware-dead on sm_86 — see frank-small.env.
|
||||||
# hardware-dead on sm_86 anyway.
|
[ "$kvdtype" = "auto" ]
|
||||||
[ "$kvdtype" = "turboquant_k8v4" ]
|
# No pinned attention backend: Gemma4's config hook selects TRITON_ATTN
|
||||||
# The TURBOQUANT backend must be pinned via --attention-backend:
|
# for the mixed head dims, and pinning any other backend breaks the KV
|
||||||
# Gemma4's config hook force-selects TRITON_ATTN (mixed 256/512 head
|
# dtype or mm-prefix validation.
|
||||||
# dims) whenever no backend is selected, and TRITON_ATTN rejects the
|
! grep -q '^ATTENTION_BACKEND' "$ENV_FILE"
|
||||||
# turboquant dtype. This vLLM build has no attention-backend env var.
|
! grep -q -- '--attention-backend' "$SERVE"
|
||||||
grep -q '^ATTENTION_BACKEND=TURBOQUANT$' "$ENV_FILE"
|
|
||||||
grep -q -- '--attention-backend "$ATTENTION_BACKEND"' "$SERVE"
|
|
||||||
# The 3090 is dedicated to this service, so the engine may take most of
|
# The 3090 is dedicated to this service, so the engine may take most of
|
||||||
# it; the KV pool, not the seq ceiling, caps full-context concurrency.
|
# it; the KV pool, not the seq ceiling, caps full-context concurrency.
|
||||||
[ "$util" = "0.95" ]
|
[ "$util" = "0.95" ]
|
||||||
|
|||||||
Reference in new issue
Block a user