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
55211b01
Unverified
Commit
55211b01
authored
Mar 13, 2025
by
Szymon Ożóg
Committed by
GitHub
Mar 13, 2025
Browse files
[Bugfix] Fix chunked prefill for GGUF (#14666)
Signed-off-by:
SzymonOzog
<
szymon.ozog@aleph-alpha.com
>
parent
5d043c16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
vllm/model_executor/layers/quantization/gguf.py
vllm/model_executor/layers/quantization/gguf.py
+7
-0
No files found.
vllm/model_executor/layers/quantization/gguf.py
View file @
55211b01
...
@@ -98,6 +98,13 @@ MMQ_QUANT_TYPES = STANDARD_QUANT_TYPES | KQUANT_TYPES
...
@@ -98,6 +98,13 @@ MMQ_QUANT_TYPES = STANDARD_QUANT_TYPES | KQUANT_TYPES
def
_fuse_mul_mat
(
x
:
torch
.
Tensor
,
qweight
:
torch
.
Tensor
,
def
_fuse_mul_mat
(
x
:
torch
.
Tensor
,
qweight
:
torch
.
Tensor
,
qweight_type
:
int
)
->
torch
.
Tensor
:
qweight_type
:
int
)
->
torch
.
Tensor
:
# HACK: when doing chunked prefill we don't generate output tokens
# so input to logits generator is empty which causes invalid parameter
if
x
.
shape
[
0
]
==
0
:
return
torch
.
empty
(
x
.
shape
[
0
],
qweight
.
shape
[
0
],
dtype
=
x
.
dtype
,
device
=
x
.
device
)
# there is no need to call any kernel for fp16/bf16
# there is no need to call any kernel for fp16/bf16
if
qweight_type
in
UNQUANTIZED_TYPES
:
if
qweight_type
in
UNQUANTIZED_TYPES
:
return
x
@
qweight
.
T
return
x
@
qweight
.
T
...
...
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