Skip to content

Commit

Permalink
Add an option to turn off cache in PyTorch
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Mar 14, 2023
1 parent cd55920 commit fa53655
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
text="Alan Turing theorized that computers would one day become very powerful, but even he could not imagine"
print("Generating")
t1 = clock()
g = generator(text, do_sample=False, max_new_tokens=20)
g = generator(text, do_sample=False, max_new_tokens=20, use_cache=True)
t2 = clock()
print(" Time: ", t2-t1)
output = g[0]["generated_text"]
Expand Down

0 comments on commit fa53655

Please sign in to comment.