noamaanMulla-03/transformers-issues huggingface dataset:
[i18n-ar] Translated file : `docs/source/ar/perf_infer_gpu_one.md` into Arabic
Author: AhmedAlmaghz
Pull request: yes


## What does this PR do?
Translated the `docs/source/ar/perf_infer_gpu_one.md` file of the documentation to `Arabic العربية`. I use transformers for my side-project and wanted to contribute. As a beginner, this seemed appropriate.

### Some questions:

- I can't access the pr documentation endpoint for `Arabic العربية`. Is there a missing step?
- I left all the other files alone after copying the English docs. Is this acceptable for future updates or should I add contents to the `_toctree.yml` only when translation is complete? Should I delete all other files for a cleaner review?
- In `Arabic`, people use both `Transformer` and `المحولات` to describe the model. However, as this is more of a product of HuggingFace I opted not to translate it. May you please let me know which you would prefer?

Thank you in advance for your review.

Part of #32435

### Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?

 ### Who can review?
 @stevhliu , @MKhalusova , @abodacs, may you please review this PR?
 

Comments:
[i18n-ar] Translated file : `docs/source/ar/perf_infer_cpu.md` into Arabic
Author: AhmedAlmaghz
Pull request: yes


## What does this PR do?
Translated the `docs/source/ar/perf_infer_cpu.md` file of the documentation to `Arabic العربية`. I use transformers for my side-project and wanted to contribute. As a beginner, this seemed appropriate.

### Some questions:

- I can't access the pr documentation endpoint for `Arabic العربية`. Is there a missing step?
- I left all the other files alone after copying the English docs. Is this acceptable for future updates or should I add contents to the `_toctree.yml` only when translation is complete? Should I delete all other files for a cleaner review?
- In `Arabic`, people use both `Transformer` and `المحولات` to describe the model. However, as this is more of a product of HuggingFace I opted not to translate it. May you please let me know which you would prefer?

Thank you in advance for your review.

Part of #32435

### Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?

 ### Who can review?
 @stevhliu , @MKhalusova , @abodacs, may you please review this PR?
 

Comments:
[i18n-ar] Translated file : `docs/source/ar/perf_hardware.md` into Arabic
Author: AhmedAlmaghz
Pull request: yes


## What does this PR do?
Translated the `docs/source/ar/perf_hardware.md` file of the documentation to `Arabic العربية`. I use transformers for my side-project and wanted to contribute. As a beginner, this seemed appropriate.

### Some questions:

- I can't access the pr documentation endpoint for `Arabic العربية`. Is there a missing step?
- I left all the other files alone after copying the English docs. Is this acceptable for future updates or should I add contents to the `_toctree.yml` only when translation is complete? Should I delete all other files for a cleaner review?
- In `Arabic`, people use both `Transformer` and `المحولات` to describe the model. However, as this is more of a product of HuggingFace I opted not to translate it. May you please let me know which you would prefer?

Thank you in advance for your review.

Part of #32435

### Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?

 ### Who can review?
 @stevhliu , @MKhalusova , @abodacs, may you please review this PR?
 

Comments:
[i18n-ar] Translated file : `docs/source/ar/llm_optims.md` into Arabic
Author: AhmedAlmaghz
Pull request: yes


## What does this PR do?
Translated the `docs/source/ar/llm_optims.md` file of the documentation to `Arabic العربية`. I use transformers for my side-project and wanted to contribute. As a beginner, this seemed appropriate.

### Some questions:

- I can't access the pr documentation endpoint for `Arabic العربية`. Is there a missing step?
- I left all the other files alone after copying the English docs. Is this acceptable for future updates or should I add contents to the `_toctree.yml` only when translation is complete? Should I delete all other files for a cleaner review?
- In `Arabic`, people use both `Transformer` and `المحولات` to describe the model. However, as this is more of a product of HuggingFace I opted not to translate it. May you please let me know which you would prefer?

Thank you in advance for your review.

Part of #32435

### Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?

 ### Who can review?
 @stevhliu , @MKhalusova , @abodacs, may you please review this PR?
 

Comments:
[i18n-ar] Translated file : `docs/source/ar/hpo_train.md` into Arabic
Author: AhmedAlmaghz
Pull request: yes


## What does this PR do?
Translated the `docs/source/ar/hpo_train.md` file of the documentation to `Arabic العربية`. I use transformers for my side-project and wanted to contribute. As a beginner, this seemed appropriate.

### Some questions:

- I can't access the pr documentation endpoint for `Arabic العربية`. Is there a missing step?
- I left all the other files alone after copying the English docs. Is this acceptable for future updates or should I add contents to the `_toctree.yml` only when translation is complete? Should I delete all other files for a cleaner review?
- In `Arabic`, people use both `Transformer` and `المحولات` to describe the model. However, as this is more of a product of HuggingFace I opted not to translate it. May you please let me know which you would prefer?

