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
80d85c5d
Unverified
Commit
80d85c5d
authored
Nov 17, 2024
by
电脑星人
Committed by
GitHub
Nov 17, 2024
Browse files
[Bugfix] Fix mrope_position_delta in non-last prefill chunk (#10403)
Signed-off-by:
imkero
<
kerorek@outlook.com
>
parent
76aab90a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
vllm/model_executor/layers/rotary_embedding.py
vllm/model_executor/layers/rotary_embedding.py
+1
-1
No files found.
vllm/model_executor/layers/rotary_embedding.py
View file @
80d85c5d
...
@@ -922,9 +922,9 @@ class MRotaryEmbedding(RotaryEmbedding):
...
@@ -922,9 +922,9 @@ class MRotaryEmbedding(RotaryEmbedding):
torch
.
arange
(
text_len
).
view
(
1
,
-
1
).
expand
(
3
,
-
1
)
+
st_idx
)
torch
.
arange
(
text_len
).
view
(
1
,
-
1
).
expand
(
3
,
-
1
)
+
st_idx
)
llm_positions
=
torch
.
cat
(
llm_pos_ids_list
,
dim
=
1
).
reshape
(
3
,
-
1
)
llm_positions
=
torch
.
cat
(
llm_pos_ids_list
,
dim
=
1
).
reshape
(
3
,
-
1
)
llm_positions
=
llm_positions
[:,
context_len
:
seq_len
]
mrope_position_delta
=
(
llm_positions
.
max
()
+
1
-
mrope_position_delta
=
(
llm_positions
.
max
()
+
1
-
len
(
input_tokens
)).
item
()
len
(
input_tokens
)).
item
()
llm_positions
=
llm_positions
[:,
context_len
:
seq_len
]
return
llm_positions
.
tolist
(),
mrope_position_delta
return
llm_positions
.
tolist
(),
mrope_position_delta
...
...
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