Skip to content

Add optional tokenizer paramers to generation #1534

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jkuntzer
Copy link

The title and the changes speak for themselves, I hope. In my case, this change was necessary to handle a bug with the Gemma 3 models whose fix involves passing additional parameters to the tokenizer when encoding the prompt. However, I think my changes allow for overall greater flexibility.

I didn't run the tests locally because it's a minimal change and I couldn't be bothered to install all of the additional libraries. I did run the pre-commit though and got no errors.

@RobinPicard
Copy link
Contributor

RobinPicard commented Apr 13, 2025

Hi @jkuntzer, thanks for opening a PR! We are close to releasing the v1 of Outlines that will modify the interface of models. Would you mind testing out the models that cause this issue with the v1 branch please?

@jkuntzer
Copy link
Author

Hi @RobinPicard, sure I can give it a try. However, the bug is not related to outlines; it's an inherent model problem in the transformers library, I believe. The problem was that I couldn't implement the fix in outlines.

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 this pull request may close these issues.

2 participants