This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
API footgun: infer_next_token
still works after end of text
#44
Labels
issue:bug
Something isn't working
In llamacord, I have some logic that calls
infer_next_token
in a loop. Unfortunately, I didn't check for EOT - so the code would keep generating tokens and producing (fascinatingly well-structured) garbage. I think we should probably check if the last token is EOT and return an error? If you feed it a prompt, the EOT would no longer be the last token, and you should be able to infer without issues. (I wonder if A[EOT]B infers differently to AB...)The text was updated successfully, but these errors were encountered: