74f596b1d3
Re-quantizes the fleet `gen` seat from weight-only NVFP4A16 to a mixed-precision build: NVFP4 W4A4 for layers 0-55 MLPs, FP8 W8A8 for the attention projections / linear_attn / lm_head / layers 56-63 MLPs, FP8 KV cache. Replicates the scheme of unsloth/Qwen3.8-27B-NVFP4 on the abliterated weights. The queued task named this "W4A8" (NVFP4 weights + FP8 activations). That checkpoint cannot be served: vLLM 0.24's compressed-tensors dispatcher (compressed_tensors.py:704-713) accepts NVFP4 weights with either no input quantization (W4A16, which forces the Marlin kernel) or NVFP4 input quantization (W4A4) -- anything else, FP8 included, raises ValueError at load. CompressedTensorsW4A8Fp8 is INT4 weights gated on an exact-sm90 check, so it is closed on Blackwell twice over. The ~20% intuition was correct; the scheme name was not. Getting FP8 into the mix has to be done per-layer-group. Established the gain before spending GPU time: unsloth's build was already on-box, so serving it as a probe measured +19.1% over our seat at identical MTP acceptance -- a kernel-level result, no requant needed to learn it. Measured, cache-busted, bs=1: decode 80.12 -> 94.53 tok/s (+18.0%) MTP acceptance 47.8% -> 47.7% (unchanged) perplexity (n=6) 6.941 -> 7.059 (+1.7%) abliteration 4/4 -> 4/4 (preserved) weights on disk 27.7 -> 22.5 GB (-19%) Surface test green on the live seat: plain chat, vision, tool calling, thinking split, 36K-token needle retrieval, streaming. All 7 LiteLLM aliases verified routing. GEN_GPU_MEM_UTIL 0.45 -> 0.43: the new weights are 5.2 GB smaller, and at 0.45 the seat absorbed that slack as KV, leaving meromero-charrp 0.18 GiB short of its budget on the shared GPU0 -- it crash-looped. Handing the space back leaves gen 422K tokens of KV (1.6x its 262K context) and both seats co-resident at 89.8/97.9 GB. Also records two measured negatives so they are not re-chased: GEN_SPEC_TOKENS is already optimal at 3 (swept 2/3/4/5 -> 77.1/80.1/78.7/ 75.9 tok/s), and vLLM's prompt_logprobs are ~uniform while speculative decoding is on, so perplexity must be measured with spec off. Pipeline, acceptance harness and raw measurements land in services/gen-seat-mixed-quant/. Rollback is one .env line; the previous build is untouched at /tank/aimodels/qwen38-27b-uncensored-nvfp4.
29 lines
1.4 KiB
Bash
Executable File
29 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Serve a model on ana-ml2:8017 as `probe`, optionally without speculative decoding.
|
|
# Usage: serve_probe.sh <model-dir> [nospec]
|
|
set -euo pipefail
|
|
MODEL="$1"; MODE="${2:-spec}"
|
|
H=infra-ops@10.250.50.54
|
|
SPEC='--speculative-config {"method":"qwen3_5_mtp","num_speculative_tokens":3}'
|
|
[ "$MODE" = "nospec" ] && SPEC=""
|
|
|
|
ssh $H "sudo docker rm -f vllm-probe 2>/dev/null >/dev/null || true
|
|
sudo docker run -d --name vllm-probe --gpus '\"device=0\"' --ipc host \
|
|
-e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
|
|
-v /tank/aimodels:/tank/aimodels -p 8017:8000 \
|
|
vllm/vllm-openai:latest \
|
|
$MODEL --served-model-name probe --host 0.0.0.0 --port 8000 \
|
|
--quantization compressed-tensors --gpu-memory-utilization 0.40 \
|
|
--max-model-len 32768 --max-num-seqs 16 --max-num-batched-tokens 16384 \
|
|
--trust-remote-code --dtype auto --mamba-cache-dtype float32 \
|
|
--kv-cache-dtype fp8 --enable-chunked-prefill $SPEC >/dev/null"
|
|
|
|
for i in $(seq 1 60); do
|
|
s=$(curl -s -o /dev/null -w '%{http_code}' -m 3 http://10.250.50.54:8017/health 2>/dev/null || true)
|
|
[ "$s" = "200" ] && { echo "probe healthy after $((i*10))s ($MODEL, $MODE)"; exit 0; }
|
|
if ! ssh $H 'sudo docker ps -q -f name=vllm-probe' | grep -q .; then
|
|
echo "CONTAINER DIED"; ssh $H 'sudo docker logs --tail 25 vllm-probe 2>&1 | tail -25'; exit 1; fi
|
|
sleep 10
|
|
done
|
|
echo "TIMEOUT" >&2; exit 1
|