vllm.benchmarks.throughput
¶
Benchmark offline inference throughput.
Functions:
-
assign_loras–Attach a LoRA request to each sample (throughput-only post-processing).
-
run_vllm_chat–Run vLLM chat benchmark. This function is recommended ONLY for benchmarking
-
validate_args–Validate command-line arguments.
_to_serve_args(args)
¶
Translate throughput args into a namespace the shared get_samples reads.
get_samples (used by bench serve) expects ~45 attributes; the
throughput CLI exposes most of them under the same names, and this adapter
fills the rest while preserving throughput's existing flag names so no
script breaks.
Parameters:
Returns:
-
Namespace–A namespace satisfying get_samples's attribute reads.
Source code in vllm/benchmarks/throughput.py
assign_loras(requests, args)
¶
Attach a LoRA request to each sample (throughput-only post-processing).
The shared datasets.get_samples path carries no LoRA information, so
LoRA assignment is applied here, uniformly across every dataset type. No-op
when --lora-path is unset.
Source code in vllm/benchmarks/throughput.py
run_vllm_chat(requests, n, engine_args, do_profile, disable_detokenize=False, warmup_requests=None, prequeue_requests=False)
¶
Run vLLM chat benchmark. This function is recommended ONLY for benchmarking multimodal models as it properly handles multimodal inputs and chat formatting. For non-multimodal models, use run_vllm() instead.
Source code in vllm/benchmarks/throughput.py
validate_args(args)
¶
Validate command-line arguments.
Source code in vllm/benchmarks/throughput.py
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 | |