Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6682c23
[Bugfix] Add error handling for FINISHED_ERROR in OpenAIServing (#37148)
chaunceyjiang Mar 16, 2026
55e6d3d
[Bugfix] Make siglip/clip compatible with transformers v5 (#37200)
zucchini-nlp Mar 16, 2026
ca1954d
[Bugfix] Disable cross-layer KV cache for MLA attention backends (#37…
haosdent Mar 16, 2026
9f9ecff
Add simple granite4 tool parser (#36827)
maxdebayser Mar 16, 2026
c88ea83
[MTP][Sparse MLA] Take advantage of native MTP support in indexer whe…
MatthewBonanni Mar 16, 2026
f5c081d
[PD][Nixl] Add support for hybrid SSM-FA models (#36687)
NickLucche Mar 16, 2026
0fefd00
[Bugfix] Fix render server crash for quantized models on CPU-only hos…
sagearc Mar 16, 2026
714c6e0
[torch.compile][BE] Modify cudagraph callable to check for is_forward…
Lucaskabela Mar 16, 2026
dfa8852
[Refactor] Consolidate GPT-OSS reasoning parser tests (#36915)
sfeng33 Mar 16, 2026
2cc26c3
[CI][BugFix][MORI][AMD] Add transfer_id to kv transfer params for tes…
rasmith Mar 16, 2026
93f3c8e
[Misc] Add `float16` to `CacheDType` (#37199)
MatthewBonanni Mar 16, 2026
d157216
[BUGFIX][Mamba] Use uint64 for address in KVBlockZeroer (#37197)
jikunshang Mar 16, 2026
2dccb38
[Bugfix][MultiConnector] Fix MultiConnector for SupportsHMA sub-conne…
ZhanqiuHu Mar 16, 2026
e6ae4b1
[compile] Enable mega aot artifact for torch 2.12+. (#37198)
zhxchen17 Mar 16, 2026
c0f0119
[Bugfix] opcheck false mutation error in rms_norm_per_block_quant (#3…
KrxGu Mar 16, 2026
fd4d963
Fix eplb nvfp4 experts hook (#37217)
elvircrn Mar 16, 2026
e5b8076
[Quant][Feature] Support online MXFP8 quantization for MoE and dense …
EdalatiAli Mar 16, 2026
a3a51d2
[Benchmark] Improvements to attention benchmark script (#37115)
wzhao18 Mar 16, 2026
31a458c
[Doc] Clarify schema enforcement behavior for tool_choice modes (#37064)
cemigo114 Mar 16, 2026
4f9b14c
[CI] Stabilize multinode DP internal LB completion tests (#36356)
AndreasKaratzas Mar 16, 2026
7961486
Fix EagleMistralLarge3Model initialization (#37232)
juliendenize Mar 16, 2026
3e6a1e1
[Custom Ops] Add functional + out variant for scaled_fp4_quant (#34389)
tianrengao Mar 16, 2026
263091b
Support temporal compression for videos
netanel-haber Feb 23, 2026
2e3bf70
chunk parakeet into 30s clips to prevent OOMs on long audios
netanel-haber Mar 10, 2026
cb5414d
Fix ambiguous num_blocks for hybrid attn mamba
collinmccarthy Mar 13, 2026
5666186
Re-add "This is a video:" to all video prompts to match training
collinmccarthy Mar 17, 2026
962500d
Better fix for batched videos w/ bs>1
collinmccarthy Mar 17, 2026
9efa01c
Re-add getattr for video_temporal_patch_size for v2 support
collinmccarthy Mar 17, 2026
c4f2da5
fix: force RADIO ViT LayerScale (ls1/ls2) to 1.0 after weight load
aroshanghias-nvd May 1, 2026
74706bf
Merge pull request #6 from collinmccarthy/bugfix/radio-layerscale-init
aroshanghias-nvd May 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 54 additions & 16 deletions benchmarks/attention_benchmarks/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
is_mla_backend,
)

from vllm.v1.worker.workspace import init_workspace_manager


def run_standard_attention_benchmark(config: BenchmarkConfig) -> BenchmarkResult:
"""Run standard attention benchmark (Flash/Triton/FlashInfer)."""
Expand Down Expand Up @@ -462,7 +464,7 @@ def main():
parser.add_argument(
"--batch-specs",
nargs="+",
default=["q2k", "8q1s1k"],
default=None,
help="Batch specifications using extended grammar",
)

Expand All @@ -478,6 +480,21 @@ def main():
parser.add_argument("--repeats", type=int, default=1, help="Repetitions")
parser.add_argument("--warmup-iters", type=int, default=3, help="Warmup iterations")
parser.add_argument("--profile-memory", action="store_true", help="Profile memory")
parser.add_argument(
"--kv-cache-dtype",
default="auto",
choices=["auto", "fp8"],
help="KV cache dtype: auto or fp8",
)
parser.add_argument(
"--cuda-graphs",
action=argparse.BooleanOptionalAction,
default=True,
help=(
"Launch kernels with CUDA graphs to eliminate CPU overhead"
"in measurements (default: True)"
),
)

# Parameter sweep (use YAML config for advanced sweeps)
parser.add_argument(
Expand Down Expand Up @@ -536,21 +553,24 @@ def main():

# Batch specs and sizes
# Support both explicit batch_specs and generated batch_spec_ranges
if "batch_spec_ranges" in yaml_config:
# Generate batch specs from ranges
generated_specs = generate_batch_specs_from_ranges(
yaml_config["batch_spec_ranges"]
)
# Combine with any explicit batch_specs
if "batch_specs" in yaml_config:
args.batch_specs = yaml_config["batch_specs"] + generated_specs
else:
args.batch_specs = generated_specs
console.print(
f"[dim]Generated {len(generated_specs)} batch specs from ranges[/]"
)
elif "batch_specs" in yaml_config:
args.batch_specs = yaml_config["batch_specs"]
# CLI --batch-specs takes precedence over YAML when provided.
cli_batch_specs_provided = args.batch_specs is not None
if not cli_batch_specs_provided:
if "batch_spec_ranges" in yaml_config:
# Generate batch specs from ranges
generated_specs = generate_batch_specs_from_ranges(
yaml_config["batch_spec_ranges"]
)
# Combine with any explicit batch_specs
if "batch_specs" in yaml_config:
args.batch_specs = yaml_config["batch_specs"] + generated_specs
else:
args.batch_specs = generated_specs
console.print(
f"[dim]Generated {len(generated_specs)} batch specs from ranges[/]"
)
elif "batch_specs" in yaml_config:
args.batch_specs = yaml_config["batch_specs"]

if "batch_sizes" in yaml_config:
args.batch_sizes = yaml_config["batch_sizes"]
Expand All @@ -575,6 +595,10 @@ def main():
args.warmup_iters = yaml_config["warmup_iters"]
if "profile_memory" in yaml_config:
args.profile_memory = yaml_config["profile_memory"]
if "kv_cache_dtype" in yaml_config:
args.kv_cache_dtype = yaml_config["kv_cache_dtype"]
if "cuda_graphs" in yaml_config:
args.cuda_graphs = yaml_config["cuda_graphs"]

# Parameter sweep configuration
if "parameter_sweep" in yaml_config:
Expand Down Expand Up @@ -629,12 +653,18 @@ def main():
# Determine backends
backends = args.backends or ([args.backend] if args.backend else ["flash"])
prefill_backends = getattr(args, "prefill_backends", None)
if not args.batch_specs:
args.batch_specs = ["q2k", "8q1s1k"]
console.print(f"Backends: {', '.join(backends)}")
if prefill_backends:
console.print(f"Prefill backends: {', '.join(prefill_backends)}")
console.print(f"Batch specs: {', '.join(args.batch_specs)}")
console.print(f"KV cache dtype: {args.kv_cache_dtype}")
console.print(f"CUDA graphs: {args.cuda_graphs}")
console.print()

init_workspace_manager(args.device)

# Run benchmarks
all_results = []

Expand Down Expand Up @@ -687,6 +717,8 @@ def main():
repeats=args.repeats,
warmup_iters=args.warmup_iters,
profile_memory=args.profile_memory,
kv_cache_dtype=args.kv_cache_dtype,
use_cuda_graphs=args.cuda_graphs,
)

# Add decode pipeline config
Expand Down Expand Up @@ -839,6 +871,8 @@ def main():
"repeats": args.repeats,
"warmup_iters": args.warmup_iters,
"profile_memory": args.profile_memory,
"kv_cache_dtype": args.kv_cache_dtype,
"use_cuda_graphs": args.cuda_graphs,
}
all_results = run_model_parameter_sweep(
backends,
Expand All @@ -861,6 +895,8 @@ def main():
"repeats": args.repeats,
"warmup_iters": args.warmup_iters,
"profile_memory": args.profile_memory,
"kv_cache_dtype": args.kv_cache_dtype,
"use_cuda_graphs": args.cuda_graphs,
}
all_results = run_parameter_sweep(
backends, args.batch_specs, base_config_args, args.parameter_sweep, console
Expand Down Expand Up @@ -891,6 +927,8 @@ def main():
repeats=args.repeats,
warmup_iters=args.warmup_iters,
profile_memory=args.profile_memory,
kv_cache_dtype=args.kv_cache_dtype,
use_cuda_graphs=args.cuda_graphs,
)

result = run_benchmark(config)
Expand Down
5 changes: 5 additions & 0 deletions benchmarks/attention_benchmarks/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ class BenchmarkConfig:
profile_memory: bool = False
use_cuda_graphs: bool = False

# "auto" or "fp8"
kv_cache_dtype: str = "auto"

# MLA-specific
prefill_backend: str | None = None
kv_lora_rank: int | None = None
Expand Down Expand Up @@ -369,6 +372,7 @@ def save_csv(self, results: list[BenchmarkResult], path: str):
"backend",
"batch_spec",
"num_layers",
"kv_cache_dtype",
"mean_time",
"std_time",
"throughput",
Expand All @@ -382,6 +386,7 @@ def save_csv(self, results: list[BenchmarkResult], path: str):
"backend": r.config.backend,
"batch_spec": r.config.batch_spec,
"num_layers": r.config.num_layers,
"kv_cache_dtype": r.config.kv_cache_dtype,
"mean_time": r.mean_time,
"std_time": r.std_time,
"throughput": r.throughput_tokens_per_sec or 0,
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/attention_benchmarks/configs/mla_mixed_batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ batch_specs:
- "2q16k_32q1s4k" # 2 very large prefill + 32 decode

# Context extension + decode
- "2q1kkv2k_16q1s1k" # 2 extend + 16 decode
- "4q2kkv4k_32q1s2k" # 4 extend + 32 decode
- "2q1kkv8k_32q1s2k" # 2 large extend + 32 decode
- "2q1ks2k_16q1s1k" # 2 extend + 16 decode
- "4q2ks4k_32q1s2k" # 4 extend + 32 decode
- "2q1ks8k_32q1s2k" # 2 large extend + 32 decode

# Explicitly chunked prefill
- "q8k" # 8k prefill with chunking hint
Expand Down
58 changes: 58 additions & 0 deletions benchmarks/attention_benchmarks/configs/mla_sparse_decode.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# MLA decode-only benchmark configuration

model:
name: "deepseek-v3"
num_layers: 60
num_q_heads: 128 # Base value, can be swept for TP simulation
num_kv_heads: 1 # MLA uses single latent KV
head_dim: 576
kv_lora_rank: 512
qk_nope_head_dim: 128
qk_rope_head_dim: 64
v_head_dim: 128
block_size: 128 # CUTLASS MLA and FlashAttn MLA use 128

# Model parameter sweep: simulate tensor parallelism by varying num_q_heads
# TP=1: 128 heads, TP=2: 64 heads, TP=4: 32 heads, TP=8: 16 heads
model_parameter_sweep:
param_name: "num_q_heads"
values: [128, 64, 32, 16]
label_format: "{backend}_{value}h"

batch_specs:
# Small batches, varying sequence lengths
- "16q1s512" # 16 requests, 512 KV cache
- "16q1s1k" # 16 requests, 1k KV cache
- "16q1s2k" # 16 requests, 2k KV cache
- "16q1s4k" # 16 requests, 4k KV cache

# Medium batches
- "32q1s1k" # 32 requests, 1k KV cache
- "32q1s2k" # 32 requests, 2k KV cache
- "32q1s4k" # 32 requests, 4k KV cache
- "32q1s8k" # 32 requests, 8k KV cache

# Large batches
- "64q1s1k" # 64 requests, 1k KV cache
- "64q1s2k" # 64 requests, 2k KV cache
- "64q1s4k" # 64 requests, 4k KV cache
- "64q1s8k" # 64 requests, 8k KV cache

# Very large batches
- "128q1s1k" # 128 requests, 1k KV cache
- "128q1s2k" # 128 requests, 2k KV cache
- "128q1s4k" # 128 requests, 4k KV cache
- "128q1s8k" # 128 requests, 8k KV cache

# Long context
- "32q1s16k" # 32 requests, 16k KV cache
- "32q1s32k" # 32 requests, 32k KV cache

backends:
- FLASHMLA_SPARSE
- FLASHINFER_MLA_SPARSE

device: "cuda:0"
repeats: 100
warmup_iters: 10
profile_memory: true
Loading