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
179a619c
Unverified
Commit
179a619c
authored
Mar 18, 2025
by
Isotr0py
Committed by
GitHub
Mar 18, 2025
Browse files
[Bugfix] Fix broken CPU quantization due to triton import (#15038)
Signed-off-by:
Isotr0py
<
2037008807@qq.com
>
parent
452e8fd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vllm/model_executor/layers/quantization/gguf.py
vllm/model_executor/layers/quantization/gguf.py
+4
-1
No files found.
vllm/model_executor/layers/quantization/gguf.py
View file @
179a619c
...
@@ -10,7 +10,6 @@ from torch.nn.parameter import Parameter, UninitializedParameter
...
@@ -10,7 +10,6 @@ from torch.nn.parameter import Parameter, UninitializedParameter
from
vllm
import
_custom_ops
as
ops
from
vllm
import
_custom_ops
as
ops
from
vllm.logger
import
init_logger
from
vllm.logger
import
init_logger
from
vllm.model_executor.layers.activation
import
SiluAndMul
from
vllm.model_executor.layers.activation
import
SiluAndMul
from
vllm.model_executor.layers.fused_moe.fused_moe
import
moe_align_block_size
from
vllm.model_executor.layers.fused_moe.layer
import
(
FusedMoE
,
from
vllm.model_executor.layers.fused_moe.layer
import
(
FusedMoE
,
FusedMoEMethodBase
)
FusedMoEMethodBase
)
from
vllm.model_executor.layers.linear
import
LinearBase
,
LinearMethodBase
from
vllm.model_executor.layers.linear
import
LinearBase
,
LinearMethodBase
...
@@ -140,6 +139,10 @@ def _fused_moe_gguf(
...
@@ -140,6 +139,10 @@ def _fused_moe_gguf(
qweight_type2
:
int
,
qweight_type2
:
int
,
act
,
act
,
)
->
torch
.
Tensor
:
)
->
torch
.
Tensor
:
# lazy import to avoid triggering triton import in CPU backend
from
vllm.model_executor.layers.fused_moe.fused_moe
import
(
moe_align_block_size
)
out_hidden_states
=
torch
.
empty_like
(
x
)
out_hidden_states
=
torch
.
empty_like
(
x
)
if
qweight_type2
in
MMQ_QUANT_TYPES
and
qweight_type
in
MMQ_QUANT_TYPES
:
if
qweight_type2
in
MMQ_QUANT_TYPES
and
qweight_type
in
MMQ_QUANT_TYPES
:
num_tokens
,
_
=
x
.
shape
num_tokens
,
_
=
x
.
shape
...
...
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