Thank you in advance for your review.

Part of #32435

### Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?

 ### Who can review?
 @stevhliu , @MKhalusova , @abodacs, may you please review this PR?
 

Comments:
[i18n-ar] Translated file : `docs/source/ar/generation_strategies.md` into Arabic
Author: AhmedAlmaghz
Pull request: yes


## What does this PR do?
Translated the `docs/source/ar/generation_strategies.md` file of the documentation to `Arabic العربية`. I use transformers for my side-project and wanted to contribute. As a beginner, this seemed appropriate.

### Some questions:

- I can't access the pr documentation endpoint for `Arabic العربية`. Is there a missing step?
- I left all the other files alone after copying the English docs. Is this acceptable for future updates or should I add contents to the `_toctree.yml` only when translation is complete? Should I delete all other files for a cleaner review?
- In `Arabic`, people use both `Transformer` and `المحولات` to describe the model. However, as this is more of a product of HuggingFace I opted not to translate it. May you please let me know which you would prefer?

Thank you in advance for your review.

Part of #32435

### Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?

 ### Who can review?
 @stevhliu , @MKhalusova , @abodacs, may you please review this PR?
 

Comments:
[i18n-ar] Add file `docs/source/ar/model_doc/xlnet.md` 
Author: AhmedAlmaghz
Pull request: yes

 # What does this PR do? 
 Translate docs into Arabic issue-number #32435 
 @stevhliu , @MKhalusova , @abodacs 
 This pull request contains changes [**for file : docs/source/ar/model_doc/xlnet.md**](https://github.com/AhmedAlmaghz/transformers/blob/Add_docs_source_ar_model_doc_xlnet_md/docs/source/ar/model_doc/xlnet.md) 

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_32647). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
[i18n-ar] Add file `docs/source/ar/model_doc/xlsr_wav2vec2.md` 
Author: AhmedAlmaghz
Pull request: yes

 # What does this PR do? 
 Translate docs into Arabic issue-number #32435 
 @stevhliu , @MKhalusova , @abodacs 
 This pull request contains changes [**for file : docs/source/ar/model_doc/xlsr_wav2vec2.md**](https://github.com/AhmedAlmaghz/transformers/blob/Add_docs_source_ar_model_doc_xlsr_wav2vec2_md/docs/source/ar/model_doc/xlsr_wav2vec2.md) 

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_32646). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
[i18n-ar] Add file `docs/source/ar/model_doc/xmod.md` 
Author: AhmedAlmaghz
Pull request: yes

 # What does this PR do? 
 Translate docs into Arabic issue-number #32435 
 @stevhliu , @MKhalusova , @abodacs 
 This pull request contains changes [**for file : docs/source/ar/model_doc/xmod.md**](https://github.com/AhmedAlmaghz/transformers/blob/Add_docs_source_ar_model_doc_xmod_md/docs/source/ar/model_doc/xmod.md) 

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_32645). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

here `toctree` #32696
[i18n-ar] Translated file : `docs/source/ar/tasks/sequence_classification.md` into Arabic
Author: AhmedAlmaghz
Pull request: yes

## What does this PR do?
Translated the `docs/source/ar/tasks/sequence_classification.md` file of the documentation to `Arabic العربية`. I use transformers for my side-project and wanted to contribute. As a beginner, this seemed appropriate.

### Some questions:

- I can't access the pr documentation endpoint for `Arabic العربية`. Is there a missing step?
- I left all the other files alone after copying the English docs. Is this acceptable for future updates or should I add contents to the `_toctree.yml` only when translation is complete? Should I delete all other files for a cleaner review?
- In `Arabic`, people use both `Transformer` and `المحولات` to describe the model. However, as this is more of a product of HuggingFace I opted not to translate it. May you please let me know which you would prefer?

Thank you in advance for your review.

Part of #32435

### Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section?
- [ ] 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.
- [ ] 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).
- [ ] Did you write any new necessary tests?

 ### Who can review?
 @stevhliu , @MKhalusova , @abodacs, may you please review this PR?
 

Comments:
مرحباً أخي عبالله @abodacs 
هذه قائمة المهام التالية للترجمة والمراجعة

# TASK GUIDES

## NATURAL LANGUAGE PROCESSING
- [ ]  Text classification 
- [ ]  Token classification
- [ ]  Question answering
- [ ]  Causal language modeling
- [ ]  Masked language modeling
- [ ]  Translation
- [ ]  Summarization 
- [ ]  Multiple choice

