Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
652ba93d
Unverified
Commit
652ba93d
authored
Dec 05, 2025
by
Jee Jee Li
Committed by
GitHub
Dec 04, 2025
Browse files
[Bugfix] Fix FP8 MoE LoRA (#29890)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
6dcb07f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
vllm/model_executor/layers/quantization/fp8.py
vllm/model_executor/layers/quantization/fp8.py
+9
-3
No files found.
vllm/model_executor/layers/quantization/fp8.py
View file @
652ba93d
...
@@ -124,12 +124,16 @@ class Fp8MoeBackend(Enum):
...
@@ -124,12 +124,16 @@ class Fp8MoeBackend(Enum):
def
get_fp8_moe_backend
(
def
get_fp8_moe_backend
(
block_quant
:
bool
,
moe_parallel_config
:
FusedMoEParallelConfig
block_quant
:
bool
,
moe_parallel_config
:
FusedMoEParallelConfig
,
with_lora_support
:
bool
,
)
->
Fp8MoeBackend
:
)
->
Fp8MoeBackend
:
"""
"""
Select the primary FP8 MoE backend
Select the primary FP8 MoE backend
Note: Shape-specific fallbacks may still occur at runtime.
Note: Shape-specific fallbacks may still occur at runtime.
"""
"""
if
with_lora_support
:
return
Fp8MoeBackend
.
TRITON
# Prefer FlashInfer backends on supported GPUs; allow SM90 and SM100.
# Prefer FlashInfer backends on supported GPUs; allow SM90 and SM100.
if
(
if
(
current_platform
.
is_cuda
()
current_platform
.
is_cuda
()
...
@@ -665,7 +669,7 @@ class Fp8MoEMethod(FusedMoEMethodBase):
...
@@ -665,7 +669,7 @@ class Fp8MoEMethod(FusedMoEMethodBase):
self
.
weight_block_size
=
self
.
quant_config
.
weight_block_size
self
.
weight_block_size
=
self
.
quant_config
.
weight_block_size
self
.
block_quant
:
bool
=
self
.
weight_block_size
is
not
None
self
.
block_quant
:
bool
=
self
.
weight_block_size
is
not
None
self
.
fp8_backend
=
get_fp8_moe_backend
(
self
.
fp8_backend
=
get_fp8_moe_backend
(
self
.
block_quant
,
layer
.
moe_parallel_config
self
.
block_quant
,
layer
.
moe_parallel_config
,
self
.
moe
.
is_lora_enabled
)
)
self
.
marlin_input_dtype
=
None
self
.
marlin_input_dtype
=
None
...
@@ -1084,6 +1088,7 @@ class Fp8MoEMethod(FusedMoEMethodBase):
...
@@ -1084,6 +1088,7 @@ class Fp8MoEMethod(FusedMoEMethodBase):
from
vllm.model_executor.layers.fused_moe
import
(
from
vllm.model_executor.layers.fused_moe
import
(
BatchedDeepGemmExperts
,
BatchedDeepGemmExperts
,
BatchedTritonExperts
,
BatchedTritonExperts
,
TritonExperts
,
TritonOrDeepGemmExperts
,
TritonOrDeepGemmExperts
,
)
)
...
@@ -1116,7 +1121,8 @@ class Fp8MoEMethod(FusedMoEMethodBase):
...
@@ -1116,7 +1121,8 @@ class Fp8MoEMethod(FusedMoEMethodBase):
num_dispatchers
=
prepare_finalize
.
num_dispatchers
(),
num_dispatchers
=
prepare_finalize
.
num_dispatchers
(),
quant_config
=
self
.
moe_quant_config
,
quant_config
=
self
.
moe_quant_config
,
)
)
elif
self
.
moe
.
is_lora_enabled
:
return
TritonExperts
(
quant_config
=
self
.
moe_quant_config
)
elif
self
.
flashinfer_moe_backend
==
FlashinferMoeBackend
.
CUTLASS
:
elif
self
.
flashinfer_moe_backend
==
FlashinferMoeBackend
.
CUTLASS
:
# Select GEMM experts with block-scale when weights are block-quantized
# Select GEMM experts with block-scale when weights are block-quantized
experts
=
select_cutlass_fp8_gemm_impl
(
experts
=
select_cutlass_fp8_gemm_impl
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment