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

Gemma 2: Update slow tests #31759

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

gante
Copy link
Member

@gante gante commented Jul 2, 2024

What does this PR do?

This PR:

Slow Gemma 2 tests

I'm assuming the tests weren't passing on any related PR: for instance, the expected output included special tokens like <bos>, but we decoded the generated text with skip_special_tokens=True. As we checkout to commits on main touching Gemma 2, none of the test text outputs is close to the original text -- @ArthurZucker is this expected?

The current diff changes the tests to match the output we currently obtain on main

@gante gante force-pushed the pipeline_tokenizer_kwargs branch from b650117 to 8ea703f Compare July 2, 2024 18:50
torch_device
)
model = AutoModelForCausalLM.from_pretrained(
model_id, low_cpu_mem_usage=True, torch_dtype=torch.bfloat16, attn_implementation="eager"
Copy link
Member Author

@gante gante Jul 2, 2024

Choose a reason for hiding this comment

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

Note: BF16 + attn_implementation!="eager" results in the model not being able to handle left-padding 🤯

@gante gante requested a review from LysandreJik July 2, 2024 18:52
@gante gante force-pushed the pipeline_tokenizer_kwargs branch from 8ea703f to df45283 Compare July 2, 2024 19:02
@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.

Thanks a lot for the tests update @gante!

@LysandreJik LysandreJik merged commit ddfaf11 into huggingface:main Jul 3, 2024
21 of 23 checks passed
@gante gante deleted the pipeline_tokenizer_kwargs branch July 4, 2024 09:16
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