"git@developer.sourcefind.cn:orangecat/ollama.git" did not exist on "fd048f13678b66037d11c74a930c08385d269cc7"
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
for i in range(100):
print(i)
output, past = model(context, past=past)
token = torch.argmax(output[0, :])
token = torch.argmax(output[..., -1, :])
generated += [token.tolist()]
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