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

Better pipeline defaults #34026

Merged
merged 8 commits into from
Oct 24, 2024
Merged

Better pipeline defaults #34026

merged 8 commits into from
Oct 24, 2024

Conversation

ArthurZucker
Copy link
Collaborator

What does this PR do?

>>> from transformers import pipeline
>>> pipe = pipeline("text-generation", model="meta-llama/Llama-3.2-1B")
>>> pipe("Hey how are you doing my lord? Let's have fun! More and more tokens should be done. However long the input is")
Setting `pad_token_id` to `eos_token_id`:None for open-end generation.
[{'generated_text': "Hey how are you doing my lord? Let's have fun! More and more tokens should be done. However long the input is."}]

this no longer fails saying that max_length is 20. We always generate 20 tokens more than the input.
Also device should be inferred automatically

@ArthurZucker ArthurZucker marked this pull request as ready for review October 8, 2024 11:17
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok!

@ArthurZucker ArthurZucker merged commit 0586381 into main Oct 24, 2024
19 of 24 checks passed
@ArthurZucker ArthurZucker deleted the nit-max-length branch October 24, 2024 09:11
@ArthurZucker ArthurZucker changed the title Better defaults Better pipeline defaults Oct 24, 2024
@zucchini-nlp zucchini-nlp mentioned this pull request Oct 28, 2024
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.

3 participants