Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError bug in greedy_until "too many values to unpack" #628

Closed
danielfleischer opened this issue Jun 29, 2023 · 1 comment · Fixed by #630
Closed

ValueError bug in greedy_until "too many values to unpack" #628

danielfleischer opened this issue Jun 29, 2023 · 1 comment · Fixed by #630

Comments

@danielfleischer
Copy link

Some tokenizers (Llama, Alpaca) return more than one token for "\n" even with add_special_tokens=False. It causes a value error in:

(primary_until,) = self.tok_encode(until[0])

One can replace it with

primary_until = self.tok_encode(until[0])[0]
@haileyschoelkopf
Copy link
Contributor

Thanks for raising this, and apologies for the bug!

In our upcoming version release, we handle multi-token stop sequences in a more principled+unified way (see here).

I've patched this + added a warning for the hf-causal model in #628 , and confirmed it doesn't crop up in the hf-causal-experimental case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants