Skip to content

Conversation

@younesbelkada
Copy link
Contributor

Small modifications

  • Modified docstring on tests
  • Added correct revision on 350m model
  • removed right padding left padding test

cc @ydshieh @NouamaneTazi @Muennighoff

younesbelkada and others added 2 commits July 18, 2022 11:48
- add correct revision
- corrected dosctring for test
- removed a test
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
Co-authored-by: Nouamane Tazi <nouamane98@gmail.com>
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 18, 2022

The documentation is not available anymore as the PR was closed or merged.


path_350m = "bigscience/bloom-350m"
model = BloomForCausalLM.from_pretrained(path_350m, use_cache=True).cuda()
model = BloomForCausalLM.from_pretrained(path_350m, use_cache=True, revision="gs555750").cuda()
Copy link
Member

Choose a reason for hiding this comment

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

What does the revision argument do? Are we sure we want to add that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this argument loads the model from the initial model we were using when designing those tests: https://huggingface.co/bigscience/bloom-350m/tree/gs555750
@Muennighoff recently wanted to push the newest weights of 350m so just adding the revision flag should prevent us breaking those tests

@younesbelkada younesbelkada requested a review from sgugger July 18, 2022 15:53
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes!

tokenizer.decode(greedy_output_without_pad[0, :-3], skip_special_tokens=True),
)

@slow
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you just explain why this test is removed please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following a discussion that we had on Slack, it appears that one should always use padding_side=left
Here is a link that quickly summarizes the issue: #17963 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for clarifying!

tokenizer.decode(greedy_output_without_pad[0, :-3], skip_special_tokens=True),
)

@slow
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for clarifying!

@younesbelkada younesbelkada merged commit 6a1b1bf into huggingface:main Jul 18, 2022
viclzhu pushed a commit to viclzhu/transformers that referenced this pull request Jul 20, 2022
* minor fixes

- add correct revision
- corrected dosctring for test
- removed a test

* contrib credits

Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
Co-authored-by: Nouamane Tazi <nouamane98@gmail.com>

Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
Co-authored-by: Nouamane Tazi <nouamane98@gmail.com>
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.

4 participants