Skip to content

Commit

Permalink
Fixing linting on main.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Nov 4, 2024
1 parent aadc9cb commit b81231c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/text_generation_server/models/flash_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,9 +1729,11 @@ def forward(
# 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
# 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]

input_lengths = (
input_lengths.unsqueeze(-1).expand(B, new_length) + arange_int
).view(-1)
Expand Down

0 comments on commit b81231c

Please sign in to comment.