Skip to content

Commit

Permalink
Revert "Change rolling batch generations order (#1046)" (#1048)
Browse files Browse the repository at this point in the history
This reverts commit 7f9b9a8.
  • Loading branch information
xyang16 authored Sep 1, 2023
1 parent 086ec90 commit 70bbe55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _prefill_and_decode(self, new_batch):
if self.cache:
decode_generations, decode_next_batch = self.model.generate_token(
self.cache)
decode_generations.extend(generations)
generations.extend(decode_generations)

# concatenate with the existing batch of the model
if prefill_next_batch is None:
Expand All @@ -141,7 +141,7 @@ def _prefill_and_decode(self, new_batch):
self.cache = prefill_next_batch
else:
self.cache = self.model.batch_type.concatenate(
[decode_next_batch, prefill_next_batch])
[prefill_next_batch, decode_next_batch])
else:
self.cache = prefill_next_batch
else:
Expand Down

0 comments on commit 70bbe55

Please sign in to comment.