Commit fd639e5b authored by Lysandre's avatar Lysandre
Browse files

Correct quickstart example when using the past

parent 63a5399b
...@@ -209,7 +209,7 @@ past = None ...@@ -209,7 +209,7 @@ past = None
for i in range(100): for i in range(100):
print(i) print(i)
output, past = model(context, past=past) output, past = model(context, past=past)
token = torch.argmax(output[0, :]) token = torch.argmax(output[..., -1, :])
generated += [token.tolist()] generated += [token.tolist()]
context = token.unsqueeze(0) context = token.unsqueeze(0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment