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
OpenDAS
text-generation-inference
Commits
8655cfb0
Commit
8655cfb0
authored
Apr 30, 2024
by
huangwb
Browse files
fix param s=1 benchmark crash bug
parent
25e8c688
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
server/text_generation_server/models/flash_causal_lm.py
server/text_generation_server/models/flash_causal_lm.py
+2
-0
No files found.
server/text_generation_server/models/flash_causal_lm.py
100644 → 100755
View file @
8655cfb0
...
@@ -169,11 +169,13 @@ class FlashCausalLMBatch(Batch):
...
@@ -169,11 +169,13 @@ class FlashCausalLMBatch(Batch):
requests_idx_mapping
[
r
.
id
]
=
i
requests_idx_mapping
[
r
.
id
]
=
i
tokenized_input
=
tokenized_input
[
-
r
.
truncate
:]
tokenized_input
=
tokenized_input
[
-
r
.
truncate
:]
'''fix input s=1 crash bug
if (
if (
tokenized_input[0] == tokenizer.bos_token_id
tokenized_input[0] == tokenizer.bos_token_id
and tokenized_input[1] == tokenizer.bos_token_id
and tokenized_input[1] == tokenizer.bos_token_id
):
):
tokenized_input = tokenized_input[1:]
tokenized_input = tokenized_input[1:]
'''
input_length
=
len
(
tokenized_input
)
input_length
=
len
(
tokenized_input
)
input_lengths
.
append
(
input_length
)
input_lengths
.
append
(
input_length
)
...
...
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