Skip to content

Commit

Permalink
[fix] Fix for neuron rolling batch CI error (deepjavalibrary#1938)
Browse files Browse the repository at this point in the history
  • Loading branch information
tosterberg authored May 21, 2024
1 parent 28d0480 commit 4d283a8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ def make_generations(
generated_tokens=slot_request.slot.generated_tokens,
finish_reason=finish_reason,
seed=slot_request.slot.seed)
# mark the slot as available
slot_request.slot.clear()
generation = Generation(
request_id=slot_request.slot.request_id,
prefill_tokens=None,
Expand All @@ -174,6 +172,9 @@ def make_generations(
in slot_request.slot.special_tokens),
generated_text=generated_text,
speculated_generations=SpeculatedGenerationsQueue())
if finish_reason is not None:
# mark the slot as available
slot_request.slot.clear()
return generation, finish_reason

def _generate_token(self, inputs: GenerationInputs) -> List[Generation]:
Expand Down

0 comments on commit 4d283a8

Please sign in to comment.