Security flag first: The lines you selected from .env contain what look like real API keys (Gemini, OpenAI, Anthropic, HuggingFace). If those are live keys, they're now exposed in this conversation transcript and any logs — I'd rotate all four immediately and double-check .env is gitignored. (The .env.example you have untracked is the correct thing to commit.)
On your actual question — FP8 vs BF16 KV cache for 2-4B models:
Recommendation: FP8 KV cache for the headline concurrency runs, BF16 only as a reference/quality baseline.
Reasoning:
- FP8 KV cache and FP8 weight quantization are very different beasts. Weight-FP8 on small models hurts because there's no parameter redundancy to absorb the noise. KV-FP8 just rounds each token's K/V activation at storage time — quality impact is minimal (typically <0.1 PPL delta even on large models) and basically negligible at the 8K
max_model_len these configs use.
- Concurrency-wise, FP8 KV cache roughly doubles how many sessions fit at a given context length, which is exactly the metric the benchmark targets.
- It matches the project precedent:
docs/concurrency_benchmark_results.md already shows FP8 KV beating BF16-KV + DFlash by 3.4x throughput on Qwen3.6-35B-A3B (1636 vs 475 tok/s). The doc explicitly calls FP8 the Phase 3 baseline.
- For 2B/4B models the per-token KV memory is small in absolute terms, but you'll still fit ~2x more concurrent sessions, which surfaces real scheduler/throughput differences in the benchmark.
What this means for the configs I just wrote:
- Currently all 6 Gemma configs (e2b/e4b × vllm/sglang/trtllm) have
kv_cache_dtype: "auto" (SGLang/TRT-LLM) or implicit auto (vLLM) — that resolves to BF16 KV since weights are BF16.
- If you agree on the FP8-KV recommendation, the cleanest changes are: vLLM configs → add
kv_cache_dtype: "fp8"; SGLang/TRT-LLM configs → change kv_cache_dtype: "auto" → "fp8_e4m3" (SGLang) / "fp8" (TRT-LLM).
Want me to apply those edits? And do you want a second BF16-KV variant per model for the quality baseline column (mirroring how cat_a has the BF16+DFlash entry as a reference point), or just FP8-KV only?