@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 3f627ebef7
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

[Misc] usage_stats: report more engine, spec-decode, and EP config (#44595)

Signed-off-by: Zach Xi <zachary.xi@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>

Zachary Xi committed Jun 8, 2026 at 15:20 UTC 3f627ebef757e5d575fc33c64250adbc2f2973b4
1 file changed +44 -4
vllm/v1/utils.py
+44 -4
@@ -638,29 +638,54 @@ def report_usage_stats(
638
639 from vllm.model_executor.model_loader import get_architecture_class_name
640
641 + model_config = vllm_config.model_config
642 + scheduler_config = vllm_config.scheduler_config
643 parallel_config = vllm_config.parallel_config
644 + attention_config = vllm_config.attention_config
645 + compilation_config = vllm_config.compilation_config
646 + speculative_config = vllm_config.speculative_config
647
648 # Prepare KV connector string if applicable
649 kv_connector = None
650 if vllm_config.kv_transfer_config is not None:
651 kv_connector = vllm_config.kv_transfer_config.kv_connector
652
653 + # Attention backend is None when set to "auto" (resolved at runtime per platform).
654 + attention_backend = (
655 + attention_config.backend.name if attention_config.backend is not None else None
656 + )
657 +
658 + # CompilationMode is an IntEnum; report the name for readability in dashboards.
659 + compilation_mode = (
660 + compilation_config.mode.name if compilation_config.mode is not None else None
661 + )
662 +
663 + # Speculative decoding fields default to None when spec decode is disabled.
664 + spec_decode_method = (
665 + speculative_config.method if speculative_config is not None else None
666 + )
667 + num_speculative_tokens = (
668 + speculative_config.num_speculative_tokens
669 + if speculative_config is not None
670 + else None
671 + )
672 +
673 usage_message.report_usage(
649 - get_architecture_class_name(vllm_config.model_config),
674 + get_architecture_class_name(model_config),
675 usage_context,
676 extra_kvs={
677 # Common configuration
653 - "dtype": str(vllm_config.model_config.dtype),
678 + "dtype": str(model_config.dtype),
679 "block_size": vllm_config.cache_config.block_size,
680 "gpu_memory_utilization": vllm_config.cache_config.gpu_memory_utilization,
681 "kv_cache_memory_bytes": vllm_config.cache_config.kv_cache_memory_bytes,
682 # Quantization
658 - "quantization": vllm_config.model_config.quantization,
683 + "quantization": model_config.quantization,
684 "kv_cache_dtype": str(vllm_config.cache_config.cache_dtype),
685 # Feature flags
686 "enable_lora": bool(vllm_config.lora_config),
687 "enable_prefix_caching": vllm_config.cache_config.enable_prefix_caching,
663 - "enforce_eager": vllm_config.model_config.enforce_eager,
688 + "enforce_eager": model_config.enforce_eager,
689 "disable_custom_all_reduce": parallel_config.disable_custom_all_reduce,
690 # Distributed parallelism settings
691 "tensor_parallel_size": parallel_config.tensor_parallel_size,
@@ -671,6 +696,21 @@ def report_usage_stats(
696 "all2all_backend": parallel_config.all2all_backend,
697 # KV connector used
698 "kv_connector": kv_connector,
699 + # Batching limits — tuning knobs operators commonly override
700 + "max_model_len": model_config.max_model_len,
701 + "max_num_seqs": scheduler_config.max_num_seqs,
702 + "max_num_batched_tokens": scheduler_config.max_num_batched_tokens,
703 + # Attention backend (user-requested; None = auto-selected at runtime)
704 + "attention_backend": attention_backend,
705 + # torch.compile mode (e.g. NONE, STOCK_TORCH_COMPILE, VLLM_COMPILE)
706 + "compilation_mode": compilation_mode,
707 + # Speculative decoding configuration
708 + "spec_decode_method": spec_decode_method,
709 + "num_speculative_tokens": num_speculative_tokens,
710 + # Wide expert parallel: load balancer + redundant/total expert counts
711 + "enable_eplb": parallel_config.enable_eplb,
712 + "num_redundant_experts": parallel_config.eplb_config.num_redundant_experts,
713 + "num_experts": model_config.get_num_experts(),
714 },
715 )
716