noamaanMulla-03/transformers-issues huggingface dataset:
🌐 [i18n-KO] Translated `vitpose.md` to Korean
Author: jihyun-0611
Pull request: yes

<!-- PR의 제목은 "🌐 [i18n-KO] Translated `<your_file>.md` to Korean" 으로 부탁드립니다 -->
# What does this PR do?

Translated the `vitpose.md` file of the documentation to Korean.
Thank you in advance for your review.

Part of https://github.com/huggingface/transformers/issues/20179

## Before reviewing
- [x] Check for missing / redundant translations (번역 누락/중복 검사)
- [x] Grammar Check (맞춤법 검사)
- [x] Review or Add new terms to glossary (용어 확인 및 추가)
- [x] Check Inline TOC (e.g. `[[lowercased-header]]`)
- [x] Check live-preview for gotchas (live-preview로 정상작동 확인)

## Who can review? (Initial)

<!-- 1. 위 체크가 모두 완료된 뒤에만 KREW 팀원들에게 리뷰를 요청하는 아래 주석을 노출해주세요!-->
May you please review this PR?
@4N3MONE, @yijun-lee, @jungnerd , @harheem

## 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? (Final)

<!-- 2. KREW 팀원들의 리뷰가 끝난 후에 아래 주석을 노출해주세요! -->
@stevhliu May you please review this PR?

Comments:
번역 감사합니다. 용상님 코멘트 이외에는 수정 사항 없어보입니다!
Qwen2-VL err
Author: Yan0613
Pull request: no

When adapting the [example script for distributed GPU inference from the documentation](https://huggingface.co/docs/transformers/perf_infer_gpu_multi) using tensor parallelism for the Qwen-2.5-VL-family, the following errors arise.

```
[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/rupert/qwen2.5-vl-test/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_sharding_prop.py", line 447, in propagate_op_sharding_non_cached
[rank0]:     output_sharding = sharding_prop_func(op_schema)
[rank0]:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/home/rupert/qwen2.5-vl-test/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_ops/_conv_ops.py", line 29, in convolution_rules
[rank0]:     assert isinstance(bias_spec, DTensorSpec)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: AssertionError
```
from this exception (callstack abridged):

```
[rank0]:   File "/home/rupert/qwen2.5-vl-test/.venv/lib/python3.12/site-packages/torch/distributed/tensor/_sharding_prop.py", line 451, in propagate_op_sharding_non_cached
[rank0]:     raise RuntimeError(
[rank0]: RuntimeError: Sharding propagation failed on op Op(op=aten.convolution.default, args_schema=Spec(R on (1064, 3, 2, 14, 14)), Spec(R on (1280, 3, 2, 14, 14)), None, [2, 14, 14], [0, 0, 0], [1, 1, 1], False, [0, 0, 0], 1 @ mesh: (1,)).
```

Comments:
[docs] fix korean docs yet again
Author: gante
Pull request: yes

# What does this PR do?

Something went wrong merging main into #39660 , and CI is still red.

`doc-builder build transformers docs/source/ko/ --language ko --clean` is green on my side.

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

# What does this PR do?

This PR fix some broken links by replacing links in the form of `[text]((url))` to `[text](url)`. This is the correct format of a url in the markdown.

## 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#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).
- [ ] 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.

Documentation: @stevhliu @ydshieh 

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39809). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Fix bad markdown links
Author: ebezzam
Pull request: yes

# What does this PR do?

While writing the docs for one model and taking inspiration from another, I noticed bad links to other models.

