Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
28873a27
Unverified
Commit
28873a27
authored
Aug 31, 2023
by
Aman Gupta Karmani
Committed by
GitHub
Aug 31, 2023
Browse files
Improve _prune_hidden_states micro-benchmark (#707)
parent
0080d832
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
vllm/model_executor/layers/sampler.py
vllm/model_executor/layers/sampler.py
+2
-1
No files found.
vllm/model_executor/layers/sampler.py
View file @
28873a27
...
...
@@ -100,7 +100,8 @@ def _prune_hidden_states(
start_idx
+=
prompt_len
last_token_indicies
.
extend
(
range
(
start_idx
,
start_idx
+
input_metadata
.
num_generation_tokens
))
return
hidden_states
[
last_token_indicies
]
return
hidden_states
.
index_select
(
0
,
torch
.
tensor
(
last_token_indicies
,
device
=
hidden_states
.
device
))
def
_get_penalties
(
...
...
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