Add madlad-400 MT models
Author: jbochi
Pull request: yes

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Fixes #26696 


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?


## 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.

@ArthurZucker 

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier

Library:

- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100

Integrations:

- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada

Documentation: @stevhliu and @MKhalusova

HF projects:

- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Maintained examples (not research project or legacy):

- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1

 -->


Comments:
Thanks for adding @jbochi! Let us know when you're ready for a review.

I've set the failed tests to re-run as it seems there was a transient connection error causing them to fail.  

Thanks for re-running the tests, @amyeroberts . 

The PR is ready for review. I don't think the previous failure was related to my changes.

The tests passed this time. 😌 

I think we can transfer all MT models now and merge this PR.

Maybe I will work on LM models later, but I am not sure.

What do you think?

On Thu, Nov 16, 2023, 8:15 AM amyeroberts ***@***.***> wrote:

> ***@***.**** commented on this pull request.
> ------------------------------
>
> In docs/source/en/model_doc/madlad-400.md
> <https://github.com/huggingface/transformers/pull/27471#discussion_r1395676523>
> :
>
> > +- [jbochi/madlad400-3b-mt](https://huggingface.co/jbochi/madlad400-3b-mt)
> +
> +- [jbochi/madlad400-7b-mt](https://huggingface.co/jbochi/madlad400-7b-mt)
> +
> +- [jbochi/madlad400-7b-mt-bt](https://huggingface.co/jbochi/madlad400-7b-mt-bt)
> +
> +- [jbochi/madlad400-10b-mt](https://huggingface.co/jbochi/madlad400-10b-mt)
>
> OK - let me know when it's ready. We'll do this as the last step before
> merging
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/pull/27471#discussion_r1395676523>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AACHO2FLM2AV6ITIUQ63O23YEYGY5AVCNFSM6AAAAAA7JISLSCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMZUGM2DONBZGE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


Thank you for filling out the model cards so beautifully 🙏 

Thanks for the review!

Hi @jbochi. Apologies for the delay in getting back to you - I'm also learning about the intricacies of org weights too! For the model weights, would you prefer that we move the original checkpoint repos directly under google or duplicate, so that yours still exist under your profile? 

Hey. No worries. I think it's better to move them (assuming people will be
redirected if they go to mine).

On Thu, Nov 23, 2023, 4:50 AM amyeroberts ***@***.***> wrote:

> Hi @jbochi <https://github.com/jbochi>. Apologies for the delay in
> getting back to you - I'm also learning about the intricacies of org
> weights too! For the model weights, would you prefer that we move the
> original checkpoint repos directly under google or duplicate, so that yours
> still exist under your profile?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/pull/27471#issuecomment-1824089430>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AACHO2AT3SW7LP3R6SLGTVTYF4L5VAVCNFSM6AAAAAA7JISLSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUGA4DSNBTGA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


@jbochi If they're moved then they wouldn't exist under your profile any more at all. I believe it would error-out saying that the repo doesn't exist if someone tried: `AutoTokenizer.from_pretrained("jbochi/madlad400-3b-mt")`. Is this still OK or would you rather we copy? 

In this case, can we copy them instead? Thanks

On Fri, Nov 24, 2023, 12:45 PM amyeroberts ***@***.***> wrote:

> @jbochi <https://github.com/jbochi> If they're moved then they wouldn't
> exist under your profile any more at all. I believe it would error-out
> saying that the repo doesn't exist if someone tried:
> AutoTokenizer.from_pretrained("jbochi/madlad400-3b-mt"). Is this still OK
> or would you rather we copy?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/pull/27471#issuecomment-1825955848>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AACHO2CTUUN2QO6SMH62K63YGDMNLAVCNFSM6AAAAAA7JISLSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVHE2TKOBUHA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


@jbochi Yep! All done. I've set the doc tests to re-run which should pass now the google checkpoints exist 🤞 

Yay! Thank you!

On Mon, Nov 27, 2023, 11:03 AM amyeroberts ***@***.***> wrote:

> @jbochi <https://github.com/jbochi> Yep! All done. I've set the doc tests
> to re-run which should pass now the google checkpoints exist 🤞
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/pull/27471#issuecomment-1828133135>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AACHO2ARZDBRUO4SS2AAVBDYGS2VHAVCNFSM6AAAAAA7JISLSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGEZTGMJTGU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


@jbochi One last final update - the doctests are failing with a timeout. Could you add the model doc page `madlad-400.md` to the [not_doctested.txt](https://github.com/huggingface/transformers/blob/ce315081340fdf6846f16c321eb53878b6272d53/utils/not_doctested.txt#L4) page? 

> @jbochi One last final update - the doctests are failing with a timeout. Could you add the model doc page `madlad-400.md` to the [not_doctested.txt](https://github.com/huggingface/transformers/blob/ce315081340fdf6846f16c321eb53878b6272d53/utils/not_doctested.txt#L4) page?

Sure. Done!

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_27471). All of your documentation changes will be reflected on that endpoint.

@jbochi Awesome - thanks again for adding! 

Thanks for the review and all the help, @amyeroberts