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
9fde5666
You need to sign in or sign up before continuing.
Unverified
Commit
9fde5666
authored
Nov 04, 2024
by
Nicolas Patry
Committed by
GitHub
Nov 04, 2024
Browse files
Fixing linting on main. (#2719)
parent
aadc9cb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
server/text_generation_server/models/flash_causal_lm.py
server/text_generation_server/models/flash_causal_lm.py
+4
-2
No files found.
server/text_generation_server/models/flash_causal_lm.py
View file @
9fde5666
...
@@ -1729,9 +1729,11 @@ class FlashCausalLM(Model):
...
@@ -1729,9 +1729,11 @@ class FlashCausalLM(Model):
# Slots can be discontiguous when prefix caching is enabled, so we need to expand the slot_indices,
# Slots can be discontiguous when prefix caching is enabled, so we need to expand the slot_indices,
# then update the slots with the additional indices to ensure we're grabbing the ones that have been
# then update the slots with the additional indices to ensure we're grabbing the ones that have been
# allocated
# allocated
slot_indices
=
(
batch
.
slot_indices
.
unsqueeze
(
-
1
).
expand
(
B
,
new_length
)
+
arange_int
).
view
(
-
1
)
slot_indices
=
(
batch
.
slot_indices
.
unsqueeze
(
-
1
).
expand
(
B
,
new_length
)
+
arange_int
).
view
(
-
1
)
slots
=
batch
.
slots
[
slot_indices
]
slots
=
batch
.
slots
[
slot_indices
]
input_lengths
=
(
input_lengths
=
(
input_lengths
.
unsqueeze
(
-
1
).
expand
(
B
,
new_length
)
+
arange_int
input_lengths
.
unsqueeze
(
-
1
).
expand
(
B
,
new_length
)
+
arange_int
).
view
(
-
1
)
).
view
(
-
1
)
...
...
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