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
6a7c7711
Unverified
Commit
6a7c7711
authored
Jun 05, 2024
by
Woosuk Kwon
Committed by
GitHub
Jun 05, 2024
Browse files
[Misc] Skip for logits_scale == 1.0 (#5291)
parent
0f83ddd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vllm/model_executor/layers/logits_processor.py
vllm/model_executor/layers/logits_processor.py
+3
-2
No files found.
vllm/model_executor/layers/logits_processor.py
View file @
6a7c7711
...
...
@@ -21,7 +21,7 @@ class LogitsProcessor(nn.Module):
def
__init__
(
self
,
vocab_size
:
int
,
org_vocab_size
:
Optional
[
int
]
=
None
,
scale
:
Optional
[
float
]
=
1.0
,
scale
:
float
=
1.0
,
logits_as_input
:
bool
=
False
)
->
None
:
"""
Args:
...
...
@@ -52,7 +52,8 @@ class LogitsProcessor(nn.Module):
logits
=
self
.
_get_logits
(
hidden_states
,
embedding
,
embedding_bias
)
if
logits
is
not
None
:
logits
*=
self
.
scale
if
self
.
scale
!=
1.0
:
logits
*=
self
.
scale
# Apply logits processors (if any).
logits
=
_apply_logits_processors
(
logits
,
sampling_metadata
)
...
...
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