-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fp8 vs bf16 performance problem #38
Comments
Hi @AllenDou there are no performant kernels used in this library as its main goal is to produce quantized checkpoints to run in vLLM. Look to use your saved quantized checkpoint in vLLM for performance gain: https://docs.vllm.ai/en/latest/quantization/fp8.html |
Yes, the charts above were obtained by running vllm serving with LLM(model=xxx, quantization="fp8") (https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/layers/quantization/fp8.py), indicating that vllm's high-performance fp8 kernel was used. |
Btw, are there any test cases in vLLM that compare the performance fp8 matrix multiplication against bf16 matrix multiplication? |
@AllenDou I'm curious what GPU are you using? The sizes you are testing are really really small. We generally benchmark with matrix sizes of Llama 8B or 70B |
thanks for your response, the GPU I used is L20, and I've create a PR under vllm project to test bfloat16 and fp8 performance, vllm-project/vllm#7459 |
After quantizing an AutoModelForSequenceClassification model using autofp8, I observed a slight drop in performance. The left chart shows the inference time for bf16 linear layers, while the right chart shows the combined scale and matrix multiplication time for fp8. As shown, the fp8 scale and mm time is approximately double of bf16. Is this expected behavior? Or could the autofp8 team provide guidance on improving performance.
The text was updated successfully, but these errors were encountered: