NVIDIA H100 GPU üzerinde Qwen3-32B işlem hacmi optimizasyonu Sonuç
H100 GPU üzerinde Qwen3-32B işlem hacmini optimize etmek için önerilen yapılandırma:
Model sunum komutu trtllm-serve Qwen/Qwen3-32B-FP8 --max_seq_len= 40960 --enable_chunked_prefill
Optimizasyon öncesi ve sonrası benchmark sonuçlarının karşılaştırması:
Benchmark senaryosu temel yapılandırma (optimizasyonsuz vLLM) Optimize edilmiş ShareGPT Toplam TPS: 2352.82 Ortalama TPOT(ms): 88.09 Toplam TPS: 4284.68 (+82.1%) Ortalama TPOT(ms): 158.64 Kısa istem Toplam TPS: 4005.62 Ortalama TPOT(ms): 1169.72 Toplam TPS: 6826.33 (+70.4%) Ortalama TPOT(ms): 890.11 Orta uzunlukta istem Toplam TPS: 3195.30 Ortalama TPOT(ms): 86.62 Toplam TPS: 5901.95 (+84.7%) Ortalama TPOT(ms): 223.40 Uzun istem Toplam TPS: 2148.69 Ortalama TPOT(ms): 66.61 Toplam TPS: 4929.16 (+129.4%) Ortalama TPOT(ms): 138.75 Çok uzun istem Toplam TPS: 2771.81 Ortalama TPOT(ms): 43.42 Toplam TPS: 4068.16 (+10.7%) Ortalama TPOT(ms): 286.97
Not
Benchmark testlerimiz olası tüm optimizasyon birleşimlerini kapsamaz. Örneğin, varsayılan yapılandırmasında en iyi performansı gösteren çıkarım motorunu sonraki ayarlamalar için başlangıç noktası olarak seçeriz. Bu eleme yaklaşımı yerel bir optimum verir; bu, genel optimum olmayabilir. En büyük toplu iş boyutu, zamanlama yapılandırması, genişletilmiş KV önbelleği, CUDA graph, Torch Compile gibi belirli kullanım senaryolarına bağlı başka optimizasyonlar da vardır. Bu belgedeki sonuçlar, daha hedefli optimizasyonlar için başlangıç noktası olabilir. Testler belirli donanım ve yazılım yapılandırmalarında yürütülmüştür. Çıkarım motorlarındaki gelişmeler sonuçları değiştirebilir. Nicemleme doğruluğu etkileyebilir; ancak FP8 nicemleme çoğu modelde %1'den az doğruluk kaybı sağlayabilir. Ayrıntılar için değerlendirme sonuçlarına bakın. Bu nedenle yüksek işlem hacimli sunum senaryolarında FP8 nicemleme önemle önerilir. Eksik noktalar veya yeni değişiklikleri yansıtacak güncellemeler varsa bize bildirin .
Optimizasyon hedefi Yüksek eş zamanlı isteklerde yüksek işlem hacmi sağlar.
Deney kurulumu Model Qwen3-32B
Donanım Tek NVIDIA H100 SXM GPU.
Motor sürümü vLLM: v0.11.0 SGLang: v0.5.5.post1 TensorRT-LLM : v1.2.0rc1 Benchmark veri kümesi ShareGPT Farklı dizi uzunluklarına sahip rastgele veri kümesi: Çok uzun istem: 32000 giriş token'ı, 100 çıkış token'ı Uzun istem: 4000 giriş token'ı, 200 çıkış token'ı Orta uzunlukta istem: 2000 giriş token'ı, 100 çıkış token'ı Kısa istem: 128 giriş token'ı, 4 çıkış token'ı Benchmark betiği Model performansını ölçmek için vLLM bench CLI aracını kullanıyoruz. Benchmark şu komutla çalıştırılır:
# Prepare the ShareGPT dataset
wget https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered/resolve/main/ShareGPT_V3_unfiltered_cleaned_split.json
# Benchmark on ShareGPT dataset
vllm bench serve --model Qwen/Qwen3-32B --backend openai-chat --endpoint /v1/chat/completions --dataset-name sharegpt --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 1000
# Benchmark on random dataset (fixed seed for reproducibility)
vllm bench serve --model Qwen/Qwen3-32B --backend openai-chat --endpoint /v1/chat/completions --dataset-name random --random-input-len 4000 --random-output-len 200 --num-prompts 500 --seed 42
Deney sonuçları 1. Çıkarım motoru seçimi vLLM
Model sunum betiği vllm serve Qwen/Qwen3-32B
Benchmark sonucu ============ Serving Benchmark Result ============
Successful requests: 1000
Benchmark duration (s): 178.01
Total input tokens: 217393
Total generated tokens: 201422
Request throughput (req/s): 5.62
Output token throughput (tok/s): 1131.55
Peak output token throughput (tok/s): 2360.00
Peak concurrent requests: 1000.00
Total Token throughput (tok/s): 2352.82
---------------Time to First Token----------------
Mean TTFT (ms): 78118.74
Median TTFT (ms): 77291.46
P99 TTFT (ms): 153161.51
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 88.09
Median TPOT (ms): 70.72
P99 TPOT (ms): 378.18
---------------Inter-token Latency----------------
Mean ITL (ms): 69.76
Median ITL (ms): 50.20
P99 ITL (ms): 277.93
==================================================
SGLang
Model sunum betiği python3 -m sglang.launch_server --model-path Qwen/Qwen3-32B
Benchmark sonucu ============ Serving Benchmark Result ============
Successful requests: 1000
Benchmark duration (s): 247.94
Total input tokens: 217393
Total generated tokens: 201826
Request throughput (req/s): 4.03
Output token throughput (tok/s): 814.03
Peak output token throughput (tok/s): 1329.00
Peak concurrent requests: 1000.00
Total Token throughput (tok/s): 1690.84
---------------Time to First Token----------------
Mean TTFT (ms): 115690.30
Median TTFT (ms): 117738.49
P99 TTFT (ms): 230503.32
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 57.86
Median TPOT (ms): 54.19
P99 TPOT (ms): 95.84
---------------Inter-token Latency----------------
Mean ITL (ms): 56.25
Median ITL (ms): 43.94
P99 ITL (ms): 207.79
==================================================
TensorRT-LLM
Model sunum betiği trtllm-serve Qwen/Qwen3-32B
Benchmark sonucu ============ Serving Benchmark Result ============
Successful requests: 1000
Benchmark duration (s): 157.59
Total input tokens: 217393
Total generated tokens: 201723
Request throughput (req/s): 6.35
Output token throughput (tok/s): 1280.04
Peak output token throughput (tok/s): 1958.00
Peak concurrent requests: 1000.00
Total Token throughput (tok/s): 2659.50
---------------Time to First Token----------------
Mean TTFT (ms): 65281.52
Median TTFT (ms): 65325.76
P99 TTFT (ms): 133106.50
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 61.90
Median TPOT (ms): 59.59
P99 TPOT (ms): 121.97
---------------Inter-token Latency----------------
Mean ITL (ms): 59.22
Median ITL (ms): 47.89
P99 ITL (ms): 214.01
==================================================
Sonuç: TensorRT-LLM (2659.50 tok/s) > vLLM (2352.82 tok/s) > SGLang (1690.84 tok/s)
2. TensorRT-LLM için Quantization FP8
Model sunum betiği python3 -m sglang.launch_server --model-path Qwen/Qwen3-32B-FP8
Benchmark sonucu ============ Serving Benchmark Result ============
Successful requests: 1000
Benchmark duration (s): 104.55
Total input tokens: 217393
Total generated tokens: 201376
Request throughput (req/s): 9.56
Output token throughput (tok/s): 1926.06
Peak output token throughput (tok/s): 4391.00
Peak concurrent requests: 1000.00
Total Token throughput (tok/s): 4005.32
---------------Time to First Token----------------
Mean TTFT (ms): 35510.55
Median TTFT (ms): 31577.26
P99 TTFT (ms): 79653.82
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 205.13
Median TPOT (ms): 119.96
P99 TPOT (ms): 1141.98
---------------Inter-token Latency----------------
Mean ITL (ms): 118.32
Median ITL (ms): 86.53
P99 ITL (ms): 1195.28
==================================================
3. TensorRT-LLM için Parçalı prefill'i etkinleştirme Model sunum betiği trtllm-serve Qwen/Qwen3-32B-FP8 --max_seq_len= 40960 --enable_chunked_prefill
Benchmark sonucu ============ Serving Benchmark Result ============
Successful requests: 1000
Benchmark duration (s): 97.74
Total input tokens: 217393
Total generated tokens: 201376
Request throughput (req/s): 10.23
Output token throughput (tok/s): 2060.40
Peak output token throughput (tok/s): 4371.00
Peak concurrent requests: 1000.00
Total Token throughput (tok/s): 4284.68
---------------Time to First Token----------------
Mean TTFT (ms): 31208.75
Median TTFT (ms): 25003.73
P99 TTFT (ms): 72827.99
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 158.64
Median TPOT (ms): 115.67
P99 TPOT (ms): 993.03
---------------Inter-token Latency----------------
Mean ITL (ms): 107.04
Median ITL (ms): 85.28
P99 ITL (ms): 569.95
==================================================
Optimizasyon seçeneklerinin özeti Optimizasyon seçeneği İşlem hacmi iyileşmesi Motor seçimi +13.0% Quantization +50.6% Parçalı prefill'i etkinleştirme +7.0%
Diğer benchmark senaryoları Optimize edilmiş yapılandırmanın farklı iş yüklerine genellenebilirliğini değerlendirmek için ek benchmark testleri yaptık.
Temel model sunum betiği vllm serve Qwen/Qwen3-32B
Temel benchmark sonuçları # random 32K input
============ Serving Benchmark Result ============
Successful requests: 100
Benchmark duration ( s) : 1157 .25
Total input tokens: 3200000
Total generated tokens: 7681
Request throughput ( req/s) : 0 .09
Output token throughput ( tok/s) : 6 .64
Peak output token throughput ( tok/s) : 24 .00
Peak concurrent requests: 100 .00
Total Token throughput ( tok/s) : 2771 .81
---------------Time to First Token----------------
Mean TTFT ( ms) : 585981 .22
Median TTFT ( ms) : 582757 .65
P99 TTFT ( ms) : 1144686 .57
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 43 .42
Median TPOT ( ms) : 43 .36
P99 TPOT ( ms) : 44 .34
---------------Inter-token Latency----------------
Mean ITL ( ms) : 42 .86
Median ITL ( ms) : 43 .30
P99 ITL ( ms) : 46 .54
==================================================
# random 4K input
============ Serving Benchmark Result ============
Successful requests: 500
Benchmark duration ( s) : 976 .29
Total input tokens: 1997942
Total generated tokens: 99790
Request throughput ( req/s) : 0 .51
Output token throughput ( tok/s) : 102 .21
Peak output token throughput ( tok/s) : 186 .00
Peak concurrent requests: 500 .00
Total Token throughput ( tok/s) : 2148 .69
---------------Time to First Token----------------
Mean TTFT ( ms) : 482284 .21
Median TTFT ( ms) : 483375 .28
P99 TTFT ( ms) : 956141 .26
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 66 .61
Median TPOT ( ms) : 62 .08
P99 TPOT ( ms) : 100 .86
---------------Inter-token Latency----------------
Mean ITL ( ms) : 66 .29
Median ITL ( ms) : 43 .38
P99 ITL ( ms) : 1395 .23
==================================================
# random 2K input
============ Serving Benchmark Result ============
Successful requests: 500
Benchmark duration ( s) : 328 .04
Total input tokens: 998175
Total generated tokens: 50000
Request throughput ( req/s) : 1 .52
Output token throughput ( tok/s) : 152 .42
Peak output token throughput ( tok/s) : 359 .00
Peak concurrent requests: 500 .00
Total Token throughput ( tok/s) : 3195 .30
---------------Time to First Token----------------
Mean TTFT ( ms) : 163909 .40
Median TTFT ( ms) : 164148 .38
P99 TTFT ( ms) : 322980 .86
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 86 .62
Median TPOT ( ms) : 84 .24
P99 TPOT ( ms) : 131 .41
---------------Inter-token Latency----------------
Mean ITL ( ms) : 85 .97
Median ITL ( ms) : 44 .80
P99 ITL ( ms) : 1462 .05
==================================================
# random 128 input
============ Serving Benchmark Result ============
Successful requests: 1000
Benchmark duration ( s) : 32 .88
Total input tokens: 127698
Total generated tokens: 4000
Request throughput ( req/s) : 30 .42
Output token throughput ( tok/s) : 121 .66
Peak output token throughput ( tok/s) : 522 .00
Peak concurrent requests: 1000 .00
Total Token throughput ( tok/s) : 4005 .62
---------------Time to First Token----------------
Mean TTFT ( ms) : 21648 .67
Median TTFT ( ms) : 21342 .36
P99 TTFT ( ms) : 32678 .31
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 1169 .72
Median TPOT ( ms) : 1292 .78
P99 TPOT ( ms) : 1417 .05
---------------Inter-token Latency----------------
Mean ITL ( ms) : 877 .29
Median ITL ( ms) : 1141 .11
P99 ITL ( ms) : 1435 .80
==================================================
Optimize edilmiş model sunum betiği trtllm-serve Qwen/Qwen3-32B-FP8 --max_seq_len= 40960 --enable_chunked_prefill
Optimize edilmiş benchmark sonuçları # random 32K input
============ Serving Benchmark Result ============
Successful requests: 100
Benchmark duration ( s) : 788 .52
Total input tokens: 3200000
Total generated tokens: 7832
Request throughput ( req/s) : 0 .13
Output token throughput ( tok/s) : 9 .93
Peak output token throughput ( tok/s) : 104 .00
Peak concurrent requests: 100 .00
Total Token throughput ( tok/s) : 4068 .16
---------------Time to First Token----------------
Mean TTFT ( ms) : 396294 .90
Median TTFT ( ms) : 397717 .15
P99 TTFT ( ms) : 778540 .06
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 286 .97
Median TPOT ( ms) : 255 .80
P99 TPOT ( ms) : 581 .09
---------------Inter-token Latency----------------
Mean ITL ( ms) : 284 .98
Median ITL ( ms) : 39 .76
P99 ITL ( ms) : 2105 .62
==================================================
# random 4K input
============ Serving Benchmark Result ============
Successful requests: 500
Benchmark duration ( s) : 425 .60
Total input tokens: 1997942
Total generated tokens: 99888
Request throughput ( req/s) : 1 .17
Output token throughput ( tok/s) : 234 .70
Peak output token throughput ( tok/s) : 828 .00
Peak concurrent requests: 500 .00
Total Token throughput ( tok/s) : 4929 .16
---------------Time to First Token----------------
Mean TTFT ( ms) : 208082 .20
Median TTFT ( ms) : 204136 .20
P99 TTFT ( ms) : 415000 .76
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 138 .75
Median TPOT ( ms) : 141 .52
P99 TPOT ( ms) : 151 .74
---------------Inter-token Latency----------------
Mean ITL ( ms) : 138 .01
Median ITL ( ms) : 45 .37
P99 ITL ( ms) : 1254 .20
==================================================
# random 2K input
============ Serving Benchmark Result ============
Successful requests: 500
Benchmark duration ( s) : 177 .60
Total input tokens: 998175
Total generated tokens: 50000
Request throughput ( req/s) : 2 .82
Output token throughput ( tok/s) : 281 .53
Peak output token throughput ( tok/s) : 1529 .00
Peak concurrent requests: 500 .00
Total Token throughput ( tok/s) : 5901 .95
---------------Time to First Token----------------
Mean TTFT ( ms) : 86596 .60
Median TTFT ( ms) : 86629 .72
P99 TTFT ( ms) : 171842 .84
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 223 .40
Median TPOT ( ms) : 237 .63
P99 TPOT ( ms) : 249 .66
---------------Inter-token Latency----------------
Mean ITL ( ms) : 221 .16
Median ITL ( ms) : 49 .40
P99 ITL ( ms) : 1216 .32
==================================================
# random 128 input
============ Serving Benchmark Result ============
Successful requests: 1000
Benchmark duration ( s) : 19 .29
Total input tokens: 127698
Total generated tokens: 4000
Request throughput ( req/s) : 51 .83
Output token throughput ( tok/s) : 207 .33
Peak output token throughput ( tok/s) : 860 .00
Peak concurrent requests: 1000 .00
Total Token throughput ( tok/s) : 6826 .33
---------------Time to First Token----------------
Mean TTFT ( ms) : 10718 .84
Median TTFT ( ms) : 10511 .60
P99 TTFT ( ms) : 19055 .52
-----Time per Output Token ( excl. 1st token) ------
Mean TPOT ( ms) : 890 .11
Median TPOT ( ms) : 949 .23
P99 TPOT ( ms) : 1351 .38
---------------Inter-token Latency----------------
Mean ITL ( ms) : 667 .57
Median ITL ( ms) : 925 .89
P99 ITL ( ms) : 1854 .09
==================================================