İçeriğe geç

FP8 Inference: vLLM SmoothQuant + TensorRT-LLM — RTX 4090'da Production-Ready

FP8 training prematur olsa da FP8 inference 2026'da production-grade. vLLM'in native FP8 (Llama 3.1+/Qwen 2.5+ destek), TensorRT-LLM SmoothQuant, AWQ-marlin INT4 vs FP8 karşılaştırma. RTX 4090'da Llama 3.1 8B FP8 dönüşüm + serving (~120 tok/s vs bf16 95).

Şükrü Yusuf KAYA
28 dakikalık okuma
İleri
FP8 Inference: vLLM SmoothQuant + TensorRT-LLM — RTX 4090'da Production-Ready

1. vLLM Native FP8 Support#

vLLM 0.6+ Llama 3.1/3.2/3.3 + Qwen 2.5+ + Gemma 3 için native FP8 destekler. SmoothQuant ile activation outlier'larını absorb eder.
# 1. Llama 3.1 8B'yi FP8'e çevir (one-shot) from llmcompressor.modifiers.quantization import GPTQModifier, SmoothQuantModifier from llmcompressor.transformers import oneshot # SmoothQuant + FP8 oneshot( model="meta-llama/Meta-Llama-3.1-8B-Instruct", recipe=[ SmoothQuantModifier(smoothing_strength=0.8), GPTQModifier(targets="Linear", scheme="FP8_DYNAMIC", ignore=["lm_head"]), ], output_dir="llama-3.1-8b-fp8", num_calibration_samples=512, ) # 2. vLLM ile serve vllm serve llama-3.1-8b-fp8 --quantization fp8

2. RTX 4090 Inference Throughput Karşılaştırma#

Quantizationtok/s (batch=1)tok/s (batch=16)tok/s (batch=64)SizeQuality (PPL)
bf1695540124016 GB5.93 ref
AWQ int417592021504.4 GB5.99 (+1.0%)
GPTQ int416587020504.5 GB6.04 (+1.9%)
FP8 (vLLM)155108025208 GB5.95 (+0.3%)
Çıkarımlar:
  • batch=1 (single user): AWQ int4 hızlı (kernel optimized)
  • batch=16+: FP8 en hızlı (memory bandwidth artar, kernel daha verimli)
  • FP8 kalite kaybı INT4'ten çok az (PPL +%0.3 vs +%1.0-1.9)
  • FP8 size INT4'ten 2x büyük (8GB vs 4.5GB)
Cookbook'un kuralı:
  • Single-user / low concurrency → AWQ int4
  • High concurrency / batch serving → FP8
✅ Teslim
  1. Llama 8B'yi FP8'e dönüştür (llmcompressor). 2) vLLM ile serve. 3) batch=1 + batch=16 throughput karşılaştır. 4) Sonraki ders: 10.9 — Calibration Dataset Engineering.

Yorumlar & Soru-Cevap

(0)
Yorum yazmak için giriş yap.
Yorumlar yükleniyor...

İlgili İçerikler