executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
performance-tuningTune nano-vLLM batching, KV-cache capacity, CUDA graph/eager execution, tensor parallelism, and benchmark throughput for local Qwen3 inference.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this route after a small generation smoke test works and the task is to increase throughput, fit a model/workload into VRAM, diagnose scheduler/KV-cache behavior, or compare benchmark settings. For basic prompting and output schema, start with ../offline-inference/SKILL.md.
enforce_eager=True; for throughput, test the
default CUDA graph path after eager mode is stable.max_model_len, max_num_batched_tokens, max_num_seqs, and
gpu_memory_utilization together because they determine KV-cache pressure.tensor_parallel_size=1 as the baseline. Increase it only when multiple
visible GPUs and divisible Qwen3 dimensions are available.--dry-run before loading weights.Read references/configuration.md for each knob, references/benchmarking.md for workload design, and references/troubleshooting.md for OOM, NCCL, graph capture, and benchmark-variance failures.
Nano-vLLM schedules prefill before decode. Prefill can fill the current
max_num_batched_tokens budget, and only the first waiting sequence can be
chunked when the remaining budget is smaller than its uncached prompt. Decode
steps schedule one token per running sequence, preempting sequences when no KV
block can be appended. Prefix caching hashes full KV blocks and can reuse a
matching prefix across requests.
python scripts/benchmark_generation.py \
--model /path/to/local-qwen3 \
--num-seqs 64 \
--min-input-len 64 --max-input-len 512 \
--min-output-len 32 --max-output-len 256 \
--enforce-eager \
--dry-run
Remove --dry-run only after validating the workload and environment. Use
--respect-eos for user-like runs and --ignore-eos for fixed-token
throughput comparisons. The bundled benchmark reports total requested output
tokens, elapsed time, and tokens/second; it does not claim parity with any
other backend unless the comparison controls the same workload.
SamplingParams usage to
offline inference.