TL;DR: The Bottlecap.ai ThinkingCap NVFP4 command chains environment variables for GPU memory optimization with vLLM flags for MTP speculative decoding, FP8 KV cache, and Qwen3 reasoning — a production-ready config for fast, memory-efficient inference on a single Blackwell-class GPU.
Bottlecap.ai released their ThinkingCap finetune of Qwen3.6-27B in NVFP4 precision. The model cuts thinking tokens by ~50% on average while retaining base accuracy. Here’s every flag in the serve command, grounded with source links.
Environment Variables
Terminal window
1
VLLM_SKIP_P2P_CHECK=1 NCCL_P2P_DISABLE=1\
2
CUDA_VISIBLE_DEVICES=0 \
3
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
Variable
Purpose
VLLM_SKIP_P2P_CHECK=1
Skips the peer-to-peer DMA connectivity check during vLLM startup. Useful on single-GPU setups or when NCCL P2P is irrelevant, avoiding spurious warnings.
NCCL_P2P_DISABLE=1
Disables NCCL peer-to-peer memory access. Reduces startup overhead when tensor parallelism is 1 (no inter-GPU communication needed).
CUDA_VISIBLE_DEVICES=0
Restricts the process to GPU 0. Standard practice for single-GPU serving.
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
Enables PyTorch’s expandable pool segments — allows the CUDA memory allocator to grow memory pools dynamically, reducing fragmentation during long reasoning traces.
Bind to all network interfaces, making the API accessible externally.
--port 8082
Listen on port 8082.
--tensor-parallel-size 1
Single-GPU inference. NVFP4 fits the 27B model in one GPU’s VRAM.
Memory & KV Cache
Flag
Purpose
--kv-cache-dtype fp8_e4m3
Quantizes the KV cache to FP8 E4M3 format. Reduces KV cache memory to ~54% of BF16, enabling longer contexts and higher throughput. See vLLM FP8 KV Cache docs.
--max-model-len auto
Let vLLM compute the max context length from available VRAM after loading weights.
--safetensors-load-strategy prefetch
Loads the entire safetensors file into CPU memory before GPU transfer — faster than memory-mapped (default) loading, especially on network filesystems.
Prefill & Caching
Flag
Purpose
--enable-chunked-prefill
Breaks long prompts into smaller chunks, preventing VRAM spikes during prefill. Lets decoding start sooner.
--enable-prefix-caching
Reuses KV cache for shared prompt prefixes across requests. Critical for chat sessions with repeated system prompts.
Reasoning & Tool Calling
Flag
Purpose
--reasoning-parser qwen3
Uses Qwen3’s reasoning tag parser to extract <think>...</think> blocks. Required for models with extended thinking output.
--tool-call-parser qwen3_xml
Parses Qwen3-style XML tool call format.
--enable-auto-tool-choice
Lets the model autonomously decide whether to call tools, matching Qwen3’s native behavior.
Enables MTP (Multi-Token Prediction) self-speculative decoding. The model uses its own MTP head to draft 3 tokens per verification step — ~2.6× decode throughput boost with lossless output. See vLLM MTP docs.
--enforce-eager
Forces PyTorch eager execution, disabling CUDA graphs. Simplifies debugging and avoids graph capture issues with dynamic reasoning lengths.
Why This Combo Works
The command stacks three layers of optimization:
NVFP4 weights — 4-bit NVIDIA-native precision. Cuts model memory ~4× vs BF16, fitting 27B on a single GPU.
ThinkingCap finetune — ~50% fewer thinking tokens, same accuracy. Less reasoning = less KV cache pressure.
MTP speculative decoding — built-in draft head predicts 3 tokens at a time. ~2.6× decode speedup on top of the token savings.
Together: less memory, fewer tokens, faster decode. A single Blackwell GPU runs this stack end-to-end.