adds jais2 model support#42684
Conversation
|
Hi @sarathc-cerebras, thank you for the PR! The main thing missing is a conversion to modular format. You can look at the modular files for other models to see how it works, but it reduces the size of the PR a lot by importing duplicated code from other models. |
377e2b8 to
ab785fc
Compare
|
@Rocketknight1 thanks for bringing this up, i have updated it to use the modular format |
2ae7204 to
672e38a
Compare
|
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. |
9e0839b to
7dfa45e
Compare
Rocketknight1
left a comment
There was a problem hiding this comment.
Yes, this looks good! I made a few comments but they're small.
a363e45 to
e363470
Compare
vasqu
left a comment
There was a problem hiding this comment.
Left some comments, I think we can still simplify a bit and update a few things to be up to date with our current standards. Overall, looking really good already tho
2f9713c to
5090c18
Compare
ArthurZucker
left a comment
There was a problem hiding this comment.
LGTM good review @vasqu small nits but let's go!
| generated_text = self.tokenizer.decode(generated_ids[0], skip_special_tokens=True) | ||
| print(f"Static cache generated text: {generated_text}") | ||
|
|
||
| self.assertGreater(generated_ids.shape[1], input_ids.shape[1]) |
There was a problem hiding this comment.
would be better to have explicit expected outputs here!
efed368 to
f4a67f3
Compare
vasqu
left a comment
There was a problem hiding this comment.
Please check out the comments from the last review, mostly nits otherwise and let's make the tests more explicit (I've linked an example in one of the review comments)
10a5980 to
bf97684
Compare
vasqu
left a comment
There was a problem hiding this comment.
Last comments from my side (I hope), small fixes and finishing touches
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
9398ddb to
506d4fd
Compare
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
|
run-slow: jais2 |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, jais2 |
|
This comment contains models: ["models/jais2"] |
CI Results✅ No failing test specific to this PR 🎉 ! |
|
View the CircleCI Test Summary for this PR: https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=42684&sha=8860cb |
|
do i need to do anything else for PR to be merged @vasqu or it will be merged from one of the reviewers? |
|
@sarathc-cerebras merged now, sorry about that. The CI blocked but it isn't related to your PR 🤗 |
* adds jais2 model support * updates tests * addresses review comment * review comments addressed * addresses test review comments * fixes date * format issue fix * Update src/transformers/models/jais2/__init__.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * Update src/transformers/models/jais2/modular_jais2.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * Update tests/models/jais2/test_modeling_jais2.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * Update src/transformers/models/jais2/modular_jais2.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * Update src/transformers/models/jais2/modular_jais2.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * Update src/transformers/models/jais2/modular_jais2.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * Update src/transformers/models/jais2/modular_jais2.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * Update src/transformers/models/jais2/modular_jais2.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * fixes tests as per review comment * updates layernorm setup * Apply suggestions from code review Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * addressed review comments and updated tests as recomended * fixup tests --------- Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> Co-authored-by: vasqu <antonprogamer@gmail.com>
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.