## AUDIO
- [ ]  Audio classification
- [ ]  Automatic speech recognition

## COMPUTER VISION
- [ ]  Image classification
- [ ]  Image segmentation
- [ ]  Video classification
- [ ]  Object detection
- [ ]  Zero-shot object detection
- [ ]  Zero-shot image classification
- [ ]  Depth estimation
- [ ]  Image-to-Image
- [ ]  Image Feature Extraction
- [ ]  Mask Generation
- [ ]  Keypoint Detection
- [ ]  Knowledge Distillation for Computer Vision

## Multimodal
- [ ]  Image captioning
- [ ]  Document Question Answering
- [ ]  Visual Question Answering
- [ ]  Text to speech
- [ ]  Image-text-to-text
- [ ]  Video-text-to-text

## Generation
- [ ]  Customize the generation strategy
- [ ]  Best Practices for Generation with Cache

## Prompting
- [ ]  Image tasks with IDEFICS
- [ ]  LLM prompting guide


أشكرك على جهودك الرائعة
Fix file path for shard_num 1 with mllama converter
Author: strangiato
Pull request: yes

# What does this PR do?

mllama conversion with shard_num 1 expects the file to be `consolidated.pth` but the Llama 3.2 11B uses `consolidated.00.pth` instead.

Fixes #35049 

## Before submitting
- [ ] 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#create-a-pull-request),
      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.
- [ ] 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).
- [ ] 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.

- text models: @ArthurZucker
- vision models: @amyeroberts, @qubvel




Comments:
Hey @strangiato, for llama vision models the file is `consolidated.pth`

see 
https://huggingface.co/meta-llama/Llama-3.2-11B-Vision-Instruct/tree/main/original

It seems there is a discrepancy between the files that is published on HuggingFace for the .pth format, and the files published on meta directly (https://www.llama.com/llama-downloads/)

If you download the files directly form meta they are using `consolidated.00.pth` not `consolidated.pth`.

Ok, then it's better to support both, smth like
```pyhton
path = "consloidated.pth" if os.path.exists("consloidated.pth") else "consloidated.00.pth"
```

Updated the code to check if the 00.pth file exists and falls back to the non-numbered one in a similar what to what you suggested.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_35053). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
[i18n-<languageCode>] Translating Benchmarks.md to Chinese
Author: asdkfjsd
Pull request: no
Labels: name: WIP

Hello, I will translate Benchmarks.md to Chinese.
doc url : [https://github.com/huggingface/transformers/blob/main/docs/source/en/benchmarks.md](url)


Comments:
cc @stevhliu 

I have removed all the English original text (which was previously kept as comments in the document) and refined some of the Chinese expressions. Any suggestions or corrections are welcome. Thank you very much!
BLIP: enable device map
Author: zucchini-nlp
Pull request: yes

# What does this PR do?

Fixes https://github.com/huggingface/transformers/issues/34681

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_34850). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Guess it can be merged without core maintainer's review, since it is a tiny change and approved by Marc
🧹 Remove deprecated RotaryEmbedding parts in the Attention layers
Author: Cyrilvallez
Pull request: yes

# What does this PR do?

This cleans-up the (expired) deprecated cycle for the rotary embeddings and fully move them to the Model instead of the Attention. Also removes deprecated EmbeddingClasses, and fix the tests accordingly.

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_34858). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ArthurZucker should be good to go!

Looks like there is a regression?

https://app.circleci.com/pipelines/github/huggingface/transformers/113239/workflows/d8800ea1-6599-4640-95cb-e9c558496c41/jobs/1512452

True! Aria relies on Llama and was merged in the meantime - https://github.com/huggingface/transformers/pull/35208 correctly reapplies new Llama change to Aria
[PEFT] Better Trainer error when prompt learning with loading best model at the end
Author: BenjaminBossan
Pull request: yes

# What does this PR do?

Original issue: https://github.com/huggingface/peft/issues/2256

There is a potential error when using load_best_model_at_end=True with a prompt learning PEFT method. This is because Trainer uses `load_adapter` under the hood but with some prompt learning methods, there is an optimization on the saved model to remove parameters that are not required for inference, which in turn requires a change to the model architecture. This is why `load_adapter` will fail in such cases and users should instead set `load_best_model_at_end=False` and use `PeftModel.from_pretrained`. As this is not obvious, we now intercept the error and add a helpful error message.

## Before submitting
- [ ] 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#create-a-pull-request),
      Pull Request section?
- [ ] 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.
- [ ] 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?

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_35087). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ArthurZucker Please review or suggest a reviewer.

@Rocketknight1 Do you know who could best review this PR?

Sounds like a job for @muellerzr @SunMarc !