For example, with [Dia](https://github.com/huggingface/transformers/blob/6ba8a1ff4550b4450a22a0b0d907312955ce0fd5/docs/source/en/model_doc/dia.md?plain=1#L36C1-L37C41), its markdown contains:
```
a pretrained codec model [DAC](./dac.md) is used...
```
The link on DAC link on [the docs](https://huggingface.co/docs/transformers/main/en/model_doc/dia#overview) leads to `404`: https://huggingface.co/docs/transformers/main/en/model_doc/dac.md

**The markdown should be without ".md" extension:**
```
a pretrained codec model [DAC](./dac) is used...
```
To lead to: https://huggingface.co/docs/transformers/main/en/model_doc/dac

See`docs/source/en/conversations.md` for a good and bad example in the same line 🫠  ([markdown](https://github.com/huggingface/transformers/blob/main/docs/source/en/conversations.md?plain=1#L161), bottom of [rendered](https://huggingface.co/docs/transformers/main/en/conversations))
```
> Parameters may not be active for every generated token in MoE models such as [Mixtral](./model_doc/mixtral), [Qwen2MoE](./model_doc/qwen2_moe.md), and [DBRX](./model_doc/dbrx). As a result, MoE models generally have much lower memory bandwidth requirements and can be faster than a regular LLM of the same size. However, techniques like speculative decoding are ineffective with MoE models because parameters become activated with each new speculated token.
```
`qwen2_moe` has bad link while `mixtral` and `dbrx` are fine.

---

# How I made the changes

Within VS code, I did the following replace within the `docs` folder (and a couple other manual fixes).
- Search: `(\[[^\]]+\]\((?!https?:\/\/|www\.)[^)\s]*)\.md(\))`
- Replace: `$1$2`

@stevhliu 

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39819). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
chore: update cohere2 (Command R7B) model card
Author: arpon-kapuria
Pull request: yes

# What does this PR do?

This PR updates the model card for Cohere2, following the template outlined in the issue. 

## Before submitting
- [x] This PR improves the docs.

## Who can review?

@stevhliu 



Comments:
@stevhliu I've made all the suggested changes. Let me know if there's anything else you'd like me to update. 

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39604). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Fix audio pipeline with torchcodec input
Author: lhoestq
Pull request: yes

fix `tests/pipelines/test_pipelines_automatic_speech_recognition.py::AutomaticSpeechRecognitionPipelineTests::test_speculative_decoding_whisper_distil`

which has

```
ValueError: When passing a dictionary to AutomaticSpeechRecognitionPipeline, the dict needs to contain a "raw" key containing the numpy array or torch tensor representing the audio and a "sampling_rate" key, containing the sampling_rate associated with that array
```

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

cc @eustlb when you get the bandwidth to check this one
Fix tp cb
Author: ArthurZucker
Pull request: yes

# What does this PR do?
CB was broken with TP and cudagraph. 
Streams were messing with each other!


Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39838). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
[VLMs] split out "get placeholder mask" to helper
Author: zucchini-nlp
Pull request: yes

# What does this PR do?

As per title. TBH the helper is same for most models (excluding Qwen or other special arch), so we could just move it to the base modeling class. I thought it's against transformers philosophy, so that's why we have near-same code copied everywhere

Half of these are anyway handled by modular and copied from LLaVA

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

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: aria, aya_vision, blip_2, chameleon, cohere2_vision, deepseek_vl, deepseek_vl_hybrid, emu3, fuyu, gemma3, gemma3n, glm4v, got_ocr2, instructblip, instructblipvideo, internvl
Using Gemma3n with text-only generation requires image dependencies
Author: marianheinsen
Pull request: no
Labels: name: bug

### System Info

- `transformers` version: 4.53.0
- Platform: macOS-15.5-arm64-arm-64bit
- Python version: 3.12.8
- Huggingface_hub version: 0.33.2
- Safetensors version: 0.5.3
- Accelerate version: not installed
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.7.1 (NA)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: <fill in>

### Who can help?

@zucchini-nlp 

### Information

- [ ] The official example scripts
- [x] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

I want to use the Gemma3n model in a text-only generation pipeline (without any multimodal inputs). I'm using the  Gemma3nForCausalLM because it has only a language modeling head. But when running the script, it fails with an ImportError stating that `AutoImageProcessor` requires the PIL and timm libraries to work. How can I run Gemma3n for text-generation without those image-related dependencies?

```python
from transformers import AutoTokenizer, Gemma3nForCausalLM
import torch

model_id = "google/gemma-3n-e4b"

model = Gemma3nForCausalLM.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)

prompt = "Once upon a time"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_length=30)

response = tokenizer.decode(output[0], skip_special_tokens=True)

print(response)
```

### Expected behavior

I expect the script to run successfully without installing `pillow` and `timm`.

Comments:
@marianheinsen hey!

I tried to run the provided script in a new env with no Pillow/timm installed and it ran without errors for me. Can you share the traceback, I don't get where the `AutoImageProcessor` is trying to get imported?

I am able to reprouduce this issue, here is the [gist](https://gist.github.com/archanapp154/2107d0f85e29fce5799c9c560989262c), If no one is checking this out, i want to contribute to this, thank you

Ah, so you're trying to load the image processor, which raises errors. Makes sense because an image processor needs Pillow to be installed 

If you want to use for text only cases, the above script works without import issues :)

Oh yes, Thanks for pointing out, removed that image processors and its working as expected

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

Probably resolved, closing. Feel free to re-open if not
remove cpu gpu device synch in Llava family models
Author: ArthurZucker
Pull request: yes

# What does this PR do?
Let's not use items

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_34967). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
[`attn_implementation`] remove recursive, allows custom kernels with wrappers
Author: ArthurZucker
Pull request: yes

# What does this PR do?
This PR enables `paged_attention` usage: 
```python 
model = AutoModelForCausalLM.from_prertained("path", attn_implementation="paged_attention|kernels-community/flash-attn3")
```
This means I want to use the `paged_attention` wrapper of `transformers` -> no attention mask, no input pre-processing

