Antigravity BYOM · Cloud Run GPU · vllm/vllm-openai v0.32

vLLM knobs,
explained.

Every argument in --args for Qwen3.8-27B-FP8 on one NVIDIA RTX PRO 6000 (96 GB), grouped by what it actually moves: GPU memory and KV-cache capacity, the per-step scheduler, prefix reuse across agent turns, and the OpenAI-compatible request pipeline. Drag the sliders to see what each knob trades away.

memory / KV cache scheduler / latency caching OpenAI API shape serving / identity
01

Where 96 GB goes — and how much becomes KV cache

vLLM loads the weights, profiles one worst-case forward pass at --max-num-batched-tokens, reserves CUDA graphs, then hands everything left under --gpu-memory-utilization to the paged KV cache. The KV cache is what sets how many tokens can be resident at once; --max-model-len and --max-num-seqs then decide how that pool is sliced.

Knobs

Share of VRAM vLLM may claim. The rest is headroom for the CUDA context, allocator fragmentation and NCCL/driver buffers.
Max prompt + output tokens per request. Requests beyond this get HTTP 400.
Bytes per K and V element. FP8 halves KV footprint → 2× resident tokens.
Max sequences scheduled per step. Also sizes the per-sequence Mamba/SSM state for hybrid layers.
Drives the activation peak measured during profiling.
Antigravity conversations with tool output usually sit in the 30–120K range. Used for the seat chart.

VRAM allocation at startup

024 GB48 GB72 GB96 GB
KV cache budget
—GB
what's left after weights, activations, graphs, SSM state
Resident token capacity
—
≈ bytes/token at this dtype
Full-context sequences
—×
capacity ÷ --max-model-len (vLLM logs this as "Maximum concurrency")
Binding constraint
—
at the chosen session size

Seat chart — concurrent agent sessions

Each box is one slot up to --max-num-seqs. Amber = fits in KV cache at the session size above; red = slot exists but KV cache would be exhausted (vLLM preempts/recomputes instead of crashing). Cloud Run --concurrency=16 is matched to --max-num-seqs 16 so the proxy never queues more than vLLM can co-schedule.

02

Chunked prefill: one big prompt vs. everyone else's next token

Each scheduler step may process at most --max-num-batched-tokens. With --enable-chunked-prefill, a 100K-token prompt is sliced into chunks that share each step with the decode tokens of other running sequences, so nobody's streaming stalls. Without it, one giant prefill step freezes every other stream.

Knobs

With prefix caching, only the uncached suffix is prefilled — see §03.
Step-time model: ≈ 6 ms fixed + 0.013 ms per batched token on this GPU — illustrative, not benchmarked.

Scheduler timeline (one request arriving)

Prefill steps
—
Time to first token
—ms
for the new request
Worst inter-token gap
—ms
felt by sequences already streaming

Raising --max-num-batched-tokens shortens TTFT for long prompts but (a) raises the activation peak in §01 and (b) lengthens each step, so streaming output stutters more. 8384 is a comfortable middle for a single-user agent on a 96 GB card; --performance-mode interactivity (§04) biases the kernels the same direction.

03

Prefix caching: why an agent loop hits 85% reuse

An agent client resends the whole conversation every turn: system prompt, 15 tool schemas, all prior messages, all tool outputs, plus a new suffix. --enable-prefix-caching hashes KV blocks so the shared prefix is looked up instead of recomputed. For a hybrid model (attention + Gated-DeltaNet/Mamba layers) the recurrent state can't be sliced per token, so --mamba-cache-mode align checkpoints SSM state on block boundaries and a hit resumes from the last aligned boundary.

Knobs

Without align, hybrid models can't reuse prefixes at all: attention blocks might match, but the SSM state must be rebuilt from token 0, so vLLM recomputes everything.
Tool call + tool result + assistant text. Base prefix (system + tool schemas) fixed at 9K.

KV blocks per turn  (1 block = 1,024 tokens for display; real block = 16 tokens)

Prefix-cache hit rate
—%
cached ÷ total prompt tokens across all turns (README observed 85.6%)
Prefill work saved
—tokens
tokens never recomputed
TTFT on last turn
—ms
vs. cold prefill

Cached blocks live inside the same KV pool from §01 and are evicted LRU when new requests need room — so a bigger KV budget also means a longer-lived cache. Hashes include the block's full prefix, so two different conversations never collide.

04

--performance-mode interactivity

A preset that selects kernels and CUDA-graph granularity. It doesn't change capacity; it changes how each step is executed. Click a mode to compare.

05

From raw tokens to OpenAI deltas

Antigravity speaks wireProtocol: "openai": it sends tools: [...] and expects reasoning_content and tool_calls deltas in the SSE stream. Three flags turn the model's raw text into that shape. Get a parser wrong and the client either sees <think> garbage in the answer or never receives a tool call.

Model output (raw)

Qwen3 emits thinking, then prose, then an XML-ish tool block.

<think>need to read the file first…</think>
I'll open it.
<tool_call>
<function=read_file>
<parameter=path>README.md</parameter>
</function>
</tool_call>

--reasoning-parser qwen3

Streams everything inside <think>…</think> as delta.reasoning_content; the rest as delta.content. Antigravity renders the former as a collapsible thought and never feeds it back as answer text.

{"delta":{"reasoning_content":"need to read…"}}
{"delta":{"content":"I'll open it."}}

--tool-call-parser qwen3_coder

Recognises the <function=…><parameter=…> grammar (not plain JSON), coerces parameter types against the tool schema, and emits incremental tool_calls deltas.

{"delta":{"tool_calls":[{"index":0,
 "function":{"name":"read_file",
 "arguments":"{\"path\":\"README.md\"}"}}]}}

--enable-auto-tool-choice

Lets the server honour tool_choice: "auto" (the default clients send). Without it vLLM rejects requests carrying tools unless tool_choice names one function — and agent loops send 15 tools every turn.

finish_reason: "tool_calls"

--served-model-name

The ID advertised by GET /v1/models and required in "model". Antigravity discovers it (Tier 3) and uses it as modelId; a mismatch returns 404 model not found.

{"data":[{"id":"Qwen3.8-27B",
 "max_model_len":262144}]}
06

Argument reference

One card per flag, in command order. The ↑ / ↓ rows say what happens if you turn the knob up or down from the deployed value.