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
gaoqiong
flash-attention
Commits
7a3bd55f
Commit
7a3bd55f
authored
Aug 26, 2023
by
Tri Dao
Browse files
[Gen] Fix decode function not using top_p during iterative decoding
parent
847abe65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
flash_attn/utils/generation.py
flash_attn/utils/generation.py
+1
-1
No files found.
flash_attn/utils/generation.py
View file @
7a3bd55f
...
...
@@ -173,7 +173,7 @@ def decode(
teacher_outputs
is
None
or
teacher_output_len
<=
inference_params
.
sequence_len_offset
+
1
):
next_token
=
sample
(
logits
,
top_k
=
top_k
,
temperature
=
temperature
)
next_token
=
sample
(
logits
,
top_k
=
top_k
,
top_p
=
top_p
,
temperature
=
temperature
)
else
:
next_token
=
teacher_outputs
[:,
inference_params
.
sequence_len_offset
+
1
]
sequences
.
append
(
next_token
)
...
...
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