```python
model = AutoModelForCausalLM.from_prertained("path", attn_implementation="sdpa|kernels-community/flash-attn3")
```
would use the `sdpa` wrapper from https://github.com/huggingface/transformers/blob/fix-paged-wrapper/src/transformers/integrations/sdpa_attention.py#L16-L16

Comments:
cc @Cyrilvallez for viz

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

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: speech_encoder_decoder, vision_encoder_decoder
Export private symbols
Author: cyyever
Pull request: yes

# What does this PR do?
This is follow-up of #37340. mypy and pyright consider redundant aliases as public symbols. Therefore, it is necessary to re-export symbols to make them happy. 
The changes were preformed by vim regex copy and paste.
 
 

Comments:
This is a lot of code bloat just to keep `mypy` and `pyright` happy! I don't know if we want this, but cc core maintainers @arthurzucker @cyrilvallez

@qubvel Thank you, it looks better!!!

Thanks @cyyever! Let's also add a clear comment in code on why we do it this way, otherwise it might be accidentally reverted in a few months 😄 

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39729). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Add MM Grounding DINO
Author: rziga
Pull request: no
Labels: name: New model

name: Vision

### Model description

Hi,

MM Grounding DINO is MMDetection's implementation of Grounding DINO. It improves zero-shot detection performance quite a bit (especially on LVIS) and is very similar to the original Grounding DINO implementation-wise. I'm mostly interested in it because they also have checkpoints for models with higher resolution FPN features, which are not available for the original model. 

The model also appears to be the same inference-wise as LLMDet (#37334), so this could be a good stepping stone for that one.

### Open source status

- [x] The model implementation is available
- [x] The model weights are available

### Provide useful links for the implementation

Weights and implementation are available in MMDetection [here](https://github.com/open-mmlab/mmdetection/blob/main/configs/mm_grounding_dino/README.md).

I've already started working on porting the model with modular transformers, so I can open a draft PR if you want.

Comments:
cc @qubvel @NielsRogge 

Is this open for Community contribution?

Hi @rziga, that sounds super nice! Feel free to ping me when PR is open!

@demoncoder-crypto thanks for your interest, you can collaborate with @rziga if they need any help 🤗
Update ux cb
Author: ArthurZucker
Pull request: yes

Update the good default, computing them 


<img width="1705" height="595" alt="image" src="https://github.com/user-attachments/assets/cd864ba3-4fa9-4c10-9d7d-1b6aaee752ec" />


Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39845). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Fix responses add tests
Author: LysandreJik
Pull request: yes

Completes the `/v1/responses` support in transformers serve to:
- Have `transformers serve` accept a default seed at startup, enables better integration testing
- Correctly have the application of chat template return tensors
- Handle instructions when received

We also add tests for the Responses API, with an end-to-end test.

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

@LysandreJik I think our CI doesn't like the current integration tests for `transformers serve` 🤔 

It's my bad I put as fast tests which shouldn't be, I'm putting them back as slow; this should get the CI green, and I'll check why the threads seem to not exit down the road
Add fast image processor Janus, Deepseek VL, Deepseek VL hybrid
Author: yonigozlan
Pull request: yes

As the title says.
Cc @zucchini-nlp as I think you reviewed these models?
Also it would be great to have fast image processors on release for the newest models, don't hesitate to ping me on the PRs, happy to help!

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

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: auto, deepseek_vl, deepseek_vl_hybrid, janus
Add glpn fast processor
Author: aryanchauhan31
Pull request: yes

This PR adds support for `GLPNImageProcessorFast`, enabling fast inference for the GLPN model using TorchVision backends.

**Changes:**
- Added `GLPNImageProcessorFast` implementation in `image_processing_glpn_fast.py`.
- Updated `__init__.py` to include the new fast processor in `import_structure`.
- Verified functional equivalence with the slow processor (`max abs diff < 1e-7`).
- Added corresponding tests; all relevant test cases pass or skip cleanly.

Let me know if further refactoring or docs are needed.

Comments:
@sgugger @nateraw Could you please approve the workflows? This PR adds a fast processor for GLPN. Thank you!


cc @yonigozlan 

Closing this PR to give opportunities to others to contribute, as it appears to be stale.
Add fast imageprocessor vitpose
Author: AnimeshMaheshwari22
Pull request: yes

Adding Fast Image processor for VitPose
Fixes #36978 


## 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?

@yonigozlan 

Comments:
Closing this PR to give opportunities to others to contribute, as it appears to be stale.
fix: deprecate plot_keypoint_matching and make visualize_keypoint_matching for all Keypoint Matching models
Author: sbucaille
Pull request: yes

# What does this PR do?

Adds `visualize_keypoint_matching` to LightGlue and SuperGlue image processor
Deprecate `plot_keypoint_matching` from LightGlue image processor

## Who can review?

@qubvel @stevhliu 


Comments:
**[For maintainers]** Suggested jobs to run (before merge)

run-slow: efficientloftr, lightglue, superglue

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