mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 03:44:54 +00:00
formatting
This commit is contained in:
parent
c25fd1e2e8
commit
651403c325
@ -418,7 +418,9 @@ class Seq2SeqLM(Model):
|
|||||||
decoder_input_ids,
|
decoder_input_ids,
|
||||||
) in enumerate(iterator):
|
) in enumerate(iterator):
|
||||||
# Select next token
|
# Select next token
|
||||||
next_token_id, logprobs = next_token_chooser(decoder_input_ids.view(1, -1), logits)
|
next_token_id, logprobs = next_token_chooser(
|
||||||
|
decoder_input_ids.view(1, -1), logits
|
||||||
|
)
|
||||||
|
|
||||||
# Append next token to decoder tokens
|
# Append next token to decoder tokens
|
||||||
decoder_input_ids = torch.cat([decoder_input_ids, next_token_id])
|
decoder_input_ids = torch.cat([decoder_input_ids, next_token_id])
|
||||||
|
Loading…
Reference in New Issue
Block a user