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
157f9c13
Unverified
Commit
157f9c13
authored
Aug 08, 2025
by
Cyrus Leung
Committed by
GitHub
Aug 07, 2025
Browse files
Fix pre-commit (#22487)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
6f287915
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vllm/model_executor/models/minicpmo.py
vllm/model_executor/models/minicpmo.py
+2
-2
No files found.
vllm/model_executor/models/minicpmo.py
View file @
157f9c13
...
...
@@ -589,7 +589,7 @@ class MiniCPMO(MiniCPMV2_6):
ret
=
torch
.
zeros
(
size
,
size
,
device
=
device
,
dtype
=
torch
.
bool
)
# Vectorized computation of row indices and chunk boundaries
row_indices
=
torch
.
arange
(
size
,
device
=
device
)
chunk_indices
=
row_indices
//
chunk_size
chunk_indices
=
row_indices
//
chunk_size
if
num_left_chunks
<
0
:
# If num_left_chunks < 0, start is always 0 for all rows
start_indices
=
torch
.
zeros_like
(
row_indices
)
...
...
@@ -597,7 +597,7 @@ class MiniCPMO(MiniCPMV2_6):
# Compute start indices vectorially
start_chunk_indices
=
torch
.
clamp
(
chunk_indices
-
num_left_chunks
,
min
=
0
)
start_indices
=
start_chunk_indices
*
chunk_size
start_indices
=
start_chunk_indices
*
chunk_size
# Compute ending indices vectorially
end_chunk_indices
=
chunk_indices
+
1
end_indices
=
torch
.
clamp
(
end_chunk_indices
*
chunk_size
+
...
...
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