-
Notifications
You must be signed in to change notification settings - Fork 31.1k
make test_eager_matches_sdpa_inference less flaky
#34512
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
Changes from all commits
194adfb
33022d4
a1eb7c3
a3d0b3c
dde9a4b
4684815
1e5bff9
390cc75
4535dd5
224b922
563c71b
e68f450
83175e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1263,6 +1263,9 @@ def test_dola_decoding_sample(self): | |
|
|
||
| if model.get_output_embeddings() is None: | ||
| self.skipTest("DoLa is not supported for models that don't have output embeddings") | ||
|
|
||
| logits_processor_kwargs = self._get_logits_processor_kwargs(do_sample=True, config=model.config) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do sample is random no?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am using the same value as in Yes it is random but this method is |
||
|
|
||
| # Sets dola generation arguments such that: | ||
| # a) no EOS is generated, to ensure generation doesn't break early | ||
| # b) there are at least two forward passes in the main model, to ensure the input preparation of | ||
|
|
@@ -1280,7 +1283,7 @@ def test_dola_decoding_sample(self): | |
| "use_cache": getattr(config, "use_cache", False), # Some models don't support the cache | ||
| "dola_layers": "low", | ||
| } | ||
| output_dola = model.generate(**generation_kwargs, **inputs_dict) | ||
| output_dola = model.generate(**generation_kwargs, **logits_processor_kwargs, **inputs_dict) | ||
| self._check_outputs(output_dola, model.config, use_cache=getattr(config, "use_cache", False)) | ||
|
|
||
| @pytest.mark.generate | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.