sglang: [Bug] Some FP8 models fail to load
Checklist
- 1. I have searched related issues but cannot get the expected help.
- 2. The bug has not been fixed in the latest version.
- 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
- 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
- 5. Please use English, otherwise it will be closed.
Describe the bug
Sglang crashes when loading some FP8 models. I only got Qwen3 FP8 model work, but not others from RedHatAI: WORKS: https://huggingface.co/Qwen/Qwen3-32B-FP8
DO NOT WORK https://huggingface.co/RedHatAI/Mistral-Small-3.1-24B-Instruct-2503-FP8-dynamic https://huggingface.co/RedHatAI/Qwen3-32B-FP8-dynamic https://huggingface.co/RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8-dynamic https://huggingface.co/RedHatAI/gemma-3-27b-it-FP8-dynamic
Reproduction
python3.12 -m venv .venv
source .venv/bin/activate.fish
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install "sglang[all]>=0.4.7.post1"
python -m uv pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
python -m uv pip install --force-reinstall sgl_kernel-0.1.9+cu128-cp39-abi3-manylinux2014_x86_64.whl
python -m uv pip install -U nvidia-nccl-cu12
WORKS with Qwen3-4B normal fp16 -tp 1
CUDA_VISIBLE_DEVICES=2 python -m sglang.launch_server --model-path /mnt/llms/models/Qwen/Qwen3-4B --tp 1 --context-length 2048 --port 5001 --host 0.0.0.0
WORKS with Qwen3-4B-FP8 -tp 1 (I have to add SGL_ENABLE_JIT_DEEPGEMM=0)
SGL_ENABLE_JIT_DEEPGEMM=0 CUDA_VISIBLE_DEVICES=2 python -m sglang.launch_server --model-path /mnt/llms/models/Qwen/Qwen3-4B-FP8/ --tp 1 --context-length 2048 --port 5001 --host 0.0.0.0
DOES NOT Work with RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8-dynamic
SGL_ENABLE_JIT_DEEPGEMM=0 CUDA_VISIBLE_DEVICES=2 python -m sglang.launch_server --model-path /mnt/llms/models/RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8-dynamic/ --tp 1 --context-length 2048 --port 5001 --host 0.0.0.0
Environment
python3 -m sglang.check_env
Python: 3.12.11 (main, Jun 4 2025, 08:56:18) [GCC 11.4.0]
CUDA available: True
GPU 0,1,3,5: NVIDIA GeForce RTX 3090
GPU 2,4: NVIDIA GeForce RTX 5090
GPU 0,1,3,5 Compute Capability: 8.6
GPU 2,4 Compute Capability: 12.0
CUDA_HOME: /usr/local/cuda-12.8
NVCC: Cuda compilation tools, release 12.8, V12.8.93
CUDA Driver Version: 575.57.08
PyTorch: 2.7.1+cu128
sglang: 0.4.7.post1
sgl_kernel: 0.1.9
flashinfer_python: 0.2.6.post1
triton: 3.3.1
transformers: 4.52.3
torchao: 0.9.0
numpy: 2.3.1
aiohttp: 3.12.13
fastapi: 0.115.13
hf_transfer: 0.1.9
huggingface_hub: 0.33.0
interegular: 0.3.3
modelscope: 1.27.1
orjson: 3.10.18
outlines: 0.1.11
packaging: 25.0
psutil: 7.0.0
pydantic: 2.11.7
python-multipart: 0.0.20
pyzmq: 27.0.0
uvicorn: 0.34.3
uvloop: 0.21.0
vllm: Module Not Found
xgrammar: 0.1.19
openai: 1.91.0
tiktoken: 0.9.0
anthropic: 0.55.0
litellm: 1.73.0
decord: 0.6.0
NVIDIA Topology:
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X NODE NODE NODE NODE NODE 0-47 0 N/A
GPU1 NODE X NODE NODE NODE NODE 0-47 0 N/A
GPU2 NODE NODE X PHB NODE NODE 0-47 0 N/A
GPU3 NODE NODE PHB X NODE NODE 0-47 0 N/A
GPU4 NODE NODE NODE NODE X PHB 0-47 0 N/A
GPU5 NODE NODE NODE NODE PHB X 0-47 0 N/A
Legend:
X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks
ulimit soft: 1024
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 16
I will look into the problem later this week
we are working on removing the vLLM dependency of quantization. that might help resolve the vLLM issue.
no, its not working. I updated everything to yesterdays release, version sglang 0.4.8 and sgl_kernel 0.2.0:
SGL_ENABLE_JIT_DEEPGEMM=0 CUDA_VISIBLE_DEVICES=2,4 python -m sglang.launch_server --model-path /mnt/llms/models/RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8-dynamic/ --tp 2 --context-length 2048 --port 5001 --host 0.0.0.0Output error: