计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
performance-tuning【效率与协作】Tune nano-vLLM batching, KV-cache capacity, CUDA graph/eager execution, tensor parallelism, and benchmark throughput for local Qwen3 inference.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.