url string | repository_url string | labels_url string | comments_url string | events_url string | html_url string | id int64 | node_id string | number int64 | title string | user dict | labels list | state string | locked bool | assignee dict | assignees list | milestone null | comments list | created_at timestamp[ms] | updated_at timestamp[ms] | closed_at timestamp[ms] | author_association string | type dict | active_lock_reason null | draft bool | pull_request dict | body string | closed_by dict | reactions dict | timeline_url string | performed_via_github_app null | state_reason string | sub_issues_summary dict | issue_dependencies_summary dict | is_pull_request bool | is_closed bool |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/huggingface/transformers/issues/40740 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40740/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40740/comments | https://api.github.com/repos/huggingface/transformers/issues/40740/events | https://github.com/huggingface/transformers/pull/40740 | 3,390,348,309 | PR_kwDOCUB6oc6nMVSe | 40,740 | Configure assistant model's generation_config with user parameters | {
"login": "geoffrey-young",
"id": 1334642,
"node_id": "MDQ6VXNlcjEzMzQ2NDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1334642?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/geoffrey-young",
"html_url": "https://github.com/geoffrey-young",
"followers_url": "https://api.github.com/users/geoffrey-young/followers",
"following_url": "https://api.github.com/users/geoffrey-young/following{/other_user}",
"gists_url": "https://api.github.com/users/geoffrey-young/gists{/gist_id}",
"starred_url": "https://api.github.com/users/geoffrey-young/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/geoffrey-young/subscriptions",
"organizations_url": "https://api.github.com/users/geoffrey-young/orgs",
"repos_url": "https://api.github.com/users/geoffrey-young/repos",
"events_url": "https://api.github.com/users/geoffrey-young/events{/privacy}",
"received_events_url": "https://api.github.com/users/geoffrey-young/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-06T15:10:30 | 2025-10-10T15:45:01 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40740",
"html_url": "https://github.com/huggingface/transformers/pull/40740",
"diff_url": "https://github.com/huggingface/transformers/pull/40740.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40740.patch",
"merged_at": null
} | # What does this PR do?
Fixes issue where num_assistant_tokens and other parameters intended for the assistant model are not properly passed down, leaving the assistant model with default values.
Ultimately, we want to configure the assistant model properly, so that it:
1. Is properly configured with user-provided parameters
2. Inherits defaults from the main model instead of class defaults
Tests added to illustrate the issue, and detailed comments to illustrate behaviors.
<!--
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 # [40739](https://github.com/huggingface/transformers/issues/40739)
## 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?
## 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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40740/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40740/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40739 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40739/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40739/comments | https://api.github.com/repos/huggingface/transformers/issues/40739/events | https://github.com/huggingface/transformers/issues/40739 | 3,390,320,767 | I_kwDOCUB6oc7KFDB_ | 40,739 | num_assistant_tokens not configured in assistant model | {
"login": "geoffrey-young",
"id": 1334642,
"node_id": "MDQ6VXNlcjEzMzQ2NDI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1334642?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/geoffrey-young",
"html_url": "https://github.com/geoffrey-young",
"followers_url": "https://api.github.com/users/geoffrey-young/followers",
"following_url": "https://api.github.com/users/geoffrey-young/following{/other_user}",
"gists_url": "https://api.github.com/users/geoffrey-young/gists{/gist_id}",
"starred_url": "https://api.github.com/users/geoffrey-young/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/geoffrey-young/subscriptions",
"organizations_url": "https://api.github.com/users/geoffrey-young/orgs",
"repos_url": "https://api.github.com/users/geoffrey-young/repos",
"events_url": "https://api.github.com/users/geoffrey-young/events{/privacy}",
"received_events_url": "https://api.github.com/users/geoffrey-young/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | open | false | null | [] | null | [] | 2025-09-06T14:53:33 | 2025-10-13T13:27:49 | null | NONE | null | null | null | null | ### System Info
`num_assistant_tokens` and other parameters intended for the assistant model are not properly passed down, leaving the assistant model with default values.
```python
outputs = model.generate(**inputs, assistant_model=assistant_model, num_assistant_tokens=5)
print(f'num_assistant_tokens: {assistant_model.generation_config.num_assistant_tokens}')
```
This behavior is present both in the official 4.56.0 as well as main (currently 4.57.0.dev0/bb45d36)
Fix in PR https://github.com/huggingface/transformers/pull/40740
- `transformers` version: 4.57.0.dev0
- Platform: macOS-15.6.1-arm64-arm-64bit
- Python version: 3.12.11
- Huggingface_hub version: 0.34.4
- Safetensors version: 0.6.2
- Accelerate version: 1.10.1
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.8.0 (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?:?
### Who can help?
_No response_
### 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
```python
outputs = model.generate(**inputs, assistant_model=assistant_model, num_assistant_tokens=5)
print(f'num_assistant_tokens: {assistant_model.generation_config.num_assistant_tokens}')
```
see also this Collab: https://colab.research.google.com/drive/1BIY6yklrsarrPmXWrciV1chAqV5I9-wo?usp=sharing
### Expected behavior
`num_assistant_tokens` should be `5` not the default `20` | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40739/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40739/timeline | null | null | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | false |
https://api.github.com/repos/huggingface/transformers/issues/40738 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40738/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40738/comments | https://api.github.com/repos/huggingface/transformers/issues/40738/events | https://github.com/huggingface/transformers/pull/40738 | 3,390,025,064 | PR_kwDOCUB6oc6nLRqA | 40,738 | Docs: Clarify rjieba installation for RoFormerTokenizer | {
"login": "dipanshuchoudhary-data",
"id": 192754104,
"node_id": "U_kgDOC30xuA",
"avatar_url": "https://avatars.githubusercontent.com/u/192754104?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dipanshuchoudhary-data",
"html_url": "https://github.com/dipanshuchoudhary-data",
"followers_url": "https://api.github.com/users/dipanshuchoudhary-data/followers",
"following_url": "https://api.github.com/users/dipanshuchoudhary-data/following{/other_user}",
"gists_url": "https://api.github.com/users/dipanshuchoudhary-data/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dipanshuchoudhary-data/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dipanshuchoudhary-data/subscriptions",
"organizations_url": "https://api.github.com/users/dipanshuchoudhary-data/orgs",
"repos_url": "https://api.github.com/users/dipanshuchoudhary-data/repos",
"events_url": "https://api.github.com/users/dipanshuchoudhary-data/events{/privacy}",
"received_events_url": "https://api.github.com/users/dipanshuchoudhary-data/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-06T11:54:07 | 2025-09-08T19:02:30 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40738",
"html_url": "https://github.com/huggingface/transformers/pull/40738",
"diff_url": "https://github.com/huggingface/transformers/pull/40738.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40738.patch",
"merged_at": null
} | This PR improves the RoFormer documentation by clearly explaining how to install `rjieba`
before using RoFormerTokenizer. Previously the install command was either missing or commented
out, which could confuse new users. This update adds proper `pip install rjieba` code blocks
in both Pipeline and AutoModel examples.
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40738/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40738/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40737 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40737/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40737/comments | https://api.github.com/repos/huggingface/transformers/issues/40737/events | https://github.com/huggingface/transformers/pull/40737 | 3,389,351,962 | PR_kwDOCUB6oc6nJBei | 40,737 | Update starcoder2 model card to new standard format | {
"login": "sanatb187",
"id": 216351150,
"node_id": "U_kgDODOVBrg",
"avatar_url": "https://avatars.githubusercontent.com/u/216351150?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sanatb187",
"html_url": "https://github.com/sanatb187",
"followers_url": "https://api.github.com/users/sanatb187/followers",
"following_url": "https://api.github.com/users/sanatb187/following{/other_user}",
"gists_url": "https://api.github.com/users/sanatb187/gists{/gist_id}",
"starred_url": "https://api.github.com/users/sanatb187/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sanatb187/subscriptions",
"organizations_url": "https://api.github.com/users/sanatb187/orgs",
"repos_url": "https://api.github.com/users/sanatb187/repos",
"events_url": "https://api.github.com/users/sanatb187/events{/privacy}",
"received_events_url": "https://api.github.com/users/sanatb187/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-06T04:43:00 | 2025-09-18T17:27:00 | 2025-09-18T17:27:00 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40737",
"html_url": "https://github.com/huggingface/transformers/pull/40737",
"diff_url": "https://github.com/huggingface/transformers/pull/40737.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40737.patch",
"merged_at": null
} | # What does this PR do?
This PR updates the `starcoder2.md` model card to follow the new Hugging Face documentation standard, as part of [issue #36979](https://github.com/huggingface/transformers/issues/36979).
### Changes made:
- Updated section headers and formatting to match the standardized template.
- Cleaned up redundant or unused sections.
- Ensured doc-builder compatibility for consistent deployment.
This change contributes to the ongoing effort to bring all model cards into a consistent, maintainable structure. No functionality or code changes are introduced.
---
## 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?
- [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.
Discussed in issue: https://github.com/huggingface/transformers/issues/36979
- [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).
- [ ] 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.
Looping in @stevhliu for review, as this PR updates the model documentation to match the current standard.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "stevhliu",
"id": 59462357,
"node_id": "MDQ6VXNlcjU5NDYyMzU3",
"avatar_url": "https://avatars.githubusercontent.com/u/59462357?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stevhliu",
"html_url": "https://github.com/stevhliu",
"followers_url": "https://api.github.com/users/stevhliu/followers",
"following_url": "https://api.github.com/users/stevhliu/following{/other_user}",
"gists_url": "https://api.github.com/users/stevhliu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/stevhliu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stevhliu/subscriptions",
"organizations_url": "https://api.github.com/users/stevhliu/orgs",
"repos_url": "https://api.github.com/users/stevhliu/repos",
"events_url": "https://api.github.com/users/stevhliu/events{/privacy}",
"received_events_url": "https://api.github.com/users/stevhliu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40737/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40737/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40736 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40736/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40736/comments | https://api.github.com/repos/huggingface/transformers/issues/40736/events | https://github.com/huggingface/transformers/pull/40736 | 3,389,243,453 | PR_kwDOCUB6oc6nIqbE | 40,736 | 🌐 [i18n-KO] Translated `jan.md` to Korean | {
"login": "Jwaminju",
"id": 49024958,
"node_id": "MDQ6VXNlcjQ5MDI0OTU4",
"avatar_url": "https://avatars.githubusercontent.com/u/49024958?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Jwaminju",
"html_url": "https://github.com/Jwaminju",
"followers_url": "https://api.github.com/users/Jwaminju/followers",
"following_url": "https://api.github.com/users/Jwaminju/following{/other_user}",
"gists_url": "https://api.github.com/users/Jwaminju/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Jwaminju/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jwaminju/subscriptions",
"organizations_url": "https://api.github.com/users/Jwaminju/orgs",
"repos_url": "https://api.github.com/users/Jwaminju/repos",
"events_url": "https://api.github.com/users/Jwaminju/events{/privacy}",
"received_events_url": "https://api.github.com/users/Jwaminju/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-06T02:59:23 | 2025-10-06T21:15:19 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40736",
"html_url": "https://github.com/huggingface/transformers/pull/40736",
"diff_url": "https://github.com/huggingface/transformers/pull/40736.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40736.patch",
"merged_at": null
} | # What does this PR do?
Translated the `jan.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)
@jungnerd @ahnjj @yijun-lee
Could you review this PR? Really appreciate for your review!
## 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?
- [ ] 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).
- [ ] Did you write any new necessary tests?
## Who can review? (Final)
May you please review this PR?
Repository maintainers | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40736/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40736/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40735 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40735/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40735/comments | https://api.github.com/repos/huggingface/transformers/issues/40735/events | https://github.com/huggingface/transformers/pull/40735 | 3,388,783,174 | PR_kwDOCUB6oc6nHKBe | 40,735 | [torchao safetensors] integrate torchao safetensors support with transformers | {
"login": "liangel-02",
"id": 224883113,
"node_id": "U_kgDODWdxqQ",
"avatar_url": "https://avatars.githubusercontent.com/u/224883113?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/liangel-02",
"html_url": "https://github.com/liangel-02",
"followers_url": "https://api.github.com/users/liangel-02/followers",
"following_url": "https://api.github.com/users/liangel-02/following{/other_user}",
"gists_url": "https://api.github.com/users/liangel-02/gists{/gist_id}",
"starred_url": "https://api.github.com/users/liangel-02/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liangel-02/subscriptions",
"organizations_url": "https://api.github.com/users/liangel-02/orgs",
"repos_url": "https://api.github.com/users/liangel-02/repos",
"events_url": "https://api.github.com/users/liangel-02/events{/privacy}",
"received_events_url": "https://api.github.com/users/liangel-02/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T21:11:08 | 2025-09-29T15:05:47 | 2025-09-24T10:32:48 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40735",
"html_url": "https://github.com/huggingface/transformers/pull/40735",
"diff_url": "https://github.com/huggingface/transformers/pull/40735.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40735.patch",
"merged_at": "2025-09-24T10:32:48"
} | **Context**
Currently, we need to use `safe_serialization=False` while saving models as shown [here](https://huggingface.co/pytorch/Qwen3-8B-INT4#quantization-recipe). This PR enables safetensors support for torchao so that users can now save and load checkpoints using safetensors. Currently, only Float8Tensor is supported (`Float8DynamicActivationFloat8WeightConfig`, `Float8WeightOnlyConfig`) but allowing other subclasses should involve minimal code changes.
```
# default forsafe_serialization is True
quantized_model.push_to_hub(save_to)
```
**Summary**
Changes to transformers code includes:
1. In ```TorchAoHfQuantizer```, we provide ```get_state_dict``` and ```update_state_dict_with_metadata``` that flattens/unflattens a model state dict with tensor subclasses by calling functionality built out in [this PR](https://github.com/pytorch/ao/pull/2881).
2. In ```modeling_utils.py```, we make appropriate changes to support propagating the metadata from tensor subclasses. We also add logic similar to `hqq` and `bnb` to directly load onto `cpu` rather than `meta`.
**Test Plan**
Modified unit test to allow safe serialization. Run using ```python tests/quantization/torchao_integration/test_torchao.py```
Reference https://huggingface.co/torchao-testing/opt-125m-Float8WeightOnlyConfig-v2-0.14.0.dev-safetensors for an example of a serialized model and test script
| {
"login": "SunMarc",
"id": 57196510,
"node_id": "MDQ6VXNlcjU3MTk2NTEw",
"avatar_url": "https://avatars.githubusercontent.com/u/57196510?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SunMarc",
"html_url": "https://github.com/SunMarc",
"followers_url": "https://api.github.com/users/SunMarc/followers",
"following_url": "https://api.github.com/users/SunMarc/following{/other_user}",
"gists_url": "https://api.github.com/users/SunMarc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SunMarc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SunMarc/subscriptions",
"organizations_url": "https://api.github.com/users/SunMarc/orgs",
"repos_url": "https://api.github.com/users/SunMarc/repos",
"events_url": "https://api.github.com/users/SunMarc/events{/privacy}",
"received_events_url": "https://api.github.com/users/SunMarc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40735/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40735/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40734 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40734/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40734/comments | https://api.github.com/repos/huggingface/transformers/issues/40734/events | https://github.com/huggingface/transformers/pull/40734 | 3,388,654,696 | PR_kwDOCUB6oc6nGuFz | 40,734 | Amanr/olmo3 sttn sink | {
"login": "aman-17",
"id": 44740048,
"node_id": "MDQ6VXNlcjQ0NzQwMDQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/44740048?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aman-17",
"html_url": "https://github.com/aman-17",
"followers_url": "https://api.github.com/users/aman-17/followers",
"following_url": "https://api.github.com/users/aman-17/following{/other_user}",
"gists_url": "https://api.github.com/users/aman-17/gists{/gist_id}",
"starred_url": "https://api.github.com/users/aman-17/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aman-17/subscriptions",
"organizations_url": "https://api.github.com/users/aman-17/orgs",
"repos_url": "https://api.github.com/users/aman-17/repos",
"events_url": "https://api.github.com/users/aman-17/events{/privacy}",
"received_events_url": "https://api.github.com/users/aman-17/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T20:10:44 | 2025-09-05T20:13:05 | 2025-09-05T20:13:05 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40734",
"html_url": "https://github.com/huggingface/transformers/pull/40734",
"diff_url": "https://github.com/huggingface/transformers/pull/40734.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40734.patch",
"merged_at": null
} | # 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 # (issue)
## 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#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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "aman-17",
"id": 44740048,
"node_id": "MDQ6VXNlcjQ0NzQwMDQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/44740048?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aman-17",
"html_url": "https://github.com/aman-17",
"followers_url": "https://api.github.com/users/aman-17/followers",
"following_url": "https://api.github.com/users/aman-17/following{/other_user}",
"gists_url": "https://api.github.com/users/aman-17/gists{/gist_id}",
"starred_url": "https://api.github.com/users/aman-17/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aman-17/subscriptions",
"organizations_url": "https://api.github.com/users/aman-17/orgs",
"repos_url": "https://api.github.com/users/aman-17/repos",
"events_url": "https://api.github.com/users/aman-17/events{/privacy}",
"received_events_url": "https://api.github.com/users/aman-17/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40734/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40734/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40733 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40733/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40733/comments | https://api.github.com/repos/huggingface/transformers/issues/40733/events | https://github.com/huggingface/transformers/pull/40733 | 3,388,436,807 | PR_kwDOCUB6oc6nF-_9 | 40,733 | Fix doc for PerceptionLMForConditionalGeneration forward. | {
"login": "shuminghu",
"id": 2934295,
"node_id": "MDQ6VXNlcjI5MzQyOTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/2934295?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shuminghu",
"html_url": "https://github.com/shuminghu",
"followers_url": "https://api.github.com/users/shuminghu/followers",
"following_url": "https://api.github.com/users/shuminghu/following{/other_user}",
"gists_url": "https://api.github.com/users/shuminghu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/shuminghu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shuminghu/subscriptions",
"organizations_url": "https://api.github.com/users/shuminghu/orgs",
"repos_url": "https://api.github.com/users/shuminghu/repos",
"events_url": "https://api.github.com/users/shuminghu/events{/privacy}",
"received_events_url": "https://api.github.com/users/shuminghu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T18:34:11 | 2025-09-10T15:07:09 | 2025-09-10T09:57:19 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40733",
"html_url": "https://github.com/huggingface/transformers/pull/40733",
"diff_url": "https://github.com/huggingface/transformers/pull/40733.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40733.patch",
"merged_at": "2025-09-10T09:57:19"
} | @auto_docstring for `PerceptionLMForConditionalGeneration`'s `forward` would pin the doc for the method in modeling file to a stale version even if the doc was manually updated in the modular file.
Removing it and then run
```
python utils/modular_model_converter.py --files_to_parse src/transformers/models/perception_lm/modular_perception_lm.py
```
updated the example in doc modeling file.
@zucchini-nlp | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40733/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40733/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40732 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40732/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40732/comments | https://api.github.com/repos/huggingface/transformers/issues/40732/events | https://github.com/huggingface/transformers/pull/40732 | 3,388,238,261 | PR_kwDOCUB6oc6nFU4h | 40,732 | Fix `continue_final_message` in `apply_chat_template` to prevent substring matching issues | {
"login": "abdokaseb",
"id": 22381101,
"node_id": "MDQ6VXNlcjIyMzgxMTAx",
"avatar_url": "https://avatars.githubusercontent.com/u/22381101?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/abdokaseb",
"html_url": "https://github.com/abdokaseb",
"followers_url": "https://api.github.com/users/abdokaseb/followers",
"following_url": "https://api.github.com/users/abdokaseb/following{/other_user}",
"gists_url": "https://api.github.com/users/abdokaseb/gists{/gist_id}",
"starred_url": "https://api.github.com/users/abdokaseb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abdokaseb/subscriptions",
"organizations_url": "https://api.github.com/users/abdokaseb/orgs",
"repos_url": "https://api.github.com/users/abdokaseb/repos",
"events_url": "https://api.github.com/users/abdokaseb/events{/privacy}",
"received_events_url": "https://api.github.com/users/abdokaseb/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T17:07:43 | 2025-09-08T17:25:57 | 2025-09-08T17:25:12 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40732",
"html_url": "https://github.com/huggingface/transformers/pull/40732",
"diff_url": "https://github.com/huggingface/transformers/pull/40732.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40732.patch",
"merged_at": "2025-09-08T17:25:12"
} | # What does this PR do?
This PR fixes an edge case in `apply_chat_template` where the `continue_final_message` parameter could behave unexpectedly if the final message is empty or happens to match a substring in the rendered template.
Previously, the function relied on `rindex(final_message.strip())` to locate the final message in the rendered chat. This caused incorrect truncation when the content was empty or matched other parts of the template.
To resolve this, we introduce a special internal marker (`CONTINUE_FINAL_MESSAGE_TAG`) that is appended to the final message during rendering. After rendering, the template is safely split at this tag, and the marker is removed. This ensures correct and predictable behavior in all cases.
Fixes #40687
## Motivation and Context
- Prevents accidental truncation of rendered chat when final message content is empty or overlaps with template tokens.
- Provides a robust and explicit way to locate the correct split point.
- Does not modify user-facing behavior, as the marker is removed before returning the rendered chat.
- Uses a copy of the conversation to avoid mutating user input.
## 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?
@Rocketknight1 @ArthurZucker | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40732/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40732/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40731 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40731/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40731/comments | https://api.github.com/repos/huggingface/transformers/issues/40731/events | https://github.com/huggingface/transformers/issues/40731 | 3,388,133,990 | I_kwDOCUB6oc7J8tJm | 40,731 | "AutoProcessor.from_pretrained" cannot run in distributed environments after v4.56.0 | {
"login": "erikchwang",
"id": 16256959,
"node_id": "MDQ6VXNlcjE2MjU2OTU5",
"avatar_url": "https://avatars.githubusercontent.com/u/16256959?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/erikchwang",
"html_url": "https://github.com/erikchwang",
"followers_url": "https://api.github.com/users/erikchwang/followers",
"following_url": "https://api.github.com/users/erikchwang/following{/other_user}",
"gists_url": "https://api.github.com/users/erikchwang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/erikchwang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erikchwang/subscriptions",
"organizations_url": "https://api.github.com/users/erikchwang/orgs",
"repos_url": "https://api.github.com/users/erikchwang/repos",
"events_url": "https://api.github.com/users/erikchwang/events{/privacy}",
"received_events_url": "https://api.github.com/users/erikchwang/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-05T16:28:33 | 2025-09-17T07:46:50 | 2025-09-17T07:46:50 | NONE | null | null | null | null | Python 3.12
transformers>=4.56.0
Running "AutoProcessor.from_pretrained" (e.g. AutoProcessor.from_pretrained('Qwen/Qwen2.5-VL-7B-Instruct')) in a ray or torchrun environment causes error:
`OSError: Can't load image processor for 'Qwen/Qwen2.5-VL-7B-Instruct'. If you were trying to load it from '[https://huggingface.co/models'](https://huggingface.co/models%27), make sure you don't have a local directory with the same name.`
This issue happens after v4.56.0.
Downgrading to v4.55.4 can avoid this issue. | {
"login": "ArthurZucker",
"id": 48595927,
"node_id": "MDQ6VXNlcjQ4NTk1OTI3",
"avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArthurZucker",
"html_url": "https://github.com/ArthurZucker",
"followers_url": "https://api.github.com/users/ArthurZucker/followers",
"following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions",
"organizations_url": "https://api.github.com/users/ArthurZucker/orgs",
"repos_url": "https://api.github.com/users/ArthurZucker/repos",
"events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArthurZucker/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40731/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40731/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40730 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40730/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40730/comments | https://api.github.com/repos/huggingface/transformers/issues/40730/events | https://github.com/huggingface/transformers/pull/40730 | 3,388,124,484 | PR_kwDOCUB6oc6nE8yo | 40,730 | Add LongCat-Flash | {
"login": "molbap",
"id": 39954772,
"node_id": "MDQ6VXNlcjM5OTU0Nzcy",
"avatar_url": "https://avatars.githubusercontent.com/u/39954772?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/molbap",
"html_url": "https://github.com/molbap",
"followers_url": "https://api.github.com/users/molbap/followers",
"following_url": "https://api.github.com/users/molbap/following{/other_user}",
"gists_url": "https://api.github.com/users/molbap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/molbap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/molbap/subscriptions",
"organizations_url": "https://api.github.com/users/molbap/orgs",
"repos_url": "https://api.github.com/users/molbap/repos",
"events_url": "https://api.github.com/users/molbap/events{/privacy}",
"received_events_url": "https://api.github.com/users/molbap/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 1843244711,
"node_id": "MDU6TGFiZWwxODQzMjQ0NzEx",
"url": "https://api.github.com/repos/huggingface/transformers/labels/New%20model",
"name": "New model",
"color": "fbca04",
"default": false,
"description": ""
}
] | closed | false | null | [] | null | [] | 2025-09-05T16:24:19 | 2025-09-17T12:48:17 | 2025-09-17T12:48:11 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40730",
"html_url": "https://github.com/huggingface/transformers/pull/40730",
"diff_url": "https://github.com/huggingface/transformers/pull/40730.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40730.patch",
"merged_at": "2025-09-17T12:48:11"
} | # What does this PR do?
As per title, adds support for LongCat-Flash, a 560B MoE from Meituan.
Status:
- [x] Current `modeling_longcat_flash` file allows loading checkpoint without `trust_remote_code`, using a specific `base_model_tp_plan` found in the config. `from_pretrained('..., tp_plan='auto') loads the model properly.
- [x] Chat template is as provided by authors.
- [x] A no-op hook added to deepseek_v3 to abstract lora scaling.
- [x] Testing out generations and correctness. All work.
- [x] A few modular adjustments to make to derive from DeepSeekv3, estimate ~300 loc total.
- [x] Quality & last touches, adding a new checkpoint to maximize compatibility with transformers
- [x] Make CI happy
- [x] Include parallelism tests
Launch snippet:
```python
# launch_longcat.py
from transformers import LongcatFlashForCausalLM, AutoTokenizer
import torch
torch.manual_seed(30)
model_id = "meituan-longcat/LongCat-Flash-Chat"
tokenizer = AutoTokenizer.from_pretrained(model_id)
chat = [
{"role": "user", "content": "Hello! What is the capital of France? What can you tell me about it?"},
]
model = LongcatFlashForCausalLM.from_pretrained(
model_id,
tp_plan="auto",
dtype=torch.bfloat16,
trust_remote_code=False, # can be removed.
)
inputs = tokenizer.apply_chat_template(
chat, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=30)
print(tokenizer.batch_decode(outputs))
```
Note that you will need at least 2x8 H100 to launch the model with TP as follows
```bash
torchrun --nproc_per_node=8 --nnodes=2 --node_rank=0 | 1 --rdzv-id <an_id> --rdzv-backend c10d --rdzv-endpoint $NODE_ID:$NODE_PORT --log-dir ./logs_longcat launch_longcat.py
```
And you'll get
[Round 0] USER:Hello! What is the capital of France? What can you tell me about it? ASSISTANT:Hello! 😊 The capital of France is **Paris**, one of the most famous and beloved cities in the world. Here’s a quick overview of what makes Paris special:
### **1. Iconic Landmarks**
- **Eiffel Tower** – The global symbol of France, built in 1889 for the World\'s Fair.
- **Notre-Dame Cathedral** – A masterpiece of Gothic architecture (currently under restoration after the 2019 fire).
- **Louvre Museum** – The world’s largest art museum, home to the *Mona Lisa* and *Venus de Milo*.
- **Sacré-Cœur Basilica** – A stunning white church atop Montmartre with panoramic views.
- **Arc de Triomphe** – Honors French military victories, with the Tomb of the Unknown Soldier beneath it.
- **Champs-Élysées** – A glamorous avenue leading to the Arc de Triomphe, lined with shops and cafés.
### **2. Culture & Arts**
- Paris is the **"City of Light"** (*La Ville Lumière*), a nickname from its early adoption of street lighting and its role as a center of enlightenment.
- It’s a global hub for **fashion** (haute couture, Paris Fashion Week) and **art** (Impressionism, Picasso, Dali).
- Famous literary figures like Hemingway, Fitzgerald, and Sartre lived and wrote here.
### **3. Food & Cuisine**
- **Croissants, baguettes, macarons, and crème brûlée** are just a few of its culinary delights.
- Paris has **over 100 Michelin-starred restaurants** and countless cozy *bistros*.
- The **Marché d’Aligre** and **Rue Mouffetard** are great for fresh produce and local flavors.
### **4. History & Politics**
- Founded in the **3rd century BC** by the Parisii tribe, it became a major European city under the Romans.
- The **French Revolution (1789–1799)** began here, leading to the fall of the monarchy.
- Today, it’s the political and economic heart of France, housing the **French President’s residence (Élysée Palace)** and the **National Assembly**.
### ** | {
"login": "molbap",
"id": 39954772,
"node_id": "MDQ6VXNlcjM5OTU0Nzcy",
"avatar_url": "https://avatars.githubusercontent.com/u/39954772?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/molbap",
"html_url": "https://github.com/molbap",
"followers_url": "https://api.github.com/users/molbap/followers",
"following_url": "https://api.github.com/users/molbap/following{/other_user}",
"gists_url": "https://api.github.com/users/molbap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/molbap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/molbap/subscriptions",
"organizations_url": "https://api.github.com/users/molbap/orgs",
"repos_url": "https://api.github.com/users/molbap/repos",
"events_url": "https://api.github.com/users/molbap/events{/privacy}",
"received_events_url": "https://api.github.com/users/molbap/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40730/reactions",
"total_count": 2,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 2,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40730/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40729 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40729/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40729/comments | https://api.github.com/repos/huggingface/transformers/issues/40729/events | https://github.com/huggingface/transformers/pull/40729 | 3,388,104,908 | PR_kwDOCUB6oc6nE40R | 40,729 | [deprecations] Remove generate-related deprecations up to v4.56 | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T16:16:08 | 2025-09-09T15:32:42 | 2025-09-09T15:32:41 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40729",
"html_url": "https://github.com/huggingface/transformers/pull/40729",
"diff_url": "https://github.com/huggingface/transformers/pull/40729.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40729.patch",
"merged_at": "2025-09-09T15:32:41"
} | # What does this PR do?
See title :) | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40729/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40729/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40728 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40728/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40728/comments | https://api.github.com/repos/huggingface/transformers/issues/40728/events | https://github.com/huggingface/transformers/pull/40728 | 3,388,027,008 | PR_kwDOCUB6oc6nEoQr | 40,728 | feat(serve): add OTEL | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-05T15:52:11 | 2025-09-05T16:04:43 | null | MEMBER | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40728",
"html_url": "https://github.com/huggingface/transformers/pull/40728",
"diff_url": "https://github.com/huggingface/transformers/pull/40728.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40728.patch",
"merged_at": null
} | Adding open-telemetry to `transformers serve` | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40728/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40728/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40727 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40727/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40727/comments | https://api.github.com/repos/huggingface/transformers/issues/40727/events | https://github.com/huggingface/transformers/pull/40727 | 3,388,021,128 | PR_kwDOCUB6oc6nEm-k | 40,727 | Make debugging failing tests (check and update expect output values) easier 🔥 | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T15:50:37 | 2025-09-16T08:21:51 | 2025-09-16T08:21:49 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40727",
"html_url": "https://github.com/huggingface/transformers/pull/40727",
"diff_url": "https://github.com/huggingface/transformers/pull/40727.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40727.patch",
"merged_at": "2025-09-16T08:21:49"
} | # What does this PR do?
We have a lot of `torch.testing.assert_close` and `unittest.TestCase.assertEquatl` (and its variants) in our tests. Sometimes, we even have multiple such statements in a single test.
It's quite annoying and tedious to run a test, failing to get the (full) output, copy-paste to the source code, re-run the same test again to get the output of the second failure (if any), .... over and over again.
And even if using python breakpoint or IDE features, it's all a bit tiring ...
This PR add some (definitely arguably very hacky) way to collect all these output values (and information) in one go, providing the outputs in a more uniform and pretty way to be copied-pasted.
> PATCH_TESTING_METHODS_TO_COLLECT_OUTPUTS=yes python3 -m pytest -v ...
could produce
### On terminal
```bash
(py39) λ python -m pytest -v tests/models/vit/test_modeling_vit.py -k "test_foo"
================================================================ test session starts ================================================================= platform win32 -- Python 3.9.21, pytest-8.4.0.dev529+g4b0a5b9e7, pluggy-1.5.0 -- C:\Users\yih-d\miniconda3\envs\py39\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\yih-d\Desktop\Yih-Dar\Project\transformers
configfile: pyproject.toml
plugins: anyio-4.9.0, flakefinder-1.1.0, xdist-0.1.dev1327+g43b33f505.d20250820
collected 193 items / 191 deselected / 2 selected
tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo FAILED [ 50%] tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo2 FAILED [100%]
====================================================================== FAILURES ====================================================================== _______________________________________________________________ ViTModelTest.test_foo ________________________________________________________________
self = <tests.models.vit.test_modeling_vit.ViTModelTest testMethod=test_foo>
def test_foo(self):
# breakpoint()
> self.call(torch.tensor([[1.0, 2.3], [2.0, 3.3], [3.0, 2.5]]), torch.tensor([[2.0, 2.3], [2.0, 3.3], [3.0, 2.5]]))
tests\models\vit\test_modeling_vit.py:235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\models\vit\test_modeling_vit.py:246: in call
call3(x, y)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = tensor([[1.0000, 2.3000],
[2.0000, 3.3000],
[3.0000, 2.5000]])
y = tensor([[2.0000, 2.3000],
[2.0000, 3.3000],
[3.0000, 2.5000]])
def call3(x, y):
> torch.testing.assert_close(x, y)
E AssertionError: Tensor-likes are not close!
E
E Mismatched elements: 1 / 6 (16.7%)
E Greatest absolute difference: 1.0 at index (0, 0) (up to 1e-05 allowed)
E Greatest relative difference: 0.5 at index (0, 0) (up to 1.3e-06 allowed)
E
E ================================================================================
E Handled Failures: (2 handled):
E --------------------------------------------------------------------------------
E
E test:
E
E tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo
E
E --------------------------------------------------------------------------------
E
E test context: tests/models/vit/test_modeling_vit.py:235
E
E self.call(torch.tensor([[1.0, 2.3], [2.0, 3.3], [3.0, 2.5]]), torch.tensor([[2.0, 2.3], [2.0, 3.3], [3.0, 2.5]]))
E
E --------------------------------------------------------------------------------
E
E caller context: tests\models\vit\test_modeling_vit.py:185
E
E torch.testing.assert_close(x, y)
E
E --------------------------------------------------------------------------------
E
E patched method: torch.testing._comparison.assert_close
E
E --------------------------------------------------------------------------------
E
E argument name: `actual`
E argument expression: `x`
E
E argument value:
E
E [
E [1.0000, 2.3000],
E [2.0000, 3.3000],
E [3.0000, 2.5000],
E ]
E
E --------------------------------------------------------------------------------
E
E argument name: `expected`
E argument expression: `y`
E
E argument value:
E
E [
E [2.0000, 2.3000],
E [2.0000, 3.3000],
E [3.0000, 2.5000],
E ]
E
E ================================================================================
E
E test:
E
E tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo
E
E --------------------------------------------------------------------------------
E
E test context: tests/models/vit/test_modeling_vit.py:237
E
E self.assertEqual(["bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content"], ["ben, je ne suis pas content"])
E
E --------------------------------------------------------------------------------
E
E caller context: tests\models\vit\test_modeling_vit.py:237
E
E self.assertEqual(["bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content"], ["ben, je ne suis pas content"])
E
E --------------------------------------------------------------------------------
E
E patched method: unittest.case.assertEqual
E
E --------------------------------------------------------------------------------
E
E argument name: `first`
E argument expression: `['bonjour, je suis content', 'bonjour, je suis content', 'bonjour, je suis content', 'bonjour, je suis content']`
E
E argument value:
E
E ["bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content"]
E
E --------------------------------------------------------------------------------
E
E argument name: `second`
E argument expression: `['ben, je ne suis pas content']`
E
E argument value:
E
E ["ben, je ne suis pas content"]
E
E ================================================================================
E Unhandled Failures: (1 unhandled):
E --------------------------------------------------------------------------------
E
E AssertionError: assert 1 == 2
E
E test_modeling_vit.py:237
E
E --------------------------------------------------------------------------------
E Note: This failure occurred after other failures analyzed by the patched assertion methods.
E To see the full details, temporarily disable assertion patching.
E ================================================================================
tests\models\vit\test_modeling_vit.py:185: AssertionError
_______________________________________________________________ ViTModelTest.test_foo2 _______________________________________________________________
self = <tests.models.vit.test_modeling_vit.ViTModelTest testMethod=test_foo2>
def test_foo2(self):
# breakpoint()
> self.call(1.0, 3.0)
tests\models\vit\test_modeling_vit.py:252:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\models\vit\test_modeling_vit.py:246: in call
call3(x, y)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = 1.0, y = 3.0
def call3(x, y):
> torch.testing.assert_close(x, y)
E AssertionError: Scalars are not close!
E
E Expected 3.0 but got 1.0.
E Absolute difference: 2.0 (up to 1e-07 allowed)
E Relative difference: 0.6666666666666666 (up to 1e-07 allowed)
tests\models\vit\test_modeling_vit.py:185: AssertionError
================================================================== warnings summary ================================================================== ..\..\..\..\miniconda3\envs\py39\lib\site-packages\_pytest\config\__init__.py:1474
C:\Users\yih-d\miniconda3\envs\py39\lib\site-packages\_pytest\config\__init__.py:1474: PytestConfigWarning: Unknown config option: asyncio_default_fixture_loop_scope
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
src\transformers\testing_utils.py:2843
C:\Users\yih-d\Desktop\Yih-Dar\Project\transformers\src\transformers\testing_utils.py:2843: PytestUnknownMarkWarning: Unknown pytest.mark.order - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
return pytest.mark.order(1)(test_case)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================== short test summary info =============================================================== FAILED tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo - AssertionError: Tensor-likes are not close!
FAILED tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo2 - AssertionError: Scalars are not close!
=================================================== 2 failed, 191 deselected, 2 warnings in 5.15s ====================================================
```
### Output file (`captured_info.txt`)
```txt
test:
tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo
--------------------------------------------------------------------------------
test context: tests/models/vit/test_modeling_vit.py:235
self.call(torch.tensor([[1.0, 2.3], [2.0, 3.3], [3.0, 2.5]]), torch.tensor([[2.0, 2.3], [2.0, 3.3], [3.0, 2.5]]))
--------------------------------------------------------------------------------
caller context: tests\models\vit\test_modeling_vit.py:185
torch.testing.assert_close(x, y)
--------------------------------------------------------------------------------
patched method: torch.testing._comparison.assert_close
--------------------------------------------------------------------------------
argument name: `actual`
argument expression: `x`
argument value:
[
[1.0000, 2.3000],
[2.0000, 3.3000],
[3.0000, 2.5000],
]
--------------------------------------------------------------------------------
argument name: `expected`
argument expression: `y`
argument value:
[
[2.0000, 2.3000],
[2.0000, 3.3000],
[3.0000, 2.5000],
]
========================================================================================================================
test:
tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo
--------------------------------------------------------------------------------
test context: tests/models/vit/test_modeling_vit.py:237
self.assertEqual(["bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content"], ["ben, je ne suis pas content"])
--------------------------------------------------------------------------------
caller context: tests\models\vit\test_modeling_vit.py:237
self.assertEqual(["bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content"], ["ben, je ne suis pas content"])
--------------------------------------------------------------------------------
patched method: unittest.case.assertEqual
--------------------------------------------------------------------------------
argument name: `first`
argument expression: `['bonjour, je suis content', 'bonjour, je suis content', 'bonjour, je suis content', 'bonjour, je suis content']`
argument value:
["bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content", "bonjour, je suis content"]
--------------------------------------------------------------------------------
argument name: `second`
argument expression: `['ben, je ne suis pas content']`
argument value:
["ben, je ne suis pas content"]
========================================================================================================================
test:
tests/models/vit/test_modeling_vit.py::ViTModelTest::test_foo2
--------------------------------------------------------------------------------
test context: tests/models/vit/test_modeling_vit.py:252
self.call(1.0, 3.0)
--------------------------------------------------------------------------------
caller context: tests\models\vit\test_modeling_vit.py:185
torch.testing.assert_close(x, y)
--------------------------------------------------------------------------------
patched method: torch.testing._comparison.assert_close
--------------------------------------------------------------------------------
argument name: `actual`
argument expression: `x`
argument value:
1.0
--------------------------------------------------------------------------------
argument name: `expected`
argument expression: `y`
argument value:
3.0
========================================================================================================================
``` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40727/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40727/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40726 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40726/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40726/comments | https://api.github.com/repos/huggingface/transformers/issues/40726/events | https://github.com/huggingface/transformers/pull/40726 | 3,387,997,246 | PR_kwDOCUB6oc6nEh3s | 40,726 | [generate] `PromptLookupCandidateGenerator` won't generate forbidden tokens | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T15:42:33 | 2025-09-09T14:06:45 | 2025-09-09T11:04:02 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40726",
"html_url": "https://github.com/huggingface/transformers/pull/40726",
"diff_url": "https://github.com/huggingface/transformers/pull/40726.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40726.patch",
"merged_at": "2025-09-09T11:04:02"
} | # What does this PR do?
See title.
In the process, deflakes a lot of tests :) (It was generating forbidden tokens in tests, like image tokens in VLMs -- now we can specify which sequences are forbidden)
`py.test tests/models/voxtral/test_modeling_voxtral.py -k test_prompt_lookup_decoding_matches_greedy_search --flake-finder --flake-runs 1000` now runs with without problems. | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40726/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40726/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40725 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40725/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40725/comments | https://api.github.com/repos/huggingface/transformers/issues/40725/events | https://github.com/huggingface/transformers/pull/40725 | 3,387,961,347 | PR_kwDOCUB6oc6nEaNu | 40,725 | Segformer tests fix | {
"login": "JawadAliAI",
"id": 137032884,
"node_id": "U_kgDOCCr0tA",
"avatar_url": "https://avatars.githubusercontent.com/u/137032884?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JawadAliAI",
"html_url": "https://github.com/JawadAliAI",
"followers_url": "https://api.github.com/users/JawadAliAI/followers",
"following_url": "https://api.github.com/users/JawadAliAI/following{/other_user}",
"gists_url": "https://api.github.com/users/JawadAliAI/gists{/gist_id}",
"starred_url": "https://api.github.com/users/JawadAliAI/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JawadAliAI/subscriptions",
"organizations_url": "https://api.github.com/users/JawadAliAI/orgs",
"repos_url": "https://api.github.com/users/JawadAliAI/repos",
"events_url": "https://api.github.com/users/JawadAliAI/events{/privacy}",
"received_events_url": "https://api.github.com/users/JawadAliAI/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T15:30:30 | 2025-09-08T11:00:00 | 2025-09-08T10:59:04 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40725",
"html_url": "https://github.com/huggingface/transformers/pull/40725",
"diff_url": "https://github.com/huggingface/transformers/pull/40725.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40725.patch",
"merged_at": null
} | # 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 # (issue)
## 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#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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40725/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40725/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40724 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40724/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40724/comments | https://api.github.com/repos/huggingface/transformers/issues/40724/events | https://github.com/huggingface/transformers/pull/40724 | 3,387,876,961 | PR_kwDOCUB6oc6nEIVm | 40,724 | Fixed loading LongT5 from legacy checkpoints | {
"login": "Szustarol",
"id": 61427290,
"node_id": "MDQ6VXNlcjYxNDI3Mjkw",
"avatar_url": "https://avatars.githubusercontent.com/u/61427290?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Szustarol",
"html_url": "https://github.com/Szustarol",
"followers_url": "https://api.github.com/users/Szustarol/followers",
"following_url": "https://api.github.com/users/Szustarol/following{/other_user}",
"gists_url": "https://api.github.com/users/Szustarol/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Szustarol/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Szustarol/subscriptions",
"organizations_url": "https://api.github.com/users/Szustarol/orgs",
"repos_url": "https://api.github.com/users/Szustarol/repos",
"events_url": "https://api.github.com/users/Szustarol/events{/privacy}",
"received_events_url": "https://api.github.com/users/Szustarol/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T15:05:25 | 2025-09-24T12:13:19 | 2025-09-24T12:13:19 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40724",
"html_url": "https://github.com/huggingface/transformers/pull/40724",
"diff_url": "https://github.com/huggingface/transformers/pull/40724.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40724.patch",
"merged_at": "2025-09-24T12:13:19"
} | # 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 #40635
The problem with loading legacy LongT5 checkpoints stems from the way the shared embedding tokens are defined in the model:
https://github.com/huggingface/transformers/blob/96a5774f2e048c21b9c0408c4fddfcf23a8934c5/src/transformers/models/longt5/modeling_longt5.py#L1350-L1356
In most legacy checkpoints they are not tied via the tied keys, but were still trained from the same shared weight that is created here:
https://github.com/huggingface/transformers/blob/96a5774f2e048c21b9c0408c4fddfcf23a8934c5/src/transformers/models/longt5/modeling_longt5.py#L1901
The solution to this problem is to manually assign the weights in overriden `from_pretrained` if the model contains the shared weights.
This fix is somewhat dirty, it would be much better to just update them directly in the state_dict to avoid the missing keys warning, but there is currently no public interface of the `PretrainedModel` class that allows for that.
If the reviewer has a better idea of how this could be accounted for I'm ready to devote my time towards fixing this issue.
## 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.
- [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).
- [ ] Did you write any new necessary tests?
## Who can review?
@Rocketknight1
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40724/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 1,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40724/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40723 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40723/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40723/comments | https://api.github.com/repos/huggingface/transformers/issues/40723/events | https://github.com/huggingface/transformers/issues/40723 | 3,387,870,533 | I_kwDOCUB6oc7J7s1F | 40,723 | Gemma3 with flash-attention2 outputs warning | {
"login": "tolgadur",
"id": 19579420,
"node_id": "MDQ6VXNlcjE5NTc5NDIw",
"avatar_url": "https://avatars.githubusercontent.com/u/19579420?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tolgadur",
"html_url": "https://github.com/tolgadur",
"followers_url": "https://api.github.com/users/tolgadur/followers",
"following_url": "https://api.github.com/users/tolgadur/following{/other_user}",
"gists_url": "https://api.github.com/users/tolgadur/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tolgadur/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tolgadur/subscriptions",
"organizations_url": "https://api.github.com/users/tolgadur/orgs",
"repos_url": "https://api.github.com/users/tolgadur/repos",
"events_url": "https://api.github.com/users/tolgadur/events{/privacy}",
"received_events_url": "https://api.github.com/users/tolgadur/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-05T15:03:23 | 2025-09-08T12:41:53 | 2025-09-08T12:41:53 | NONE | null | null | null | null | ### System Info
When training with the GRPO trainer with flash-attention2 or any other mechanism other than eager you get a warning that can be quite confusing. The warning comes from here: https://github.com/huggingface/transformers/blob/main/src/transformers/models/gemma3/modeling_gemma3.py#L657-L661
However, looking at the code and related issues https://github.com/huggingface/transformers/issues/31997#issuecomment-2840563627 https://huggingface.co/google/gemma-2-9b-it/discussions/9#66923856e338220687e4fe1e it looks like this issue doesn't really exist anymore fore Gemma3 with the latest flash attention package. Could we remove this warning?
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] 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
run the grpo trl trainer with any gemma3 model.
### Expected behavior
not see a warning when using flash-attention2 | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40723/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40723/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40722 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40722/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40722/comments | https://api.github.com/repos/huggingface/transformers/issues/40722/events | https://github.com/huggingface/transformers/pull/40722 | 3,387,823,361 | PR_kwDOCUB6oc6nD8_g | 40,722 | refactor(serve): move `request_id` to headers | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T14:47:37 | 2025-09-05T15:50:07 | 2025-09-05T15:50:05 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40722",
"html_url": "https://github.com/huggingface/transformers/pull/40722",
"diff_url": "https://github.com/huggingface/transformers/pull/40722.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40722.patch",
"merged_at": "2025-09-05T15:50:04"
} | Adding a middleware to `serve` to parse request id from headers rather than adding it to the request body. | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40722/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40722/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40721 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40721/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40721/comments | https://api.github.com/repos/huggingface/transformers/issues/40721/events | https://github.com/huggingface/transformers/pull/40721 | 3,387,813,175 | PR_kwDOCUB6oc6nD60i | 40,721 | Fix: handle None defaults safely in SegformerMixFFN | {
"login": "JawadAliAI",
"id": 137032884,
"node_id": "U_kgDOCCr0tA",
"avatar_url": "https://avatars.githubusercontent.com/u/137032884?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JawadAliAI",
"html_url": "https://github.com/JawadAliAI",
"followers_url": "https://api.github.com/users/JawadAliAI/followers",
"following_url": "https://api.github.com/users/JawadAliAI/following{/other_user}",
"gists_url": "https://api.github.com/users/JawadAliAI/gists{/gist_id}",
"starred_url": "https://api.github.com/users/JawadAliAI/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JawadAliAI/subscriptions",
"organizations_url": "https://api.github.com/users/JawadAliAI/orgs",
"repos_url": "https://api.github.com/users/JawadAliAI/repos",
"events_url": "https://api.github.com/users/JawadAliAI/events{/privacy}",
"received_events_url": "https://api.github.com/users/JawadAliAI/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T14:44:28 | 2025-09-07T10:17:33 | 2025-09-07T10:17:33 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40721",
"html_url": "https://github.com/huggingface/transformers/pull/40721",
"diff_url": "https://github.com/huggingface/transformers/pull/40721.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40721.patch",
"merged_at": null
} | # 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 # (issue)
## 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?
- [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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "JawadAliAI",
"id": 137032884,
"node_id": "U_kgDOCCr0tA",
"avatar_url": "https://avatars.githubusercontent.com/u/137032884?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JawadAliAI",
"html_url": "https://github.com/JawadAliAI",
"followers_url": "https://api.github.com/users/JawadAliAI/followers",
"following_url": "https://api.github.com/users/JawadAliAI/following{/other_user}",
"gists_url": "https://api.github.com/users/JawadAliAI/gists{/gist_id}",
"starred_url": "https://api.github.com/users/JawadAliAI/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JawadAliAI/subscriptions",
"organizations_url": "https://api.github.com/users/JawadAliAI/orgs",
"repos_url": "https://api.github.com/users/JawadAliAI/repos",
"events_url": "https://api.github.com/users/JawadAliAI/events{/privacy}",
"received_events_url": "https://api.github.com/users/JawadAliAI/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40721/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40721/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40720 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40720/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40720/comments | https://api.github.com/repos/huggingface/transformers/issues/40720/events | https://github.com/huggingface/transformers/pull/40720 | 3,387,743,527 | PR_kwDOCUB6oc6nDr90 | 40,720 | [tests] remove overwrites of removed test | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T14:22:23 | 2025-09-05T15:04:25 | 2025-09-05T15:04:22 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40720",
"html_url": "https://github.com/huggingface/transformers/pull/40720",
"diff_url": "https://github.com/huggingface/transformers/pull/40720.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40720.patch",
"merged_at": "2025-09-05T15:04:22"
} | # What does this PR do?
Contrastive beam seach has been moved to a hub method, so we no longer have related tests in `GenerationTesterMixin`. This PR removes their overwrites (skips) | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40720/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40720/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40719 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40719/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40719/comments | https://api.github.com/repos/huggingface/transformers/issues/40719/events | https://github.com/huggingface/transformers/pull/40719 | 3,387,465,482 | PR_kwDOCUB6oc6nCwE1 | 40,719 | Remove reference of video_load_backend and video_fps for processor | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T12:56:15 | 2025-09-10T08:52:39 | 2025-09-10T08:37:12 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40719",
"html_url": "https://github.com/huggingface/transformers/pull/40719",
"diff_url": "https://github.com/huggingface/transformers/pull/40719.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40719.patch",
"merged_at": "2025-09-10T08:37:12"
} | # What does this PR do?
They are deprecated.
| {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40719/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40719/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40718 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40718/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40718/comments | https://api.github.com/repos/huggingface/transformers/issues/40718/events | https://github.com/huggingface/transformers/pull/40718 | 3,387,376,131 | PR_kwDOCUB6oc6nCcxr | 40,718 | rm src/transformers/convert_pytorch_checkpoint_to_tf2.py | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T12:23:41 | 2025-09-09T15:34:58 | 2025-09-09T15:34:54 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40718",
"html_url": "https://github.com/huggingface/transformers/pull/40718",
"diff_url": "https://github.com/huggingface/transformers/pull/40718.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40718.patch",
"merged_at": "2025-09-09T15:34:54"
} | # What does this PR do?
We don't want to convert more PT weights into TF2 weights :) | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40718/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40718/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40717 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40717/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40717/comments | https://api.github.com/repos/huggingface/transformers/issues/40717/events | https://github.com/huggingface/transformers/pull/40717 | 3,387,331,329 | PR_kwDOCUB6oc6nCTDh | 40,717 | [serve] re-enable tests | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T12:08:16 | 2025-09-05T14:15:37 | 2025-09-05T14:15:34 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40717",
"html_url": "https://github.com/huggingface/transformers/pull/40717",
"diff_url": "https://github.com/huggingface/transformers/pull/40717.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40717.patch",
"merged_at": "2025-09-05T14:15:34"
} | # What does this PR do?
`RUN_SLOW=1 py.test tests/commands/test_serving.py` is crashing locally. I couldn't pin the exact cause, the but it is triggered by a UX-related warning.
This PR:
- removes the test-crashing warning, so we can run tests
- adds the needed requirements to `extras[testing]` so these tests actually run in our daily CI 👀 (atm, we're skipping a few tests, see [here](https://github.com/huggingface/transformers/actions/runs/17482128457/job/49654564234)) | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40717/reactions",
"total_count": 2,
"+1": 2,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40717/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40716 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40716/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40716/comments | https://api.github.com/repos/huggingface/transformers/issues/40716/events | https://github.com/huggingface/transformers/pull/40716 | 3,387,301,503 | PR_kwDOCUB6oc6nCMrh | 40,716 | Benchmarking v2 GH workflows | {
"login": "ahadnagy",
"id": 21314428,
"node_id": "MDQ6VXNlcjIxMzE0NDI4",
"avatar_url": "https://avatars.githubusercontent.com/u/21314428?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ahadnagy",
"html_url": "https://github.com/ahadnagy",
"followers_url": "https://api.github.com/users/ahadnagy/followers",
"following_url": "https://api.github.com/users/ahadnagy/following{/other_user}",
"gists_url": "https://api.github.com/users/ahadnagy/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ahadnagy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ahadnagy/subscriptions",
"organizations_url": "https://api.github.com/users/ahadnagy/orgs",
"repos_url": "https://api.github.com/users/ahadnagy/repos",
"events_url": "https://api.github.com/users/ahadnagy/events{/privacy}",
"received_events_url": "https://api.github.com/users/ahadnagy/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T11:56:30 | 2025-09-19T08:54:50 | 2025-09-19T08:54:50 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40716",
"html_url": "https://github.com/huggingface/transformers/pull/40716",
"diff_url": "https://github.com/huggingface/transformers/pull/40716.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40716.patch",
"merged_at": "2025-09-19T08:54:50"
} | # What does this PR do?
This PR is a follow-up to https://github.com/huggingface/transformers/pull/40486 that adds the workflows and HF Datasets upload to start collecting data.
## 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#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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "ahadnagy",
"id": 21314428,
"node_id": "MDQ6VXNlcjIxMzE0NDI4",
"avatar_url": "https://avatars.githubusercontent.com/u/21314428?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ahadnagy",
"html_url": "https://github.com/ahadnagy",
"followers_url": "https://api.github.com/users/ahadnagy/followers",
"following_url": "https://api.github.com/users/ahadnagy/following{/other_user}",
"gists_url": "https://api.github.com/users/ahadnagy/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ahadnagy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ahadnagy/subscriptions",
"organizations_url": "https://api.github.com/users/ahadnagy/orgs",
"repos_url": "https://api.github.com/users/ahadnagy/repos",
"events_url": "https://api.github.com/users/ahadnagy/events{/privacy}",
"received_events_url": "https://api.github.com/users/ahadnagy/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40716/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40716/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40715 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40715/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40715/comments | https://api.github.com/repos/huggingface/transformers/issues/40715/events | https://github.com/huggingface/transformers/pull/40715 | 3,387,268,746 | PR_kwDOCUB6oc6nCFqT | 40,715 | 🔴 Move variable output controls to `_prepare_generation_config ` | {
"login": "manueldeprada",
"id": 6536835,
"node_id": "MDQ6VXNlcjY1MzY4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/manueldeprada",
"html_url": "https://github.com/manueldeprada",
"followers_url": "https://api.github.com/users/manueldeprada/followers",
"following_url": "https://api.github.com/users/manueldeprada/following{/other_user}",
"gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions",
"organizations_url": "https://api.github.com/users/manueldeprada/orgs",
"repos_url": "https://api.github.com/users/manueldeprada/repos",
"events_url": "https://api.github.com/users/manueldeprada/events{/privacy}",
"received_events_url": "https://api.github.com/users/manueldeprada/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T11:43:19 | 2025-09-15T11:08:01 | 2025-09-15T11:08:01 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40715",
"html_url": "https://github.com/huggingface/transformers/pull/40715",
"diff_url": "https://github.com/huggingface/transformers/pull/40715.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40715.patch",
"merged_at": "2025-09-15T11:08:00"
} | This PR takes the defaults defined in #33870 and now ENFORCES that `prepare_inputs_for_generations()` passes along unused `model_kwargs` to `model_inputs`. This allows to clean up generation loops (and prefill steps). Thus, **it might break Hub-defined old models that do not pass unused arguments**.
Changes:
1. Clean up generation loops by moving `output_attentions` and `output_hidden_states` to `_prepare_generation_config`.
2. Allow these arguments in `_validate_model_kwargs`.
3. Rewrite old models that override `prepare_inputs_for_generation` to follow the standard practice and forward them.
i. This rewrite makes explicit some weird implicit behaviours: lots of old models are actively ignoring arguments like `attention_mask` or `token_type_ids` and then recreating them in `forward()`
| {
"login": "manueldeprada",
"id": 6536835,
"node_id": "MDQ6VXNlcjY1MzY4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/manueldeprada",
"html_url": "https://github.com/manueldeprada",
"followers_url": "https://api.github.com/users/manueldeprada/followers",
"following_url": "https://api.github.com/users/manueldeprada/following{/other_user}",
"gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions",
"organizations_url": "https://api.github.com/users/manueldeprada/orgs",
"repos_url": "https://api.github.com/users/manueldeprada/repos",
"events_url": "https://api.github.com/users/manueldeprada/events{/privacy}",
"received_events_url": "https://api.github.com/users/manueldeprada/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40715/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40715/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40714 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40714/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40714/comments | https://api.github.com/repos/huggingface/transformers/issues/40714/events | https://github.com/huggingface/transformers/pull/40714 | 3,387,150,458 | PR_kwDOCUB6oc6nBr9R | 40,714 | Remove TF and Flax from README | {
"login": "qubvel",
"id": 31920396,
"node_id": "MDQ6VXNlcjMxOTIwMzk2",
"avatar_url": "https://avatars.githubusercontent.com/u/31920396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qubvel",
"html_url": "https://github.com/qubvel",
"followers_url": "https://api.github.com/users/qubvel/followers",
"following_url": "https://api.github.com/users/qubvel/following{/other_user}",
"gists_url": "https://api.github.com/users/qubvel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/qubvel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qubvel/subscriptions",
"organizations_url": "https://api.github.com/users/qubvel/orgs",
"repos_url": "https://api.github.com/users/qubvel/repos",
"events_url": "https://api.github.com/users/qubvel/events{/privacy}",
"received_events_url": "https://api.github.com/users/qubvel/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-05T11:01:31 | 2025-09-05T11:12:26 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40714",
"html_url": "https://github.com/huggingface/transformers/pull/40714",
"diff_url": "https://github.com/huggingface/transformers/pull/40714.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40714.patch",
"merged_at": null
} | # What does this PR do?
Removes TF and Flax from README, + update minimum torch version | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40714/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40714/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40713 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40713/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40713/comments | https://api.github.com/repos/huggingface/transformers/issues/40713/events | https://github.com/huggingface/transformers/pull/40713 | 3,387,052,076 | PR_kwDOCUB6oc6nBXN9 | 40,713 | Skip `VitMatteImageProcessingTest::test_fast_is_faster_than_slow` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T10:24:29 | 2025-09-05T15:36:22 | 2025-09-05T15:36:20 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40713",
"html_url": "https://github.com/huggingface/transformers/pull/40713",
"diff_url": "https://github.com/huggingface/transformers/pull/40713.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40713.patch",
"merged_at": "2025-09-05T15:36:20"
} | # What does this PR do?
So many times ...
https://app.circleci.com/pipelines/github/huggingface/transformers/145119/workflows/e763cbaa-6a14-421e-b6f2-dc26f0b4d38c/jobs/1918234 | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40713/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40713/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40712 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40712/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40712/comments | https://api.github.com/repos/huggingface/transformers/issues/40712/events | https://github.com/huggingface/transformers/pull/40712 | 3,386,903,970 | PR_kwDOCUB6oc6nA4QB | 40,712 | 🔴 Update Glm4V to use config values | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T09:32:41 | 2025-09-05T13:19:50 | 2025-09-05T13:19:50 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40712",
"html_url": "https://github.com/huggingface/transformers/pull/40712",
"diff_url": "https://github.com/huggingface/transformers/pull/40712.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40712.patch",
"merged_at": "2025-09-05T13:19:50"
} | # What does this PR do?
As discussed earlier, we should use config values which authors confirmed are correct. Kinda breaking, so marking it with 🔴
Probably will need update slow tests as well, let's see what CI says | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40712/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40712/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40711 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40711/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40711/comments | https://api.github.com/repos/huggingface/transformers/issues/40711/events | https://github.com/huggingface/transformers/pull/40711 | 3,386,880,276 | PR_kwDOCUB6oc6nAzXC | 40,711 | Fix missing self in post-process methods | {
"login": "framonmar7",
"id": 213614035,
"node_id": "U_kgDODLt90w",
"avatar_url": "https://avatars.githubusercontent.com/u/213614035?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/framonmar7",
"html_url": "https://github.com/framonmar7",
"followers_url": "https://api.github.com/users/framonmar7/followers",
"following_url": "https://api.github.com/users/framonmar7/following{/other_user}",
"gists_url": "https://api.github.com/users/framonmar7/gists{/gist_id}",
"starred_url": "https://api.github.com/users/framonmar7/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/framonmar7/subscriptions",
"organizations_url": "https://api.github.com/users/framonmar7/orgs",
"repos_url": "https://api.github.com/users/framonmar7/repos",
"events_url": "https://api.github.com/users/framonmar7/events{/privacy}",
"received_events_url": "https://api.github.com/users/framonmar7/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T09:24:08 | 2025-09-05T11:05:51 | 2025-09-05T10:49:52 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40711",
"html_url": "https://github.com/huggingface/transformers/pull/40711",
"diff_url": "https://github.com/huggingface/transformers/pull/40711.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40711.patch",
"merged_at": "2025-09-05T10:49:52"
} | # What does this PR do?
This PR fixes a repeated bug across several image processor classes (ConditionalDetrImageProcessorFast, DeformableDetrImageProcessorFast, GroundingDinoImageProcessorFast, Mask2FormerImageProcessorFast, and RTDetrImageProcessorFast).
Several post_process* methods were defined without a self parameter, which would raise a TypeError when called from an object instance.
## 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).
- [ ] Did you write any new necessary tests?
## Who can review?
Vision models: @amyeroberts, @qubvel | {
"login": "qubvel",
"id": 31920396,
"node_id": "MDQ6VXNlcjMxOTIwMzk2",
"avatar_url": "https://avatars.githubusercontent.com/u/31920396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qubvel",
"html_url": "https://github.com/qubvel",
"followers_url": "https://api.github.com/users/qubvel/followers",
"following_url": "https://api.github.com/users/qubvel/following{/other_user}",
"gists_url": "https://api.github.com/users/qubvel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/qubvel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qubvel/subscriptions",
"organizations_url": "https://api.github.com/users/qubvel/orgs",
"repos_url": "https://api.github.com/users/qubvel/repos",
"events_url": "https://api.github.com/users/qubvel/events{/privacy}",
"received_events_url": "https://api.github.com/users/qubvel/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40711/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40711/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40710 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40710/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40710/comments | https://api.github.com/repos/huggingface/transformers/issues/40710/events | https://github.com/huggingface/transformers/pull/40710 | 3,386,860,368 | PR_kwDOCUB6oc6nAvPJ | 40,710 | Fetch more test data with `hf_hub_download` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T09:17:12 | 2025-09-05T09:49:32 | 2025-09-05T09:49:31 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40710",
"html_url": "https://github.com/huggingface/transformers/pull/40710",
"diff_url": "https://github.com/huggingface/transformers/pull/40710.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40710.patch",
"merged_at": "2025-09-05T09:49:31"
} | # What does this PR do?
I will check if they are ok to download + build the docker images to have these downloaded in images.
But here we go
| {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40710/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40710/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40709 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40709/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40709/comments | https://api.github.com/repos/huggingface/transformers/issues/40709/events | https://github.com/huggingface/transformers/issues/40709 | 3,386,796,294 | I_kwDOCUB6oc7J3mkG | 40,709 | Divide gradient_accumulation_steps repeatedly in Trainer | {
"login": "shenlanyilang",
"id": 32211003,
"node_id": "MDQ6VXNlcjMyMjExMDAz",
"avatar_url": "https://avatars.githubusercontent.com/u/32211003?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shenlanyilang",
"html_url": "https://github.com/shenlanyilang",
"followers_url": "https://api.github.com/users/shenlanyilang/followers",
"following_url": "https://api.github.com/users/shenlanyilang/following{/other_user}",
"gists_url": "https://api.github.com/users/shenlanyilang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/shenlanyilang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shenlanyilang/subscriptions",
"organizations_url": "https://api.github.com/users/shenlanyilang/orgs",
"repos_url": "https://api.github.com/users/shenlanyilang/repos",
"events_url": "https://api.github.com/users/shenlanyilang/events{/privacy}",
"received_events_url": "https://api.github.com/users/shenlanyilang/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-05T08:54:14 | 2025-09-12T03:30:24 | 2025-09-12T03:30:24 | NONE | null | null | null | null | ### System Info
`NA`
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] 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
In Trainer's code to calculate loss, the loss is divided by gradient_accumulation_steps,
https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L4064
then it do `self.accelerator.backward(loss, **kwargs)`, but from the accelerator's backward code we can see if the distributed type is not deepspeed, then gradient_accumulation_steps is divided again, is that a bug implementation?
https://github.com/huggingface/accelerate/blob/main/src/accelerate/accelerator.py#L2727-L2729
### Expected behavior
It seems accelerator will take care of the gradient_accumulation_steps in `accelerator.backward`, so no need to added it in `Trainer`'s code. | {
"login": "shenlanyilang",
"id": 32211003,
"node_id": "MDQ6VXNlcjMyMjExMDAz",
"avatar_url": "https://avatars.githubusercontent.com/u/32211003?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/shenlanyilang",
"html_url": "https://github.com/shenlanyilang",
"followers_url": "https://api.github.com/users/shenlanyilang/followers",
"following_url": "https://api.github.com/users/shenlanyilang/following{/other_user}",
"gists_url": "https://api.github.com/users/shenlanyilang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/shenlanyilang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shenlanyilang/subscriptions",
"organizations_url": "https://api.github.com/users/shenlanyilang/orgs",
"repos_url": "https://api.github.com/users/shenlanyilang/repos",
"events_url": "https://api.github.com/users/shenlanyilang/events{/privacy}",
"received_events_url": "https://api.github.com/users/shenlanyilang/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40709/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40709/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40708 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40708/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40708/comments | https://api.github.com/repos/huggingface/transformers/issues/40708/events | https://github.com/huggingface/transformers/issues/40708 | 3,386,551,676 | I_kwDOCUB6oc7J2q18 | 40,708 | When using a custom model, it copies the code into Hugging Face’s cache directory. | {
"login": "wzr0108",
"id": 98294772,
"node_id": "U_kgDOBdvb9A",
"avatar_url": "https://avatars.githubusercontent.com/u/98294772?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wzr0108",
"html_url": "https://github.com/wzr0108",
"followers_url": "https://api.github.com/users/wzr0108/followers",
"following_url": "https://api.github.com/users/wzr0108/following{/other_user}",
"gists_url": "https://api.github.com/users/wzr0108/gists{/gist_id}",
"starred_url": "https://api.github.com/users/wzr0108/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wzr0108/subscriptions",
"organizations_url": "https://api.github.com/users/wzr0108/orgs",
"repos_url": "https://api.github.com/users/wzr0108/repos",
"events_url": "https://api.github.com/users/wzr0108/events{/privacy}",
"received_events_url": "https://api.github.com/users/wzr0108/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-05T07:21:40 | 2025-10-13T13:37:08 | null | NONE | null | null | null | null | ```
model = AutoModel.from_pretrained(
model_args.model_name_or_path,
trust_remote_code=True,
torch_dtype=compute_dtype,
device_map=device_map,
# init_vision=True,
# init_audio=False,
# init_tts=False,
)
```
`model_args.model_name_or_path=/mnt/241hdd/wzr/MiniCPM-V-CookBook/MiniCPM-V-4_5`
The code actually runs in `/root/.cache/huggingface/modules/transformers_modules/MiniCPM-V-4_5`.
This makes my debugging difficult.
Is there a way to run the code directly? | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40708/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40708/timeline | null | null | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | false |
https://api.github.com/repos/huggingface/transformers/issues/40707 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40707/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40707/comments | https://api.github.com/repos/huggingface/transformers/issues/40707/events | https://github.com/huggingface/transformers/pull/40707 | 3,386,091,188 | PR_kwDOCUB6oc6m-Ote | 40,707 | # fix: Prevent auto_docstring from crashing when running with python -OO | {
"login": "yogeshbawankar",
"id": 114309180,
"node_id": "U_kgDOBtA4PA",
"avatar_url": "https://avatars.githubusercontent.com/u/114309180?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yogeshbawankar",
"html_url": "https://github.com/yogeshbawankar",
"followers_url": "https://api.github.com/users/yogeshbawankar/followers",
"following_url": "https://api.github.com/users/yogeshbawankar/following{/other_user}",
"gists_url": "https://api.github.com/users/yogeshbawankar/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yogeshbawankar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yogeshbawankar/subscriptions",
"organizations_url": "https://api.github.com/users/yogeshbawankar/orgs",
"repos_url": "https://api.github.com/users/yogeshbawankar/repos",
"events_url": "https://api.github.com/users/yogeshbawankar/events{/privacy}",
"received_events_url": "https://api.github.com/users/yogeshbawankar/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T02:48:07 | 2025-09-05T11:42:28 | 2025-09-05T11:42:27 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40707",
"html_url": "https://github.com/huggingface/transformers/pull/40707",
"diff_url": "https://github.com/huggingface/transformers/pull/40707.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40707.patch",
"merged_at": null
} | This PR addresses an issue where `AutoModel.from_pretrained` fails when the Python interpreter is run with the `-OO` flag.
The root cause is that the `-OO` flag strips all docstrings from the code. The `auto_docstring` utility in `transformers` relies on introspecting these docstrings at runtime to generate documentation. When the docstrings are missing, this utility crashes with a `ValueError`, preventing models from being loaded in this optimized environment.
This fix adds a guard clause to the beginning of the `auto_docstring` decorator. It checks `sys.flags.optimize` to detect if the `-OO` flag is active. If it is, the decorator bypasses all the docstring-generation logic, allowing the library to function correctly. This makes the library more robust for users running in highly optimized or stripped-down environments.
A new test has been added to verify that `AutoModel.from_pretrained` works correctly with the `-OO` flag, ensuring this issue does not regress in the future.
Fixes #40659
## 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).
- [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.
## Images
<img width="695" height="412" alt="Screenshot 2025-09-05 081103" src="https://github.com/user-attachments/assets/84278ea7-6f5b-4b44-9669-ab59003e5f25" />
#
<img width="695" height="412" alt="Screenshot 2025-09-05 081103" src="https://github.com/user-attachments/assets/49bf8941-8415-4eb6-915c-d9204a3979e6" />
#
<img width="951" height="396" alt="Screenshot 2025-09-05 081332" src="https://github.com/user-attachments/assets/844638e1-889e-439a-a2ab-09d33ff376d3" />
| {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40707/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40707/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40706 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40706/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40706/comments | https://api.github.com/repos/huggingface/transformers/issues/40706/events | https://github.com/huggingface/transformers/pull/40706 | 3,386,014,178 | PR_kwDOCUB6oc6m9_A9 | 40,706 | Improved exception handling for apply_transpose | {
"login": "ben11211",
"id": 1986620,
"node_id": "MDQ6VXNlcjE5ODY2MjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1986620?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ben11211",
"html_url": "https://github.com/ben11211",
"followers_url": "https://api.github.com/users/ben11211/followers",
"following_url": "https://api.github.com/users/ben11211/following{/other_user}",
"gists_url": "https://api.github.com/users/ben11211/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ben11211/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ben11211/subscriptions",
"organizations_url": "https://api.github.com/users/ben11211/orgs",
"repos_url": "https://api.github.com/users/ben11211/repos",
"events_url": "https://api.github.com/users/ben11211/events{/privacy}",
"received_events_url": "https://api.github.com/users/ben11211/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T01:49:39 | 2025-09-05T20:07:44 | 2025-09-05T20:07:44 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40706",
"html_url": "https://github.com/huggingface/transformers/pull/40706",
"diff_url": "https://github.com/huggingface/transformers/pull/40706.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40706.patch",
"merged_at": null
} | # What does this PR do?
**Before**
RuntimeError from PyTorch reshape, not caught by apply_transpose.
```
Traceback (most recent call last):
File "/transformers/repro.py", line 12, in <module>
result = apply_transpose(
^^^^^^^^^^^^^^^^
File "/transformers/modeling_tf_pytorch_utils.py", line 159, in apply_transpose
weight = reshape(weight, match_shape)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/transformers/utils/generic.py", line 644, in reshape
return array.reshape(*newshape)
^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[128, 16]' is invalid for input of size 6144
```
**After**
RuntimeError correctly caught and augmented with useful tensor shape information.
```
Traceback (most recent call last):
File "/transformers/modeling_tf_pytorch_utils.py", line 159, in apply_transpose
weight = reshape(weight, match_shape)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/transformers/utils/generic.py", line 644, in reshape
return array.reshape(*newshape)
^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[128, 16]' is invalid for input of size 6144
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/transformers/repro.py", line 12, in <module>
result = apply_transpose(
^^^^^^^^^^^^^^^^
File "/transformers/modeling_tf_pytorch_utils.py", line 161, in apply_transpose
raise RuntimeError(f"Cannot reshape tensor from {list(weight.shape)} to {match_shape}.") from e
RuntimeError: Cannot reshape tensor from [3, 32, 64] to [128, 16].
```
## 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.
- [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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "ben11211",
"id": 1986620,
"node_id": "MDQ6VXNlcjE5ODY2MjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1986620?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ben11211",
"html_url": "https://github.com/ben11211",
"followers_url": "https://api.github.com/users/ben11211/followers",
"following_url": "https://api.github.com/users/ben11211/following{/other_user}",
"gists_url": "https://api.github.com/users/ben11211/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ben11211/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ben11211/subscriptions",
"organizations_url": "https://api.github.com/users/ben11211/orgs",
"repos_url": "https://api.github.com/users/ben11211/repos",
"events_url": "https://api.github.com/users/ben11211/events{/privacy}",
"received_events_url": "https://api.github.com/users/ben11211/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40706/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40706/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40705 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40705/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40705/comments | https://api.github.com/repos/huggingface/transformers/issues/40705/events | https://github.com/huggingface/transformers/issues/40705 | 3,385,921,866 | I_kwDOCUB6oc7J0RFK | 40,705 | [Potential Issue] Inappropriate handling of falsy values when parameters default to None | {
"login": "ruixCMU",
"id": 143538046,
"node_id": "U_kgDOCI43fg",
"avatar_url": "https://avatars.githubusercontent.com/u/143538046?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ruixCMU",
"html_url": "https://github.com/ruixCMU",
"followers_url": "https://api.github.com/users/ruixCMU/followers",
"following_url": "https://api.github.com/users/ruixCMU/following{/other_user}",
"gists_url": "https://api.github.com/users/ruixCMU/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ruixCMU/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ruixCMU/subscriptions",
"organizations_url": "https://api.github.com/users/ruixCMU/orgs",
"repos_url": "https://api.github.com/users/ruixCMU/repos",
"events_url": "https://api.github.com/users/ruixCMU/events{/privacy}",
"received_events_url": "https://api.github.com/users/ruixCMU/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-05T00:50:24 | 2025-10-13T08:03:06 | 2025-10-13T08:03:06 | NONE | null | null | null | null | ## Problem Description
This issue is identified using **CodeQL**. When any parameter of a function is set default to None, it is inappropriate to re-define it in the function body with a short-circuit evaluation like `lst = lst or []` because this will change any **falsy** value passed to the function for this parameter into another value and continue without raising errors if it is actually given a "falsy" value of incorrect types. This could lead to bugs that are very hard to detect. This happens especially when the actual default value of the parameter is mutable, and the programmer is trying to avoid this error.
## Locations
According to **CodeQL** result, 97 instances of such issue across 68 files are identified in this repo. Many of the instances are internal functions that are hardly used by users. These instances mostly appear in `tests` folder or deprecated model directories. However, there are some instances which are easily accessible by users and could lead to potential issues. They are in files like:
1. `src/transformers/models/code_llama/tokenization_code_llama.py`
2. `src/transformers/models/segformer/modeling_segformer.py`
3. `src/transformers/models/bit/modeling_bit.py`
4. `src/transformers/models/dinov3_convnext/modeling_dinov3_convnext.py`
5. ...
## Examples
### CodeLlamaTokenizer
The initialization method of `CodeLlamaTokenizer` in `src/transformers/models/code_llama/tokenization_code_llama.py`:
```
def __init__(
self,
vocab_file,
unk_token="<unk>",
bos_token="<s>",
eos_token="</s>",
prefix_token="▁<PRE>",
middle_token="▁<MID>",
suffix_token="▁<SUF>",
eot_token="▁<EOT>",
fill_token="<FILL_ME>",
suffix_first=False,
sp_model_kwargs: Optional[dict[str, Any]] = None,
add_bos_token=True,
add_eos_token=False,
clean_up_tokenization_spaces=False,
additional_special_tokens=None,
use_default_system_prompt=False,
**kwargs,
):
requires_backends(self, "protobuf")
self.sp_model_kwargs = {} if sp_model_kwargs is None else sp_model_kwargs
bos_token = AddedToken(bos_token, normalized=False, special=True) if isinstance(bos_token, str) else bos_token
eos_token = AddedToken(eos_token, normalized=False, special=True) if isinstance(eos_token, str) else eos_token
unk_token = AddedToken(unk_token, normalized=False, special=True) if isinstance(unk_token, str) else unk_token
self.use_default_system_prompt = use_default_system_prompt
# mark tokens special to skip them
additional_special_tokens = additional_special_tokens or []
for token in [prefix_token, middle_token, suffix_token, eot_token]:
additional_special_tokens += [token] if token is not None else []
self.vocab_file = vocab_file
self.add_bos_token = add_bos_token
self.add_eos_token = add_eos_token
self._prefix_token = prefix_token
self._middle_token = middle_token
self._suffix_token = suffix_token
self._eot_token = eot_token
self.fill_token = fill_token
self.suffix_first = suffix_first
self.sp_model = self.get_spm_processor()
super().__init__(
bos_token=bos_token,
eos_token=eos_token,
unk_token=unk_token,
add_bos_token=add_bos_token,
add_eos_token=add_eos_token,
prefix_token=prefix_token,
middle_token=middle_token,
suffix_token=suffix_token,
eot_token=eot_token,
fill_token=fill_token,
sp_model_kwargs=self.sp_model_kwargs,
suffix_first=suffix_first,
clean_up_tokenization_spaces=clean_up_tokenization_spaces,
additional_special_tokens=additional_special_tokens,
use_default_system_prompt=use_default_system_prompt,
**kwargs,
)
```
can be confusing for users. If a user misunderstands the parameter `additional_special_tokens` as a boolean value deciding whether to add additional special tokens and in a special condition he/she does not want special tokens, he/she might use the following code snippet:
```
tokenizer = CodeLlamaTokenizer("vocab_file_path", additional_special_tokens=False)
```
while this call, according to the code, will still give him/her the default `[prefix_token, middle_token, suffix_token, eot_token]` values as special tokens without raising any errors.
### SegformerMixFFN
The initialization method of `SegformerMixFFN` in `src/transformers/models/segformer/modeling_segformer.py`:
```
def __init__(self, config, in_features, hidden_features=None, out_features=None):
super().__init__()
out_features = out_features or in_features
self.dense1 = nn.Linear(in_features, hidden_features)
self.dwconv = SegformerDWConv(hidden_features)
if isinstance(config.hidden_act, str):
self.intermediate_act_fn = ACT2FN[config.hidden_act]
else:
self.intermediate_act_fn = config.hidden_act
self.dense2 = nn.Linear(hidden_features, out_features)
self.dropout = nn.Dropout(config.hidden_dropout_prob)
```
might hide typos from users. If unfortunately the user mistypes out_features as `0`, the code will simply replace it with `in_features` and continue, without throwing any warnings. This class is rarely directly instantiated by end users, but researchers may still rely on it in experimental setups.
## Workaround
One easy and effective workaround is to replace statements like:
```
lst = lst or []
```
to statements like:
```
if lst is None:
lst = []
```
### CodeLlamaTokenizer
Changing the code
```
additional_special_tokens = additional_special_tokens or []
```
to
```
if additional_special_tokens is None:
additional_special_tokens = []
```
solves the problem.
### SegformerMixFFN
Changing the code
```
out_features = out_features or in_features
```
to
```
if out_features is None:
out_features = in_features
```
solves the problem.
Hope this discussion helps improve the transformers package! | {
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40705/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40705/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40704 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40704/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40704/comments | https://api.github.com/repos/huggingface/transformers/issues/40704/events | https://github.com/huggingface/transformers/pull/40704 | 3,385,506,602 | PR_kwDOCUB6oc6m8f00 | 40,704 | Fix Whisper transcription accuracy degradation from end-of-audio noise : issue #40054 | {
"login": "bonpiedlaroute",
"id": 17798880,
"node_id": "MDQ6VXNlcjE3Nzk4ODgw",
"avatar_url": "https://avatars.githubusercontent.com/u/17798880?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bonpiedlaroute",
"html_url": "https://github.com/bonpiedlaroute",
"followers_url": "https://api.github.com/users/bonpiedlaroute/followers",
"following_url": "https://api.github.com/users/bonpiedlaroute/following{/other_user}",
"gists_url": "https://api.github.com/users/bonpiedlaroute/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bonpiedlaroute/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bonpiedlaroute/subscriptions",
"organizations_url": "https://api.github.com/users/bonpiedlaroute/orgs",
"repos_url": "https://api.github.com/users/bonpiedlaroute/repos",
"events_url": "https://api.github.com/users/bonpiedlaroute/events{/privacy}",
"received_events_url": "https://api.github.com/users/bonpiedlaroute/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T21:19:35 | 2025-09-05T20:37:14 | 2025-09-05T20:37:14 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40704",
"html_url": "https://github.com/huggingface/transformers/pull/40704",
"diff_url": "https://github.com/huggingface/transformers/pull/40704.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40704.patch",
"merged_at": null
} | Fixes #40054
**Problem :** Whisper models in transformers exhibit transcription accuracy issues when audio contains noise or non-speech signals at the very end. This causes the model to produce incomplete or inaccurate transcriptions, missing significant portions of the actual speech content.
**Solution:** Apply a progressive taper (Hann window) to the last 5% of the input audio before STFT computation. This eliminates abrupt discontinuities that create spectral artifacts while preserving the audio content.
**Changes:**
- Added windowing taper before torch.stft() call
- Taper length: max(n_fft, 5% of audio length) to ensure sufficient smoothing
- Uses waveform.clone() to avoid modifying the original input
**Testing:**
- Before fix: 58 chars (incomplete) vs 188 chars (complete) when noise removed
- After fix: 177 chars vs 177 chars (identical transcriptions)
- No performance impact on clean audio
## Who can review?
[eustlb](https://github.com/eustlb)
Thank you
| {
"login": "bonpiedlaroute",
"id": 17798880,
"node_id": "MDQ6VXNlcjE3Nzk4ODgw",
"avatar_url": "https://avatars.githubusercontent.com/u/17798880?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bonpiedlaroute",
"html_url": "https://github.com/bonpiedlaroute",
"followers_url": "https://api.github.com/users/bonpiedlaroute/followers",
"following_url": "https://api.github.com/users/bonpiedlaroute/following{/other_user}",
"gists_url": "https://api.github.com/users/bonpiedlaroute/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bonpiedlaroute/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bonpiedlaroute/subscriptions",
"organizations_url": "https://api.github.com/users/bonpiedlaroute/orgs",
"repos_url": "https://api.github.com/users/bonpiedlaroute/repos",
"events_url": "https://api.github.com/users/bonpiedlaroute/events{/privacy}",
"received_events_url": "https://api.github.com/users/bonpiedlaroute/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40704/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40704/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40703 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40703/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40703/comments | https://api.github.com/repos/huggingface/transformers/issues/40703/events | https://github.com/huggingface/transformers/pull/40703 | 3,385,413,708 | PR_kwDOCUB6oc6m8O93 | 40,703 | Fetch one missing test data | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T20:45:04 | 2025-09-04T21:05:24 | 2025-09-04T21:05:23 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40703",
"html_url": "https://github.com/huggingface/transformers/pull/40703",
"diff_url": "https://github.com/huggingface/transformers/pull/40703.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40703.patch",
"merged_at": "2025-09-04T21:05:23"
} | # What does this PR do?
It was missed .. | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40703/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40703/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40702 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40702/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40702/comments | https://api.github.com/repos/huggingface/transformers/issues/40702/events | https://github.com/huggingface/transformers/pull/40702 | 3,385,390,642 | PR_kwDOCUB6oc6m8Klh | 40,702 | Avoid `T5GemmaModelTest::test_eager_matches_sdpa_inference` being flaky | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T20:35:53 | 2025-09-04T20:45:23 | 2025-09-04T20:44:40 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40702",
"html_url": "https://github.com/huggingface/transformers/pull/40702",
"diff_url": "https://github.com/huggingface/transformers/pull/40702.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40702.patch",
"merged_at": "2025-09-04T20:44:40"
} | # What does this PR do?
See https://app.circleci.com/pipelines/github/huggingface/transformers/144943/workflows/f4bc060c-b21f-4528-9393-9fadc27fe49e/jobs/1916024
This is specific to `T5GemmaForTokenClassification` (maybe `T5GemmaForSequenceClassification` too), as they specify
> self.model(use_cache=False, ...)
and goes through
```
if attention_mask is None and past_key_values is None:
attention_mask = make_default_2d_attention_mask(input_ids, inputs_embeds, self.config.pad_token_id)
```
The logic is correct, but a sequence of no place to attend is problematic in terms of numerical equivalence. | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40702/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40702/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40701 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40701/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40701/comments | https://api.github.com/repos/huggingface/transformers/issues/40701/events | https://github.com/huggingface/transformers/pull/40701 | 3,384,820,694 | PR_kwDOCUB6oc6m6e1- | 40,701 | [tests] update `test_past_key_values_format` and delete overwrites | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T18:05:35 | 2025-09-09T21:55:46 | 2025-09-09T15:40:05 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40701",
"html_url": "https://github.com/huggingface/transformers/pull/40701",
"diff_url": "https://github.com/huggingface/transformers/pull/40701.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40701.patch",
"merged_at": "2025-09-09T15:40:05"
} | # What does this PR do?
(Carved from https://github.com/huggingface/transformers/pull/40553, which is becoming messy)
This PR:
- Updates `test_past_key_values_format` to support things like GQA or skipped kv cache layers. As a result, we can remove some overwrites/skips 💛
- In `get_text_config`, fixes a bug -- in `get_text_config` + legacy models, we were not respecting the `attribute_map` (i.e. the remapping of config attributes, which we need to be careful with), with this PR we do. This bugfix allow us to remove some of the test skips. | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40701/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40701/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40700 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40700/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40700/comments | https://api.github.com/repos/huggingface/transformers/issues/40700/events | https://github.com/huggingface/transformers/pull/40700 | 3,384,638,315 | PR_kwDOCUB6oc6m59XV | 40,700 | [`Gemma Embedding`] Fix SWA | {
"login": "vasqu",
"id": 73884904,
"node_id": "MDQ6VXNlcjczODg0OTA0",
"avatar_url": "https://avatars.githubusercontent.com/u/73884904?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vasqu",
"html_url": "https://github.com/vasqu",
"followers_url": "https://api.github.com/users/vasqu/followers",
"following_url": "https://api.github.com/users/vasqu/following{/other_user}",
"gists_url": "https://api.github.com/users/vasqu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vasqu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vasqu/subscriptions",
"organizations_url": "https://api.github.com/users/vasqu/orgs",
"repos_url": "https://api.github.com/users/vasqu/repos",
"events_url": "https://api.github.com/users/vasqu/events{/privacy}",
"received_events_url": "https://api.github.com/users/vasqu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T17:17:17 | 2025-09-05T15:12:05 | 2025-09-05T15:12:00 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40700",
"html_url": "https://github.com/huggingface/transformers/pull/40700",
"diff_url": "https://github.com/huggingface/transformers/pull/40700.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40700.patch",
"merged_at": "2025-09-05T15:12:00"
} | ## The issue at hand
- Sliding window in eager/sdpa/flex used a window size of roughly `(SW-1, SW // 2)` instead of the intended `(SW // 2, SW // 2)`
- Sliding window in flash attention ignored the bidirectionality and used a window size of `(SW-1, SW-1)`
## The fix
- Indicate bidirectionality at init with the new config flag
- Fix window size (at config init + in the mask overlay)
## Scripts
For sanity check, use the following script:
```python
import torch
from sentence_transformers import SentenceTransformer
similarities_per_attn = []
rankings_per_attn = []
for attention in ["eager", "sdpa", "flash_attention_2"]:
model = SentenceTransformer(
"google/embeddinggemma-300m",
model_kwargs={"attn_implementation": f"{attention}", "dtype": torch.bfloat16}
)
query = "Which planet is known as the Red Planet?" * 30
documents = [
"Venus is often called Earth's twin because of its similar size and proximity." * 30,
"Mars, known for its reddish appearance, is often referred to as the Red Planet." * 30,
"Jupiter, the largest planet in our solar system, has a prominent red spot." * 30,
"Saturn, famous for its rings, is sometimes mistaken for the Red Planet." * 30
]
query_embeddings = model.encode_query(query)
document_embeddings = model.encode_document(documents)
# Compute similarities to determine a ranking
similarities = model.similarity(query_embeddings, document_embeddings)
similarities_per_attn.append(similarities)
# Convert similarities to a ranking
ranking = similarities.argsort(descending=True)[0]
rankings_per_attn.append(ranking)
print(f"{attention}: ")
print(similarities)
print(ranking)
print()
similarity, rank = similarities_per_attn[0], rankings_per_attn[0]
for i in range(1, len(similarities_per_attn)):
if not (torch.allclose(similarity, similarities_per_attn[i], atol=3e-2, rtol=3e-2) and torch.equal(rank, rankings_per_attn[i])):
raise AssertionError()
```
For visualization:
```python
from transformers import AutoConfig, AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("google/embeddinggemma-300m")
config = AutoConfig.from_pretrained("google/embeddinggemma-300m")
config.sliding_window = 6
model = AutoModel.from_pretrained("google/embeddinggemma-300m", config=config)
query = "Which planet is known as the Red Planet?" * 2
inputs = tokenizer(query, return_tensors="pt")
model(**inputs)
```
And insert/debug right after the masks in the models with
```python
from transformers.masking_utils import tensor_to_mask_visual
print(tensor_to_mask_visual(causal_mask_mapping["sliding_attention"][0][0], grid_size=(30, 50)))
```
Before fix:
<img width="269" height="370" alt="image" src="https://github.com/user-attachments/assets/bfe64cdd-895b-49b2-b2d3-b5acc7aede26" />
After fix:
<img width="269" height="370" alt="image" src="https://github.com/user-attachments/assets/7b066474-e8f8-4581-b716-c8696e2cf58b" />
cc @Cyrilvallez @tomaarsen | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40700/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40700/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40699 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40699/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40699/comments | https://api.github.com/repos/huggingface/transformers/issues/40699/events | https://github.com/huggingface/transformers/pull/40699 | 3,384,495,832 | PR_kwDOCUB6oc6m5gQ6 | 40,699 | [tests] fix blip2 edge case | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T16:27:16 | 2025-09-05T10:35:32 | 2025-09-05T10:35:30 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40699",
"html_url": "https://github.com/huggingface/transformers/pull/40699",
"diff_url": "https://github.com/huggingface/transformers/pull/40699.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40699.patch",
"merged_at": "2025-09-05T10:35:30"
} | # What does this PR do?
(Carved from #40553, which is becoming messy)
Our tests have the `model.config.get_text_config(decoder=True).is_encoder_decoder` pattern, which doesn't make sense -- we're pulling the decoder if it exists, and then checking if it is encoder-decoder.
The pattern exists because of `blip2`, which wasn't setting `is_encoder_decoder` correctly -- if its LLM is an encoder-decoder model, then it is also an encoder-decoder model.
✅ blip 2 slow tests are passing | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40699/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40699/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40698 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40698/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40698/comments | https://api.github.com/repos/huggingface/transformers/issues/40698/events | https://github.com/huggingface/transformers/pull/40698 | 3,384,393,948 | PR_kwDOCUB6oc6m5Kb8 | 40,698 | Support initializing FakeTensors | {
"login": "justinchuby",
"id": 11205048,
"node_id": "MDQ6VXNlcjExMjA1MDQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/11205048?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/justinchuby",
"html_url": "https://github.com/justinchuby",
"followers_url": "https://api.github.com/users/justinchuby/followers",
"following_url": "https://api.github.com/users/justinchuby/following{/other_user}",
"gists_url": "https://api.github.com/users/justinchuby/gists{/gist_id}",
"starred_url": "https://api.github.com/users/justinchuby/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/justinchuby/subscriptions",
"organizations_url": "https://api.github.com/users/justinchuby/orgs",
"repos_url": "https://api.github.com/users/justinchuby/repos",
"events_url": "https://api.github.com/users/justinchuby/events{/privacy}",
"received_events_url": "https://api.github.com/users/justinchuby/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-04T15:58:36 | 2025-09-08T16:38:13 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40698",
"html_url": "https://github.com/huggingface/transformers/pull/40698",
"diff_url": "https://github.com/huggingface/transformers/pull/40698.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40698.patch",
"merged_at": null
} | # What does this PR do?
Addresses https://github.com/pytorch/pytorch/issues/161636 by correctly constructing the kwarg for FakeTensors: in fake_tensors the device property is stored as "fake_device" when accessed via `__dict__`. However the initializer expects the device to be passed in as "device". This PR updates to logic to handle this special case.
## 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).
- [ ] Did you write any new necessary tests?
## Who can review?
@Cyrilvallez | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40698/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40698/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40697 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40697/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40697/comments | https://api.github.com/repos/huggingface/transformers/issues/40697/events | https://github.com/huggingface/transformers/pull/40697 | 3,384,306,044 | PR_kwDOCUB6oc6m43NI | 40,697 | feat(serve): add healthcheck test | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T15:37:50 | 2025-09-05T09:56:36 | 2025-09-05T09:56:35 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40697",
"html_url": "https://github.com/huggingface/transformers/pull/40697",
"diff_url": "https://github.com/huggingface/transformers/pull/40697.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40697.patch",
"merged_at": "2025-09-05T09:56:35"
} | Adding a test to make sure we don't remove the healthcheck endpoint | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40697/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40697/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40696 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40696/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40696/comments | https://api.github.com/repos/huggingface/transformers/issues/40696/events | https://github.com/huggingface/transformers/pull/40696 | 3,384,063,233 | PR_kwDOCUB6oc6m4DRK | 40,696 | [Glm4.5V] fix vLLM support | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 8103865784,
"node_id": "LA_kwDOCUB6oc8AAAAB4wctuA",
"url": "https://api.github.com/repos/huggingface/transformers/labels/for%20patch",
"name": "for patch",
"color": "D93F0B",
"default": false,
"description": "Tag issues / labels that should be included in the next patch"
}
] | closed | false | null | [] | null | [] | 2025-09-04T14:31:53 | 2025-09-14T07:06:39 | 2025-09-04T20:09:21 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40696",
"html_url": "https://github.com/huggingface/transformers/pull/40696",
"diff_url": "https://github.com/huggingface/transformers/pull/40696.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40696.patch",
"merged_at": "2025-09-04T20:09:21"
} | # What does this PR do?
GLM-4.5V inference does not work in the latest release and this PR fixes it. Specifically, users can now pass in a `VideoMetadata` object to processor's call which is needed to backwards compatibility (adding a test for this, one sec)
And a tiny fix in image processing to make helper utility aligned with `self._preprocess` | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40696/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40696/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40695 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40695/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40695/comments | https://api.github.com/repos/huggingface/transformers/issues/40695/events | https://github.com/huggingface/transformers/pull/40695 | 3,384,057,012 | PR_kwDOCUB6oc6m4B5e | 40,695 | remove vision2seq vs image-text-to-text | {
"login": "Vaibhavs10",
"id": 18682411,
"node_id": "MDQ6VXNlcjE4NjgyNDEx",
"avatar_url": "https://avatars.githubusercontent.com/u/18682411?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Vaibhavs10",
"html_url": "https://github.com/Vaibhavs10",
"followers_url": "https://api.github.com/users/Vaibhavs10/followers",
"following_url": "https://api.github.com/users/Vaibhavs10/following{/other_user}",
"gists_url": "https://api.github.com/users/Vaibhavs10/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Vaibhavs10/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Vaibhavs10/subscriptions",
"organizations_url": "https://api.github.com/users/Vaibhavs10/orgs",
"repos_url": "https://api.github.com/users/Vaibhavs10/repos",
"events_url": "https://api.github.com/users/Vaibhavs10/events{/privacy}",
"received_events_url": "https://api.github.com/users/Vaibhavs10/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-04T14:30:15 | 2025-09-08T17:53:46 | null | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40695",
"html_url": "https://github.com/huggingface/transformers/pull/40695",
"diff_url": "https://github.com/huggingface/transformers/pull/40695.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40695.patch",
"merged_at": null
} | reference internal chat: https://huggingface.slack.com/archives/C070Q9GGGGY/p1756985150983899
Qwen models are tagged as both vision2seq as well as `image-text-to-text`, removing the former since it's deprecated.
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40695/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40695/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40694 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40694/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40694/comments | https://api.github.com/repos/huggingface/transformers/issues/40694/events | https://github.com/huggingface/transformers/pull/40694 | 3,383,970,223 | PR_kwDOCUB6oc6m3u0Q | 40,694 | add: embedding model | {
"login": "RyanMullins",
"id": 868555,
"node_id": "MDQ6VXNlcjg2ODU1NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/868555?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RyanMullins",
"html_url": "https://github.com/RyanMullins",
"followers_url": "https://api.github.com/users/RyanMullins/followers",
"following_url": "https://api.github.com/users/RyanMullins/following{/other_user}",
"gists_url": "https://api.github.com/users/RyanMullins/gists{/gist_id}",
"starred_url": "https://api.github.com/users/RyanMullins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RyanMullins/subscriptions",
"organizations_url": "https://api.github.com/users/RyanMullins/orgs",
"repos_url": "https://api.github.com/users/RyanMullins/repos",
"events_url": "https://api.github.com/users/RyanMullins/events{/privacy}",
"received_events_url": "https://api.github.com/users/RyanMullins/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T14:08:56 | 2025-09-11T08:26:36 | 2025-09-04T14:16:15 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40694",
"html_url": "https://github.com/huggingface/transformers/pull/40694",
"diff_url": "https://github.com/huggingface/transformers/pull/40694.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40694.patch",
"merged_at": "2025-09-04T14:16:15"
} | # What does this PR do?
Adds support for embedding model use cases to Gemma 3.
* Adds `use_bidirectional_attention` config flag
* Adds `_bidirectional_window_overlay()` for local sliding attention
* Adds relevant `or_mask` functions
* Updates weights conversion script with entries for EmbeddingGemma and Gemma 3 270M
## 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?
- [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 @Cyrilvallez
| {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40694/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40694/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40693 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40693/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40693/comments | https://api.github.com/repos/huggingface/transformers/issues/40693/events | https://github.com/huggingface/transformers/pull/40693 | 3,383,934,777 | PR_kwDOCUB6oc6m3nCO | 40,693 | Change docker image to preview for the MI355 CI | {
"login": "ahadnagy",
"id": 21314428,
"node_id": "MDQ6VXNlcjIxMzE0NDI4",
"avatar_url": "https://avatars.githubusercontent.com/u/21314428?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ahadnagy",
"html_url": "https://github.com/ahadnagy",
"followers_url": "https://api.github.com/users/ahadnagy/followers",
"following_url": "https://api.github.com/users/ahadnagy/following{/other_user}",
"gists_url": "https://api.github.com/users/ahadnagy/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ahadnagy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ahadnagy/subscriptions",
"organizations_url": "https://api.github.com/users/ahadnagy/orgs",
"repos_url": "https://api.github.com/users/ahadnagy/repos",
"events_url": "https://api.github.com/users/ahadnagy/events{/privacy}",
"received_events_url": "https://api.github.com/users/ahadnagy/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T14:00:29 | 2025-09-04T15:23:09 | 2025-09-04T15:23:09 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40693",
"html_url": "https://github.com/huggingface/transformers/pull/40693",
"diff_url": "https://github.com/huggingface/transformers/pull/40693.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40693.patch",
"merged_at": "2025-09-04T15:23:09"
} | # What does this PR do?
The mainstream support for ROCm 7.0 in the official images is still a few weeks away, until then, we have to use a preview image for this CI pipeline.
<!-- Remove if not applicable -->
Fixes # (issue)
## 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#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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "ivarflakstad",
"id": 69173633,
"node_id": "MDQ6VXNlcjY5MTczNjMz",
"avatar_url": "https://avatars.githubusercontent.com/u/69173633?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ivarflakstad",
"html_url": "https://github.com/ivarflakstad",
"followers_url": "https://api.github.com/users/ivarflakstad/followers",
"following_url": "https://api.github.com/users/ivarflakstad/following{/other_user}",
"gists_url": "https://api.github.com/users/ivarflakstad/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ivarflakstad/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ivarflakstad/subscriptions",
"organizations_url": "https://api.github.com/users/ivarflakstad/orgs",
"repos_url": "https://api.github.com/users/ivarflakstad/repos",
"events_url": "https://api.github.com/users/ivarflakstad/events{/privacy}",
"received_events_url": "https://api.github.com/users/ivarflakstad/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40693/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40693/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40692 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40692/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40692/comments | https://api.github.com/repos/huggingface/transformers/issues/40692/events | https://github.com/huggingface/transformers/pull/40692 | 3,383,673,100 | PR_kwDOCUB6oc6m2tCq | 40,692 | [Continous Batching] fix do_Sample=True in continuous batching | {
"login": "kashif",
"id": 8100,
"node_id": "MDQ6VXNlcjgxMDA=",
"avatar_url": "https://avatars.githubusercontent.com/u/8100?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kashif",
"html_url": "https://github.com/kashif",
"followers_url": "https://api.github.com/users/kashif/followers",
"following_url": "https://api.github.com/users/kashif/following{/other_user}",
"gists_url": "https://api.github.com/users/kashif/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kashif/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kashif/subscriptions",
"organizations_url": "https://api.github.com/users/kashif/orgs",
"repos_url": "https://api.github.com/users/kashif/repos",
"events_url": "https://api.github.com/users/kashif/events{/privacy}",
"received_events_url": "https://api.github.com/users/kashif/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T12:58:59 | 2025-09-08T08:30:17 | 2025-09-08T08:30:16 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40692",
"html_url": "https://github.com/huggingface/transformers/pull/40692",
"diff_url": "https://github.com/huggingface/transformers/pull/40692.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40692.patch",
"merged_at": "2025-09-08T08:30:15"
} | This pull request introduces improvements to sampling support in continuous batching generation, enhances tensor shape handling for logit processors, and expands test coverage for batch generation with sampling. The main changes are grouped below:
**Sampling and Generation Behavior:**
* Enabled sampling in `batch_generate` by setting `do_sample=True` and configuring `temperature` and `top_p` parameters, allowing for more diverse outputs during batch generation.
**Tensor Shape Handling and Sampling Logic:**
* Updated the logit processor in `continuous_api.py` to handle 3D logits produced by continuous batching, reshaping them as needed for compatibility with logit processors and restoring original shapes after processing.
* Improved sampling logic in `_sample` to ensure correct tensor dimensions when sampling tokens, making the method robust for both sampling and greedy decoding.
**Paged Attention and Integration:**
* Added a check for the presence of `flash_attn_varlen_func` in the attention implementation to ensure compatibility and prevent errors during paged attention forward passes.
**Testing and Validation:**
* Refactored batch output decoding in tests to use `generated_tokens` instead of `static_outputs` for accuracy.
* Added a new parameterized test `test_generate_batch_with_sampling` to verify that batch generation with sampling enabled works correctly across different attention implementations and configurations. The test checks for successful completion, non-empty outputs, and actual sampling behavior. | {
"login": "ArthurZucker",
"id": 48595927,
"node_id": "MDQ6VXNlcjQ4NTk1OTI3",
"avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArthurZucker",
"html_url": "https://github.com/ArthurZucker",
"followers_url": "https://api.github.com/users/ArthurZucker/followers",
"following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions",
"organizations_url": "https://api.github.com/users/ArthurZucker/orgs",
"repos_url": "https://api.github.com/users/ArthurZucker/repos",
"events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArthurZucker/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40692/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40692/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40691 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40691/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40691/comments | https://api.github.com/repos/huggingface/transformers/issues/40691/events | https://github.com/huggingface/transformers/pull/40691 | 3,383,463,353 | PR_kwDOCUB6oc6m1_Br | 40,691 | Fix loaded data order bug when resuming from epoch >= 1 | {
"login": "ngazagna-qc",
"id": 193245785,
"node_id": "U_kgDOC4SyWQ",
"avatar_url": "https://avatars.githubusercontent.com/u/193245785?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ngazagna-qc",
"html_url": "https://github.com/ngazagna-qc",
"followers_url": "https://api.github.com/users/ngazagna-qc/followers",
"following_url": "https://api.github.com/users/ngazagna-qc/following{/other_user}",
"gists_url": "https://api.github.com/users/ngazagna-qc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ngazagna-qc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ngazagna-qc/subscriptions",
"organizations_url": "https://api.github.com/users/ngazagna-qc/orgs",
"repos_url": "https://api.github.com/users/ngazagna-qc/repos",
"events_url": "https://api.github.com/users/ngazagna-qc/events{/privacy}",
"received_events_url": "https://api.github.com/users/ngazagna-qc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-04T12:05:07 | 2025-10-28T10:13:01 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40691",
"html_url": "https://github.com/huggingface/transformers/pull/40691",
"diff_url": "https://github.com/huggingface/transformers/pull/40691.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40691.patch",
"merged_at": null
} | # 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 #40690
Only 1 line added as described in the original issue.
Question: should we transform https://github.com/ngazagna-qc/transformers/blob/fix-data-order-resumed-epoch/reproduce_wrong_resumed_epoch.py into a test?
## 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.
- [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). -> Not required
- [ ] Did you write any new necessary tests? -> To discuss
## 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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "ngazagna-qc",
"id": 193245785,
"node_id": "U_kgDOC4SyWQ",
"avatar_url": "https://avatars.githubusercontent.com/u/193245785?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ngazagna-qc",
"html_url": "https://github.com/ngazagna-qc",
"followers_url": "https://api.github.com/users/ngazagna-qc/followers",
"following_url": "https://api.github.com/users/ngazagna-qc/following{/other_user}",
"gists_url": "https://api.github.com/users/ngazagna-qc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ngazagna-qc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ngazagna-qc/subscriptions",
"organizations_url": "https://api.github.com/users/ngazagna-qc/orgs",
"repos_url": "https://api.github.com/users/ngazagna-qc/repos",
"events_url": "https://api.github.com/users/ngazagna-qc/events{/privacy}",
"received_events_url": "https://api.github.com/users/ngazagna-qc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40691/reactions",
"total_count": 2,
"+1": 2,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40691/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40690 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40690/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40690/comments | https://api.github.com/repos/huggingface/transformers/issues/40690/events | https://github.com/huggingface/transformers/issues/40690 | 3,383,400,948 | I_kwDOCUB6oc7Jqpn0 | 40,690 | Batches loaded from wrong epoch when resuming from second epoch | {
"login": "ngazagna-qc",
"id": 193245785,
"node_id": "U_kgDOC4SyWQ",
"avatar_url": "https://avatars.githubusercontent.com/u/193245785?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ngazagna-qc",
"html_url": "https://github.com/ngazagna-qc",
"followers_url": "https://api.github.com/users/ngazagna-qc/followers",
"following_url": "https://api.github.com/users/ngazagna-qc/following{/other_user}",
"gists_url": "https://api.github.com/users/ngazagna-qc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ngazagna-qc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ngazagna-qc/subscriptions",
"organizations_url": "https://api.github.com/users/ngazagna-qc/orgs",
"repos_url": "https://api.github.com/users/ngazagna-qc/repos",
"events_url": "https://api.github.com/users/ngazagna-qc/events{/privacy}",
"received_events_url": "https://api.github.com/users/ngazagna-qc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | open | false | null | [] | null | [] | 2025-09-04T11:48:41 | 2025-10-06T08:55:46 | null | NONE | null | null | null | null | ### System Info
**Required system information**
```text
- `transformers` version: 4.57.0.dev0
- Platform: Linux-5.15.0-133-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.34.4
- Safetensors version: 0.6.2
- Accelerate version: 1.10.1
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)
- Tensorflow version (GPU?): 2.15.1 (False)
- Flax version (CPU?/GPU?/TPU?): 0.7.0 (cpu)
- Jax version: 0.4.13
- JaxLib version: 0.4.13
- Using distributed or parallel set-up in script?: no
- Using GPU in script?: no
- GPU type: GRID A100D-16C
```
### Who can help?
@zach-huggingface @SunMarc as it concerns `transfomers`' `Trainer`
### Information
- [x] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
### **1. Bug description**
Let's take the example of the provided script:
- number of data points: 10
- batch size: 2
So 1 epoch = 5 steps.
If we launch a training until the end and monitor the data order:
- epoch 0: 4, 1, 7, 5, 3, 9, 0, 8, 6, 2
- epoch 1: 5, 6, **|| 1, 2, 0, 8, 9, 3, 7, 4**
- epoch 2: 8, 7, 1, 5, 6, 9, 0, 4, 2, 3
But if we stop the training at step 6 and resume (from character `||`) the training to the end, we get the following data order:
- epoch 0: 4, 1, _7, 5, 3, 9, 0, 8, 6, 2_
- epoch 1: 5, 6 **|| 7, 5, 3, 9, 0, 8, 6, 2**
- epoch 2: 8, 7, 1, 5, 6, 9, 0, 4, 2, 3
We spotted that the `epoch_dataloader.iteration` is not properly set for the first epoch after resuming. It is initially set to 0, this is why it loads the same order as in epoch 0 (cf data order in italic of the last 4 batches of epoch 0).
### **2. Reproducing the error**
The script to run is available at https://github.com/ngazagna-qc/transformers/blob/fix-data-order-resumed-epoch/reproduce_wrong_resumed_epoch.py.
Run:
```shell
python reproduce_wrong_resumed_epoch.py --trainer-class Trainer
```
### Expected behavior
### **3. Bug fix**
We provide the fixed `Trainer` here: https://github.com/ngazagna-qc/transformers/blob/fix-data-order-resumed-epoch/src/transformers/trainer_fixed.py#L56
The fix only consists to add a line to the `_inner_training_loop` method:
```python
if steps_trained_in_current_epoch > 0:
epoch_dataloader = skip_first_batches(epoch_dataloader, steps_trained_in_current_epoch)
#### BEGINNING OF THE FIX ####
epoch_dataloader.iteration = epochs_trained # FIX: set dataloader to correct epoch
#### END OF THE FIX ####
steps_skipped = steps_trained_in_current_epoch
steps_trained_in_current_epoch = 0
rng_to_sync = True
```
It can be tested that this solves the order by running:
```shell
python reproduce_wrong_resumed_epoch.py --trainer-class TrainerFixed
``` | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40690/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 1
} | https://api.github.com/repos/huggingface/transformers/issues/40690/timeline | null | null | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | false |
https://api.github.com/repos/huggingface/transformers/issues/40689 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40689/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40689/comments | https://api.github.com/repos/huggingface/transformers/issues/40689/events | https://github.com/huggingface/transformers/pull/40689 | 3,383,263,520 | PR_kwDOCUB6oc6m1SeK | 40,689 | Final test data cache - inside CI docker images | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T11:10:12 | 2025-09-04T13:12:50 | 2025-09-04T13:12:49 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40689",
"html_url": "https://github.com/huggingface/transformers/pull/40689",
"diff_url": "https://github.com/huggingface/transformers/pull/40689.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40689.patch",
"merged_at": "2025-09-04T13:12:49"
} | # What does this PR do?
Cache the test data during the CI docker image build time.
Hope you would be happy with this :-) @manueldeprada
I tried with the dev images which works. I will push the real images then merge if you are happy. | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40689/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40689/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40688 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40688/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40688/comments | https://api.github.com/repos/huggingface/transformers/issues/40688/events | https://github.com/huggingface/transformers/pull/40688 | 3,383,032,884 | PR_kwDOCUB6oc6m0fLh | 40,688 | Support sliding window in CB | {
"login": "remi-or",
"id": 83456801,
"node_id": "MDQ6VXNlcjgzNDU2ODAx",
"avatar_url": "https://avatars.githubusercontent.com/u/83456801?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/remi-or",
"html_url": "https://github.com/remi-or",
"followers_url": "https://api.github.com/users/remi-or/followers",
"following_url": "https://api.github.com/users/remi-or/following{/other_user}",
"gists_url": "https://api.github.com/users/remi-or/gists{/gist_id}",
"starred_url": "https://api.github.com/users/remi-or/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/remi-or/subscriptions",
"organizations_url": "https://api.github.com/users/remi-or/orgs",
"repos_url": "https://api.github.com/users/remi-or/repos",
"events_url": "https://api.github.com/users/remi-or/events{/privacy}",
"received_events_url": "https://api.github.com/users/remi-or/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | {
"login": "remi-or",
"id": 83456801,
"node_id": "MDQ6VXNlcjgzNDU2ODAx",
"avatar_url": "https://avatars.githubusercontent.com/u/83456801?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/remi-or",
"html_url": "https://github.com/remi-or",
"followers_url": "https://api.github.com/users/remi-or/followers",
"following_url": "https://api.github.com/users/remi-or/following{/other_user}",
"gists_url": "https://api.github.com/users/remi-or/gists{/gist_id}",
"starred_url": "https://api.github.com/users/remi-or/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/remi-or/subscriptions",
"organizations_url": "https://api.github.com/users/remi-or/orgs",
"repos_url": "https://api.github.com/users/remi-or/repos",
"events_url": "https://api.github.com/users/remi-or/events{/privacy}",
"received_events_url": "https://api.github.com/users/remi-or/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"login": "remi-or",
"id": 83456801,
"node_id": "MDQ6VXNlcjgzNDU2ODAx",
"avatar_url": "https://avatars.githubusercontent.com/u/83456801?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/remi-or",
"html_url": "https://github.com/remi-or",
"followers_url": "https://api.github.com/users/remi-or/followers",
"following_url": "https://api.github.com/users/remi-or/following{/other_user}",
"gists_url": "https://api.github.com/users/remi-or/gists{/gist_id}",
"starred_url": "https://api.github.com/users/remi-or/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/remi-or/subscriptions",
"organizations_url": "https://api.github.com/users/remi-or/orgs",
"repos_url": "https://api.github.com/users/remi-or/repos",
"events_url": "https://api.github.com/users/remi-or/events{/privacy}",
"received_events_url": "https://api.github.com/users/remi-or/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
}
] | null | [] | 2025-09-04T10:07:31 | 2025-09-09T13:51:12 | 2025-09-09T13:51:11 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40688",
"html_url": "https://github.com/huggingface/transformers/pull/40688",
"diff_url": "https://github.com/huggingface/transformers/pull/40688.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40688.patch",
"merged_at": "2025-09-09T13:51:11"
} | This PR introduces support for sliding window attention in CB, using an allocator that can support both full attention and sliding window attention. Code works with almost similar performances (665 -> 655 tok/s in the example) but I am putting the PR in draft status until:
- [x] Code is tested on Nvidia with and without sliding window
- [x] TODO on memory computation is addressed
- [x] Code is refactored in some places to get smaller files / more code reuse
- [x] Way more documentation is added to explain the allocation mechanism
- [x] TODO adressed for very small window sizes | {
"login": "ArthurZucker",
"id": 48595927,
"node_id": "MDQ6VXNlcjQ4NTk1OTI3",
"avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArthurZucker",
"html_url": "https://github.com/ArthurZucker",
"followers_url": "https://api.github.com/users/ArthurZucker/followers",
"following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions",
"organizations_url": "https://api.github.com/users/ArthurZucker/orgs",
"repos_url": "https://api.github.com/users/ArthurZucker/repos",
"events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArthurZucker/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40688/reactions",
"total_count": 3,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 3,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40688/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40687 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40687/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40687/comments | https://api.github.com/repos/huggingface/transformers/issues/40687/events | https://github.com/huggingface/transformers/issues/40687 | 3,382,897,462 | I_kwDOCUB6oc7Jous2 | 40,687 | the continue_final_message parameter in apply_chat_template can behave unexpectedly in some cases | {
"login": "usepr",
"id": 4797252,
"node_id": "MDQ6VXNlcjQ3OTcyNTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/4797252?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/usepr",
"html_url": "https://github.com/usepr",
"followers_url": "https://api.github.com/users/usepr/followers",
"following_url": "https://api.github.com/users/usepr/following{/other_user}",
"gists_url": "https://api.github.com/users/usepr/gists{/gist_id}",
"starred_url": "https://api.github.com/users/usepr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/usepr/subscriptions",
"organizations_url": "https://api.github.com/users/usepr/orgs",
"repos_url": "https://api.github.com/users/usepr/repos",
"events_url": "https://api.github.com/users/usepr/events{/privacy}",
"received_events_url": "https://api.github.com/users/usepr/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-04T09:27:26 | 2025-09-08T17:25:13 | 2025-09-08T17:25:13 | NONE | null | null | null | null | ### System Info
In `transformers/src/transformers/utils/chat_template_utils.py@render_jinja_template()`, if `continue_final_message` is set to `True`, then the content of the final message will be used to split the `rendered_chat` string.
```python
final_msg_loc = rendered_chat.rindex(final_message.strip())
...
rendered_chat = rendered_chat[: final_msg_loc + len(final_message.strip())]
```
So if the content of the final message is empty or matches some substrings of the chat template, there will be issues.
### Who can help?
@ArthurZucker @itazap
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
```python
from transformers import AutoTokenizer
m = [
{'role': 'user', 'content': 'user-input'},
{'role': 'assistant', 'content': 'end'}
]
tokenizer = AutoTokenizer.from_pretrained("Qwen3-0.6B")
print (tokenizer.apply_chat_template(m, continue_final_message=True, tokenize=False))
```
will output
```python
<|im_start|>user
user-input<|im_end|>
<|im_start|>assistant
<think>
</think>
end<|im_end
```
### Expected behavior
Expected output
```python
<|im_start|>user
user-input<|im_end|>
<|im_start|>assistant
<think>
</think>
end
``` | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40687/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40687/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40686 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40686/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40686/comments | https://api.github.com/repos/huggingface/transformers/issues/40686/events | https://github.com/huggingface/transformers/pull/40686 | 3,382,744,443 | PR_kwDOCUB6oc6mzhVR | 40,686 | Add Optional typing | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T08:46:30 | 2025-09-06T06:48:22 | 2025-09-05T15:05:52 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40686",
"html_url": "https://github.com/huggingface/transformers/pull/40686",
"diff_url": "https://github.com/huggingface/transformers/pull/40686.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40686.patch",
"merged_at": "2025-09-05T15:05:52"
} | # What does this PR do?
Add Optional to more types, these are not detected by ruff.
The incorrect typing was found by
```
grep ': [^:=O|N,]*= *None' -r src/transformers | grep -v tf | grep -v flax | more
```
The changes were generated by the following commands:
```
sed -i -e 's/: AudioInput = None/: Optional[AudioInput] = None/g' src/transformers/**/*py
sed -i -e 's/: torch.BoolTensor = None/: Optional[torch.BoolTensor] = None/g' src/transformers/**/*py
sed -i -e 's/: torch.int32 = None/: Optional[torch.int32] = None/g' src/transformers/**/*py
sed -i -e 's/: AutoConfig = None/: Optional[AutoConfig] = None/g' src/transformers/**/*py
sed -i -e 's/: VideoInput = None/: Optional[VideoInput] = None/g' src/transformers/**/*py
sed -i -e 's/: ImageInput = None/: Optional[ImageInput] = None/g' src/transformers/**/*py
sed -i -e 's/: list\[int\] = None/: Optional[list[int]] = None/g' src/transformers/**/*py
sed -i -e 's/: list\[int\] = None/: Optional[list[int] = None/g' src/transformers/**/*py
sed -i -e 's/: str = None/: Optional[str] = None/g' src/transformers/**/*py
sed -i -e 's/: float = None/: Optional[float] = None/g' src/transformers/**/*py
sed -i -e 's/: torch.dtype = None/: Optional[torch.dtype] = None/g' src/transformers/**/*py
sed -i -e 's/: torch.device = None/: Optional[torch.device] = None/g' src/transformers/**/*py
sed -i -e 's/: torch.Tensor = None/: Optional[torch.Tensor] = None/g' src/transformers/**/*py
sed -i -e 's/: int = None/: Optional[int] = None/g' src/transformers/**/*py
sed -i -e 's/: torch.FloatTensor = None/: Optional[torch.FloatTensor] = None/g' src/transformers/**/*py
sed -i -e 's/: PILImageResampling = None/: Optional[PILImageResampling] = None/g' src/transformers/**/*py
sed -i -e 's/: torch.LongTensor = None/: Optional[torch.LongTensor] = None/g' src/transformers/**/*py
sed -i -e 's/: "F.InterpolationMode" = None/: Optional["F.InterpolationMode"] = None/g' src/transformers/**/*py
sed -i -e 's/: tuple\[torch.FloatTensor\] = None/: Optional[tuple[torch.FloatTensor]] = None/g' src/transformers/**/*py
sed -i -e 's/: list\[torch.FloatTensor\] = None/: Optional[list[torch.FloatTensor]] = None/g' src/transformers/**/*py
sed -i -e 's/: HybridMambaAttentionDynamicCache = None/: Optional[HybridMambaAttentionDynamicCache] = None/g' s
rc/transformers/**/*py
sed -i -e 's/: dict = None/: Optional[dict] = None/g' src/transformers/**/*py
sed -i -e 's/: ChannelDimension = None/: Optional[ChannelDimension] = None/g' src/transformers/**/*py
sed -i -e 's/: "F.InterpolationMode" = None/: Optional["F.InterpolationMode"] = None/g' src/transformers/**/*py
```
There were also two or three manual fixes.
TF and Flax code are skipped for obvious reasons. | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40686/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40686/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40685 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40685/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40685/comments | https://api.github.com/repos/huggingface/transformers/issues/40685/events | https://github.com/huggingface/transformers/pull/40685 | 3,382,665,038 | PR_kwDOCUB6oc6mzQKo | 40,685 | Fix parent classes of AllKwargsForChatTemplate | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T08:20:47 | 2025-09-06T06:48:32 | 2025-09-05T11:08:51 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40685",
"html_url": "https://github.com/huggingface/transformers/pull/40685",
"diff_url": "https://github.com/huggingface/transformers/pull/40685.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40685.patch",
"merged_at": "2025-09-05T11:08:51"
} | # What does this PR do?
Remove unused members of AllKwargsForChatTemplate | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40685/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40685/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40684 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40684/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40684/comments | https://api.github.com/repos/huggingface/transformers/issues/40684/events | https://github.com/huggingface/transformers/pull/40684 | 3,382,631,814 | PR_kwDOCUB6oc6mzJBf | 40,684 | Load a tiny video to make CI faster | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T08:09:30 | 2025-09-04T12:49:01 | 2025-09-04T12:49:00 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40684",
"html_url": "https://github.com/huggingface/transformers/pull/40684",
"diff_url": "https://github.com/huggingface/transformers/pull/40684.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40684.patch",
"merged_at": "2025-09-04T12:49:00"
} | # What does this PR do?
As discussed internally, let's load a smaller video here because the processor doesn't do video sampling during the test. The new tiny video consists of only 10 frames
Some values were updated in tests because the sampling logic depends on loaded video's length and FPS | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40684/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 1,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40684/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40683 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40683/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40683/comments | https://api.github.com/repos/huggingface/transformers/issues/40683/events | https://github.com/huggingface/transformers/pull/40683 | 3,382,628,503 | PR_kwDOCUB6oc6mzITL | 40,683 | Mark `Aimv2ModelTest::test_eager_matches_sdpa_inference_04_fp16_pad_right_sdpa_kernels` as flaky | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T08:08:37 | 2025-09-04T08:30:16 | 2025-09-04T08:30:15 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40683",
"html_url": "https://github.com/huggingface/transformers/pull/40683",
"diff_url": "https://github.com/huggingface/transformers/pull/40683.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40683.patch",
"merged_at": "2025-09-04T08:30:15"
} | # What does this PR do?
Without this, we get 0.026% of failure rate. | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40683/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40683/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40682 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40682/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40682/comments | https://api.github.com/repos/huggingface/transformers/issues/40682/events | https://github.com/huggingface/transformers/issues/40682 | 3,382,608,255 | I_kwDOCUB6oc7JnoF_ | 40,682 | Performance Regression in Whisper with torch.compile on v4.52.0+ (vs v4.51.0) | {
"login": "baeseongsu",
"id": 32122993,
"node_id": "MDQ6VXNlcjMyMTIyOTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/32122993?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/baeseongsu",
"html_url": "https://github.com/baeseongsu",
"followers_url": "https://api.github.com/users/baeseongsu/followers",
"following_url": "https://api.github.com/users/baeseongsu/following{/other_user}",
"gists_url": "https://api.github.com/users/baeseongsu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/baeseongsu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/baeseongsu/subscriptions",
"organizations_url": "https://api.github.com/users/baeseongsu/orgs",
"repos_url": "https://api.github.com/users/baeseongsu/repos",
"events_url": "https://api.github.com/users/baeseongsu/events{/privacy}",
"received_events_url": "https://api.github.com/users/baeseongsu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
},
{
"id": 6470596964,
"node_id": "LA_kwDOCUB6oc8AAAABga15ZA",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Audio",
"name": "Audio",
"color": "760453",
"default": false,
"description": ""
},
{
"id": 7377881103,
"node_id": "LA_kwDOCUB6oc8AAAABt8GIDw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Whisper",
"name": "Whisper",
"color": "83303E",
"default": false,
"description": ""
}
] | closed | false | null | [] | null | [] | 2025-09-04T08:01:38 | 2025-10-12T08:02:37 | 2025-10-12T08:02:37 | CONTRIBUTOR | null | null | null | null | ### System Info
- `transformers` version: 4.52.0
- Platform: Linux-5.15.0-106-generic-x86_64-with-glibc2.39
- Python version: 3.12.3
- Huggingface_hub version: 0.34.4
- Safetensors version: 0.5.2
- Accelerate version: 1.5.2
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (GPU?): 2.7.1+cu126 (True)
- 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>
- Using GPU in script?: <fill in>
- GPU type: NVIDIA H100 80GB HBM3
### Who can help?
@eustlb @gante
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
1. Minimal Reproducible Code
- The [base code snippet](https://huggingface.co/openai/whisper-large-v3#torch-compile) follows the official `openai/whisper-large-v3-turbo` model card's description for using `torch.compile`.
```python
import gc
import time
import torch
from datasets import load_dataset
from tqdm import tqdm
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
def benchmark_whisper(compile_model=False, num_warmup=2, num_runs=5):
"""Benchmark Whisper with and without torch.compile."""
print(f"\n{'='*50}")
print(f"Testing: {'Compiled' if compile_model else 'Not Compiled'}")
print(f"{'='*50}")
# Setup
torch.set_float32_matmul_precision("high")
device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model_id = "openai/whisper-large-v3-turbo"
# Clear memory
if torch.cuda.is_available():
torch.cuda.empty_cache()
gc.collect()
# Load model
model = AutoModelForSpeechSeq2Seq.from_pretrained(
model_id,
torch_dtype=torch_dtype,
low_cpu_mem_usage=True,
).to(device)
# Configure for compilation
model.generation_config.cache_implementation = "static"
if compile_model:
model = torch.compile(model, mode="reduce-overhead", fullgraph=True)
processor = AutoProcessor.from_pretrained(model_id)
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
torch_dtype=torch_dtype,
device=device,
return_timestamps=True,
)
# Load sample audio
dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
sample = dataset[0]["audio"]
# Warmup and Benchmark...
print(f"Warmup ({num_warmup} steps)...")
for _ in tqdm(range(num_warmup)):
_ = pipe(sample.copy(), generate_kwargs={"language": "en", "task": "transcribe"})
print(f"Benchmarking ({num_runs} runs)...")
times = []
for _ in tqdm(range(num_runs)):
start_time = time.time()
result = pipe(sample.copy(), generate_kwargs={"language": "en", "task": "transcribe"})
times.append(time.time() - start_time)
avg_time = sum(times) / len(times)
print(f"Average time: {avg_time:.3f}s")
def main():
print("Whisper Compilation Benchmark")
benchmark_whisper(compile_model=False)
benchmark_whisper(compile_model=True)
if __name__ == "__main__":
main()
```
2. How to Reproduce
- Run the script with a problematic version (>=4.52.0) and the last known stable version (4.51.0).
```bash
# Problematic version
pip install "transformers>=4.52.0"
python benchmark_script.py
# Stable version
pip install "transformers==4.51.0"
python benchmark_script.py
```
3. Observed Behavior & Logs
- `transformers==4.51.0` (Stable):
- Not Compiled: ~0.67s
- Compiled: ~0.66s (1.02x speedup)
- Logs are clean.
- `transformers>=4.52.0` (Problematic):
- Not Compiled: ~3.15s
- Compiled: ~6.33s (0.50x speedup, i.e., 2x slower)
- Logs are filled with repeated warnings, indicating recompilation failures:
```
skipping cudagraphs due to mutated inputs (...)
torch._dynamo hit config.recompile_limit (8)
```
### Expected behavior
- The `torch.compile` path is expected to be faster and more stable than eager mode, as seen in `v4.51.0`. A library upgrade should not introduce such a noticeable and persistent slowdown. The `skipping cudagraphs` warnings are triggered by in-place updates in the static KV cache (e.g., `index_copy_`), which disable CUDA graph capture and limit the performance benefits of compilation.
- (Note: I have not fully reviewed Whisper’s `generate` internals, so if this behavior is intentional or my script setup is incorrect, please let me know.) | {
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40682/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40682/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40681 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40681/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40681/comments | https://api.github.com/repos/huggingface/transformers/issues/40681/events | https://github.com/huggingface/transformers/pull/40681 | 3,382,531,420 | PR_kwDOCUB6oc6myzpV | 40,681 | CircleCI docker images cleanup / update / fix | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T07:35:21 | 2025-09-04T08:42:20 | 2025-09-04T08:42:18 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40681",
"html_url": "https://github.com/huggingface/transformers/pull/40681",
"diff_url": "https://github.com/huggingface/transformers/pull/40681.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40681.patch",
"merged_at": "2025-09-04T08:42:18"
} | # What does this PR do?
CircleCI docker images cleanup / update / fix:
- remove tf/jax related docker files and their usage
- remove `tests_onnx` job on CircleCI which currently use `"image":"huggingface/transformers-torch-tf-light"`
- a few fix for docker images failing to build: see [here](https://github.com/huggingface/transformers/actions/runs/17449694984)
- also add `git-lfs` to 3 docker files:
- this is not necessary, but it makes running `fetch hub objects before pytest` step on CircleCI jobs easier, which has `_ = Repository( ... )` in it and requires `git-lfs`
| {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40681/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40681/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40680 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40680/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40680/comments | https://api.github.com/repos/huggingface/transformers/issues/40680/events | https://github.com/huggingface/transformers/issues/40680 | 3,382,497,670 | I_kwDOCUB6oc7JnNGG | 40,680 | Idea: Exploring Mathematical Extensions for GPT-style Models (teaser) | {
"login": "muzamil-ashiq",
"id": 223241381,
"node_id": "U_kgDODU5kpQ",
"avatar_url": "https://avatars.githubusercontent.com/u/223241381?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/muzamil-ashiq",
"html_url": "https://github.com/muzamil-ashiq",
"followers_url": "https://api.github.com/users/muzamil-ashiq/followers",
"following_url": "https://api.github.com/users/muzamil-ashiq/following{/other_user}",
"gists_url": "https://api.github.com/users/muzamil-ashiq/gists{/gist_id}",
"starred_url": "https://api.github.com/users/muzamil-ashiq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muzamil-ashiq/subscriptions",
"organizations_url": "https://api.github.com/users/muzamil-ashiq/orgs",
"repos_url": "https://api.github.com/users/muzamil-ashiq/repos",
"events_url": "https://api.github.com/users/muzamil-ashiq/events{/privacy}",
"received_events_url": "https://api.github.com/users/muzamil-ashiq/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T07:23:29 | 2025-10-12T08:02:38 | 2025-10-12T08:02:38 | NONE | null | null | null | null | Hi Transformers team 👋,
I’ve been experimenting with a conceptual enhancement to GPT-style architectures—introducing mathematical mechanisms for memory and adaptive learning—while keeping the overall transformer backbone intact.
I’ve documented the approach in Markdown (README + comparison notes), but haven’t published it yet. Before I share more, I’d love your input:
- Does this kind of experimental idea fit within the scope of Transformers?
- Would you be open to viewing or discussing the draft privately?
Looking forward to hearing your thoughts 🙏 | {
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40680/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40680/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40679 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40679/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40679/comments | https://api.github.com/repos/huggingface/transformers/issues/40679/events | https://github.com/huggingface/transformers/pull/40679 | 3,382,486,575 | PR_kwDOCUB6oc6myqBo | 40,679 | Fix TypedDict usage | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T07:19:21 | 2025-09-10T09:34:02 | 2025-09-10T09:33:58 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40679",
"html_url": "https://github.com/huggingface/transformers/pull/40679",
"diff_url": "https://github.com/huggingface/transformers/pull/40679.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40679.patch",
"merged_at": null
} | # What does this PR do?
Remove default values for keys because they have no effect. | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40679/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40679/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40678 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40678/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40678/comments | https://api.github.com/repos/huggingface/transformers/issues/40678/events | https://github.com/huggingface/transformers/issues/40678 | 3,382,472,003 | I_kwDOCUB6oc7JnG1D | 40,678 | updating `dtype` during `from_pretrained()` causes minor issue | {
"login": "kwonmha",
"id": 8953934,
"node_id": "MDQ6VXNlcjg5NTM5MzQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/8953934?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kwonmha",
"html_url": "https://github.com/kwonmha",
"followers_url": "https://api.github.com/users/kwonmha/followers",
"following_url": "https://api.github.com/users/kwonmha/following{/other_user}",
"gists_url": "https://api.github.com/users/kwonmha/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kwonmha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kwonmha/subscriptions",
"organizations_url": "https://api.github.com/users/kwonmha/orgs",
"repos_url": "https://api.github.com/users/kwonmha/repos",
"events_url": "https://api.github.com/users/kwonmha/events{/privacy}",
"received_events_url": "https://api.github.com/users/kwonmha/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-04T07:13:51 | 2025-09-04T09:17:51 | 2025-09-04T09:17:51 | CONTRIBUTOR | null | null | null | null | ### System Info
transformers 4.56.0
### Who can help?
@ArthurZucker
### Information
- [x] The official example scripts
- [ ] 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 loaded a gpt-oss-BF16 made by unsloth with flash attention 2.
And a warning comes out:
`Flash Attention 2 only supports torch.float16 and torch.bfloat16 dtypes, but the current dype in GptOssForCausalLM is torch.float32.`.
But as you can check [here](https://huggingface.co/unsloth/gpt-oss-120b-BF16/blob/main/config.json), `torch_dtype` is set as `bfloat16`.
I can see `dtype` of `config` is set as bfloat16` just before calling `from_pretrained()`.(though key name is different)
But `config.dtype` is updated to `float32` during `PretrainedModel.from_pretrained()` due to `_get_dtype()` when `dtype`, `torch_dtype` is None at the scope.
Maybe this causes above warning occurs.
The model weight seems to be loaded in `bfloat16` correctly.
And I expected that `config.dypte` or `config.torch_dtype` will be referenced.
But the comment in `_get_dtype()` says that's not the case.
Anyway, I hope this issue get resolved somehow.
### Expected behavior
No flash attention 2 warning message.
`GptOssConfig.dtype` stays same in `bfloat16`. | {
"login": "kwonmha",
"id": 8953934,
"node_id": "MDQ6VXNlcjg5NTM5MzQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/8953934?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kwonmha",
"html_url": "https://github.com/kwonmha",
"followers_url": "https://api.github.com/users/kwonmha/followers",
"following_url": "https://api.github.com/users/kwonmha/following{/other_user}",
"gists_url": "https://api.github.com/users/kwonmha/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kwonmha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kwonmha/subscriptions",
"organizations_url": "https://api.github.com/users/kwonmha/orgs",
"repos_url": "https://api.github.com/users/kwonmha/repos",
"events_url": "https://api.github.com/users/kwonmha/events{/privacy}",
"received_events_url": "https://api.github.com/users/kwonmha/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40678/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40678/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40677 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40677/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40677/comments | https://api.github.com/repos/huggingface/transformers/issues/40677/events | https://github.com/huggingface/transformers/pull/40677 | 3,382,410,223 | PR_kwDOCUB6oc6myZtD | 40,677 | Avoid night torch CI not run because of irrelevant docker image failing to build | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T06:53:00 | 2025-09-04T07:08:57 | 2025-09-04T07:06:37 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40677",
"html_url": "https://github.com/huggingface/transformers/pull/40677",
"diff_url": "https://github.com/huggingface/transformers/pull/40677.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40677.patch",
"merged_at": "2025-09-04T07:06:37"
} | # What does this PR do?
Currently, the workflow
> .github/workflows/self-nightly-caller.yml
calls
```
build_nightly_torch_ci_images:
name: Build CI Docker Images with nightly torch
uses: ./.github/workflows/build-nightly-ci-docker-images.yml
```
which builds 2 docker images in 2 jobs
```
latest-with-torch-nightly-docker:
nightly-torch-deepspeed-docker:
```
However, after #40306,
> .github/workflows/self-nightly-caller.yml
only calls `model-ci` and no longer call `deepspeed-ci`, see
https://github.com/huggingface/transformers/pull/40306/files#r2287368451
And we only need to build `latest-with-torch-nightly-docker` image for `model-ci` instead of the 2 docker image.
Before this PR, we had `nightly-torch-deepspeed-docker` fails to build
https://github.com/huggingface/transformers/actions/runs/17431117913
and prevent the nightly torch CI to be run, which is not good.
This PR avoids this situation by adding `if` conditions in the 2 jobs in `build-nightly-ci-docker-images.yml` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40677/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40677/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40676 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40676/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40676/comments | https://api.github.com/repos/huggingface/transformers/issues/40676/events | https://github.com/huggingface/transformers/pull/40676 | 3,382,403,938 | PR_kwDOCUB6oc6myYYF | 40,676 | Fix parent classes of ProcessingKwargs | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T06:50:24 | 2025-09-06T06:48:40 | 2025-09-05T10:01:16 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40676",
"html_url": "https://github.com/huggingface/transformers/pull/40676",
"diff_url": "https://github.com/huggingface/transformers/pull/40676.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40676.patch",
"merged_at": "2025-09-05T10:01:16"
} | # What does this PR do?
The parent classes of `ProcessingKwargs` look incorrect.
| {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40676/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40676/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40675 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40675/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40675/comments | https://api.github.com/repos/huggingface/transformers/issues/40675/events | https://github.com/huggingface/transformers/pull/40675 | 3,382,092,923 | PR_kwDOCUB6oc6mxV99 | 40,675 | Skip more fast v.s slow image processor tests | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-04T04:30:31 | 2025-09-04T04:39:15 | 2025-09-04T04:35:44 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40675",
"html_url": "https://github.com/huggingface/transformers/pull/40675",
"diff_url": "https://github.com/huggingface/transformers/pull/40675.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40675.patch",
"merged_at": "2025-09-04T04:35:44"
} | # What does this PR do?
Either flaky or always failing. Get rid of this ... | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40675/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40675/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40674 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40674/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40674/comments | https://api.github.com/repos/huggingface/transformers/issues/40674/events | https://github.com/huggingface/transformers/issues/40674 | 3,381,746,913 | I_kwDOCUB6oc7JkVzh | 40,674 | Add object detection heads to DINOv3 | {
"login": "ryan-minato",
"id": 82735346,
"node_id": "MDQ6VXNlcjgyNzM1MzQ2",
"avatar_url": "https://avatars.githubusercontent.com/u/82735346?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ryan-minato",
"html_url": "https://github.com/ryan-minato",
"followers_url": "https://api.github.com/users/ryan-minato/followers",
"following_url": "https://api.github.com/users/ryan-minato/following{/other_user}",
"gists_url": "https://api.github.com/users/ryan-minato/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ryan-minato/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ryan-minato/subscriptions",
"organizations_url": "https://api.github.com/users/ryan-minato/orgs",
"repos_url": "https://api.github.com/users/ryan-minato/repos",
"events_url": "https://api.github.com/users/ryan-minato/events{/privacy}",
"received_events_url": "https://api.github.com/users/ryan-minato/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 2648621985,
"node_id": "MDU6TGFiZWwyNjQ4NjIxOTg1",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Feature%20request",
"name": "Feature request",
"color": "FBCA04",
"default": false,
"description": "Request for a new feature"
}
] | open | false | null | [] | null | [] | 2025-09-04T01:01:56 | 2025-09-17T04:48:17 | null | NONE | null | null | null | null | ### Feature request
The DINOv3 codebase includes several task-specific heads for a variety of tasks, including classification, depth estimation, object detection, and semantic segmentation.
The initial focus of this feature request is to integrate the **object detection head**, with the hope that other heads like semantic segmentation and depth estimation can be added in the future.
paper: [arXiv:2508.10104](https://arxiv.org/abs/2508.10104)
code: [facebookresearch/dinov3](https://github.com/facebookresearch/dinov3)
https://github.com/facebookresearch/dinov3/blob/259ac15600d777251d7dc3f3e2000a99f5b745e7/dinov3/eval/detection/models/detr.py#L34-L36
### Motivation
The DINOv3 paper employs a modified **plain-detr** architecture for its object detection head. Due to this specific design choice, I believe that simply using the existing `DETR` implementation within transformers or adding an `AutoBackbone` for DINOv3 might not be the ideal solution.
A more effective approach would be to add a dedicated head for object detection to fully leverage the model's capabilities and ensure a correct implementation.
### Your contribution
I am willing to help with the implementation of the object detection head, but my time is limited, so progress might be slow. I would be very grateful if someone with more availability could take the lead on this.
I also have a question regarding the license of the DINOv3 repository. The DINOv3 codebase uses a specific license, not one of the standard open-source licenses like MIT or Apache 2.0. This is similar to the situation with the LLaMA models.
I was wondering how the transformers library handles this type of license and if it would be a potential roadblock for integrating DINOv3's additional heads. Your guidance on this would be greatly appreciated.
LICENSE.md:
https://github.com/facebookresearch/dinov3/blob/259ac15600d777251d7dc3f3e2000a99f5b745e7/LICENSE.md | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40674/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40674/timeline | null | null | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | false |
https://api.github.com/repos/huggingface/transformers/issues/40673 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40673/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40673/comments | https://api.github.com/repos/huggingface/transformers/issues/40673/events | https://github.com/huggingface/transformers/pull/40673 | 3,381,612,065 | PR_kwDOCUB6oc6mvu7S | 40,673 | [Quantization] Allow loading of transform configs | {
"login": "kylesayrs",
"id": 17103692,
"node_id": "MDQ6VXNlcjE3MTAzNjky",
"avatar_url": "https://avatars.githubusercontent.com/u/17103692?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kylesayrs",
"html_url": "https://github.com/kylesayrs",
"followers_url": "https://api.github.com/users/kylesayrs/followers",
"following_url": "https://api.github.com/users/kylesayrs/following{/other_user}",
"gists_url": "https://api.github.com/users/kylesayrs/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kylesayrs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kylesayrs/subscriptions",
"organizations_url": "https://api.github.com/users/kylesayrs/orgs",
"repos_url": "https://api.github.com/users/kylesayrs/repos",
"events_url": "https://api.github.com/users/kylesayrs/events{/privacy}",
"received_events_url": "https://api.github.com/users/kylesayrs/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-03T23:28:31 | 2025-10-08T22:31:35 | null | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40673",
"html_url": "https://github.com/huggingface/transformers/pull/40673",
"diff_url": "https://github.com/huggingface/transformers/pull/40673.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40673.patch",
"merged_at": null
} | ## Purpose ##
* Support loading models with online transforms applied via Compressed Tensors (LLM Compressor)
## Prerequisites ##
* https://github.com/neuralmagic/compressed-tensors/pull/445
## Changes ##
* Require a minimum compressed tensors version of `0.11.0` (to support transform features)
* Load transform configs (if available), and apply them to the model before weight loading
* (misc) Refactor compressed tensors tests to check for perplexity, rather than exact output matches
* (misc) Remove `update_dtype` in order to reduce complexity and give users more control/predictability of model data types
## Testing ##
* Regression tested using `CompressedTensorsTest`, added an online quip-style transformed model for testing
* Perplexity results match expectations | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40673/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40673/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40672 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40672/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40672/comments | https://api.github.com/repos/huggingface/transformers/issues/40672/events | https://github.com/huggingface/transformers/issues/40672 | 3,381,534,948 | I_kwDOCUB6oc7JjiDk | 40,672 | Preserve original GGUF dtypes during fp32 conversion | {
"login": "dillondesilva",
"id": 10183259,
"node_id": "MDQ6VXNlcjEwMTgzMjU5",
"avatar_url": "https://avatars.githubusercontent.com/u/10183259?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dillondesilva",
"html_url": "https://github.com/dillondesilva",
"followers_url": "https://api.github.com/users/dillondesilva/followers",
"following_url": "https://api.github.com/users/dillondesilva/following{/other_user}",
"gists_url": "https://api.github.com/users/dillondesilva/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dillondesilva/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dillondesilva/subscriptions",
"organizations_url": "https://api.github.com/users/dillondesilva/orgs",
"repos_url": "https://api.github.com/users/dillondesilva/repos",
"events_url": "https://api.github.com/users/dillondesilva/events{/privacy}",
"received_events_url": "https://api.github.com/users/dillondesilva/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T22:49:07 | 2025-09-14T22:40:52 | 2025-09-14T22:40:52 | NONE | null | null | null | null | Hi there,
Just curious, I noticed when using `gguf` within transformers to load a .gguf model, it is dequantised to fp32.
Would it be possible to include a patch which propagates some of the original tensor dtype information as model metadata? The end goal here is so that a dev could load a .gguf model via transformers and then convert back to the dequantized tensor types if they wish. I'm not too sure if this is the right spot but a quick search and rubber-ducking with copilot led me to [load_gguf_checkpoint](https://github.com/huggingface/transformers/blob/a2b37bfd58c55e0f0b4b3a73f2f1d177b9094437/src/transformers/modeling_gguf_pytorch_utils.py) where such a change might be appropriate. Happy to work on this as well if it helps, would just need some guidance :)
Cheers from Sydney! | {
"login": "dillondesilva",
"id": 10183259,
"node_id": "MDQ6VXNlcjEwMTgzMjU5",
"avatar_url": "https://avatars.githubusercontent.com/u/10183259?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dillondesilva",
"html_url": "https://github.com/dillondesilva",
"followers_url": "https://api.github.com/users/dillondesilva/followers",
"following_url": "https://api.github.com/users/dillondesilva/following{/other_user}",
"gists_url": "https://api.github.com/users/dillondesilva/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dillondesilva/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dillondesilva/subscriptions",
"organizations_url": "https://api.github.com/users/dillondesilva/orgs",
"repos_url": "https://api.github.com/users/dillondesilva/repos",
"events_url": "https://api.github.com/users/dillondesilva/events{/privacy}",
"received_events_url": "https://api.github.com/users/dillondesilva/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40672/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40672/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40671 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40671/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40671/comments | https://api.github.com/repos/huggingface/transformers/issues/40671/events | https://github.com/huggingface/transformers/pull/40671 | 3,381,415,189 | PR_kwDOCUB6oc6mvDfA | 40,671 | Fixing bug in Voxtral when merging text and audio embeddings | {
"login": "rcogill",
"id": 17432723,
"node_id": "MDQ6VXNlcjE3NDMyNzIz",
"avatar_url": "https://avatars.githubusercontent.com/u/17432723?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcogill",
"html_url": "https://github.com/rcogill",
"followers_url": "https://api.github.com/users/rcogill/followers",
"following_url": "https://api.github.com/users/rcogill/following{/other_user}",
"gists_url": "https://api.github.com/users/rcogill/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rcogill/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rcogill/subscriptions",
"organizations_url": "https://api.github.com/users/rcogill/orgs",
"repos_url": "https://api.github.com/users/rcogill/repos",
"events_url": "https://api.github.com/users/rcogill/events{/privacy}",
"received_events_url": "https://api.github.com/users/rcogill/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T21:54:46 | 2025-09-04T15:15:50 | 2025-09-04T15:11:23 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40671",
"html_url": "https://github.com/huggingface/transformers/pull/40671",
"diff_url": "https://github.com/huggingface/transformers/pull/40671.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40671.patch",
"merged_at": "2025-09-04T15:11:23"
} | # What does this PR do?
This PR addresses two issues arising from an [in-place operation where audio and text embeddings are merged](https://github.com/huggingface/transformers/blob/main/src/transformers/models/voxtral/modeling_voxtral.py#L512) in the Voxtral model. This fixes [Issue #40488](https://github.com/huggingface/transformers/issues/40488) and an unreported issue resulting from using `device_map="auto"` with the Voxtral model.
More detail about the two issues and their resolution:
- In the issue reported in [#40488](https://github.com/huggingface/transformers/issues/40488), the `forward` method of `VoxtralForConditionalGeneration` fails when using LoRA. The underlying issue is that when the text embedding layer is frozen, the `inputs_embeds` tensor extracted from the embedding layer is a leaf tensor. When `inputs_embeds` is a leaf tensor that requires gradients, values of this tensor cannot be reassigned. To address this, `inputs_embeds` will be now be cloned to enable tracking of gradients when it is a leaf tensor that requires gradients.
- The second unreported issue arises when using `device_map="auto"` with Voxtral. When using `device_map="auto"`, audio and text layers might be distributed across different devices. When this is the case, `inputs_embeds` and `audio_embeds` might be on different devices. In this case, attempting to assign values of `audio_embeds` to `inputs_embeds` will fail since both tensors are expected to be on the same device. To address this, `audio_embeds` is moved to the same device as `inputs_embeds` before updating values of `inputs_embeds`.
## 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. -> https://github.com/huggingface/transformers/issues/40488
- [ ] Did you make sure to update the documentation with your changes? -> No documentation changes necessary.
- [ ] Did you write any new necessary tests? -> No new features added.
## Who can review?
@eustlb | {
"login": "eustlb",
"id": 94853470,
"node_id": "U_kgDOBadZXg",
"avatar_url": "https://avatars.githubusercontent.com/u/94853470?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eustlb",
"html_url": "https://github.com/eustlb",
"followers_url": "https://api.github.com/users/eustlb/followers",
"following_url": "https://api.github.com/users/eustlb/following{/other_user}",
"gists_url": "https://api.github.com/users/eustlb/gists{/gist_id}",
"starred_url": "https://api.github.com/users/eustlb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eustlb/subscriptions",
"organizations_url": "https://api.github.com/users/eustlb/orgs",
"repos_url": "https://api.github.com/users/eustlb/repos",
"events_url": "https://api.github.com/users/eustlb/events{/privacy}",
"received_events_url": "https://api.github.com/users/eustlb/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40671/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40671/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40670 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40670/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40670/comments | https://api.github.com/repos/huggingface/transformers/issues/40670/events | https://github.com/huggingface/transformers/pull/40670 | 3,380,922,140 | PR_kwDOCUB6oc6mtXM1 | 40,670 | Add ability to run Gemma 2 models without post layer norm | {
"login": "amer-sinha",
"id": 230069029,
"node_id": "U_kgDODbaTJQ",
"avatar_url": "https://avatars.githubusercontent.com/u/230069029?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amer-sinha",
"html_url": "https://github.com/amer-sinha",
"followers_url": "https://api.github.com/users/amer-sinha/followers",
"following_url": "https://api.github.com/users/amer-sinha/following{/other_user}",
"gists_url": "https://api.github.com/users/amer-sinha/gists{/gist_id}",
"starred_url": "https://api.github.com/users/amer-sinha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amer-sinha/subscriptions",
"organizations_url": "https://api.github.com/users/amer-sinha/orgs",
"repos_url": "https://api.github.com/users/amer-sinha/repos",
"events_url": "https://api.github.com/users/amer-sinha/events{/privacy}",
"received_events_url": "https://api.github.com/users/amer-sinha/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-03T18:58:10 | 2025-09-04T17:26:53 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40670",
"html_url": "https://github.com/huggingface/transformers/pull/40670",
"diff_url": "https://github.com/huggingface/transformers/pull/40670.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40670.patch",
"merged_at": null
} | # What does this PR do?
adds the ability for Gemma2 models to run without post attention layer normalization and post feedforward layer normalization.
<!--
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 -->
## 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).
- [ ] 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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40670/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40670/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40669 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40669/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40669/comments | https://api.github.com/repos/huggingface/transformers/issues/40669/events | https://github.com/huggingface/transformers/pull/40669 | 3,380,866,943 | PR_kwDOCUB6oc6mtLCR | 40,669 | fix broken offline mode when loading tokenizer from hub | {
"login": "winglian",
"id": 381258,
"node_id": "MDQ6VXNlcjM4MTI1OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/381258?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/winglian",
"html_url": "https://github.com/winglian",
"followers_url": "https://api.github.com/users/winglian/followers",
"following_url": "https://api.github.com/users/winglian/following{/other_user}",
"gists_url": "https://api.github.com/users/winglian/gists{/gist_id}",
"starred_url": "https://api.github.com/users/winglian/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/winglian/subscriptions",
"organizations_url": "https://api.github.com/users/winglian/orgs",
"repos_url": "https://api.github.com/users/winglian/repos",
"events_url": "https://api.github.com/users/winglian/events{/privacy}",
"received_events_url": "https://api.github.com/users/winglian/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 8103865784,
"node_id": "LA_kwDOCUB6oc8AAAAB4wctuA",
"url": "https://api.github.com/repos/huggingface/transformers/labels/for%20patch",
"name": "for patch",
"color": "D93F0B",
"default": false,
"description": "Tag issues / labels that should be included in the next patch"
}
] | closed | false | null | [] | null | [] | 2025-09-03T18:39:13 | 2025-09-04T12:20:48 | 2025-09-04T12:15:56 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40669",
"html_url": "https://github.com/huggingface/transformers/pull/40669",
"diff_url": "https://github.com/huggingface/transformers/pull/40669.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40669.patch",
"merged_at": "2025-09-04T12:15:56"
} | # What does this PR do?
#39874 broke loading tokenizers from_pretrained when using offline mode. Hub's `OfflineModeIsEnabled` extends python's builtin `ConnectionError` , not `requests.exceptions.ConnectionError`
<!--
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 # (issue)
## 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#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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40669/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40669/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40668 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40668/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40668/comments | https://api.github.com/repos/huggingface/transformers/issues/40668/events | https://github.com/huggingface/transformers/pull/40668 | 3,380,534,566 | PR_kwDOCUB6oc6msB_4 | 40,668 | Fix backward compatibility with accelerate in Trainer | {
"login": "qgallouedec",
"id": 45557362,
"node_id": "MDQ6VXNlcjQ1NTU3MzYy",
"avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qgallouedec",
"html_url": "https://github.com/qgallouedec",
"followers_url": "https://api.github.com/users/qgallouedec/followers",
"following_url": "https://api.github.com/users/qgallouedec/following{/other_user}",
"gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}",
"starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions",
"organizations_url": "https://api.github.com/users/qgallouedec/orgs",
"repos_url": "https://api.github.com/users/qgallouedec/repos",
"events_url": "https://api.github.com/users/qgallouedec/events{/privacy}",
"received_events_url": "https://api.github.com/users/qgallouedec/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 8103865784,
"node_id": "LA_kwDOCUB6oc8AAAAB4wctuA",
"url": "https://api.github.com/repos/huggingface/transformers/labels/for%20patch",
"name": "for patch",
"color": "D93F0B",
"default": false,
"description": "Tag issues / labels that should be included in the next patch"
}
] | closed | false | null | [] | null | [] | 2025-09-03T16:49:00 | 2025-09-08T12:31:34 | 2025-09-04T16:15:15 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40668",
"html_url": "https://github.com/huggingface/transformers/pull/40668",
"diff_url": "https://github.com/huggingface/transformers/pull/40668.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40668.patch",
"merged_at": "2025-09-04T16:15:15"
} | `Accelerator().parallelism_config` only exists from accelerate 1.10. This PR ensure backward compatibility with older versions
cc @ArthurZucker for patch please 🙏 | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40668/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40668/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40667 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40667/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40667/comments | https://api.github.com/repos/huggingface/transformers/issues/40667/events | https://github.com/huggingface/transformers/pull/40667 | 3,380,512,757 | PR_kwDOCUB6oc6mr9RH | 40,667 | Fix self.dropout_p is not defined for SamAttention/Sam2Attention | {
"login": "yonigozlan",
"id": 74535834,
"node_id": "MDQ6VXNlcjc0NTM1ODM0",
"avatar_url": "https://avatars.githubusercontent.com/u/74535834?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yonigozlan",
"html_url": "https://github.com/yonigozlan",
"followers_url": "https://api.github.com/users/yonigozlan/followers",
"following_url": "https://api.github.com/users/yonigozlan/following{/other_user}",
"gists_url": "https://api.github.com/users/yonigozlan/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yonigozlan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yonigozlan/subscriptions",
"organizations_url": "https://api.github.com/users/yonigozlan/orgs",
"repos_url": "https://api.github.com/users/yonigozlan/repos",
"events_url": "https://api.github.com/users/yonigozlan/events{/privacy}",
"received_events_url": "https://api.github.com/users/yonigozlan/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 8103865784,
"node_id": "LA_kwDOCUB6oc8AAAAB4wctuA",
"url": "https://api.github.com/repos/huggingface/transformers/labels/for%20patch",
"name": "for patch",
"color": "D93F0B",
"default": false,
"description": "Tag issues / labels that should be included in the next patch"
}
] | closed | false | null | [] | null | [] | 2025-09-03T16:40:46 | 2025-09-04T17:32:40 | 2025-09-04T17:32:40 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40667",
"html_url": "https://github.com/huggingface/transformers/pull/40667",
"diff_url": "https://github.com/huggingface/transformers/pull/40667.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40667.patch",
"merged_at": "2025-09-04T17:32:40"
} | # What does this PR do?
Fixes https://github.com/huggingface/transformers/issues/40255#issuecomment-3247886994
`self.dropout_p` shouldn't be used for SamAttention/Sam2Attention, only for RoPE attention (memory attention) in Sam2Video | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40667/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40667/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40666 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40666/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40666/comments | https://api.github.com/repos/huggingface/transformers/issues/40666/events | https://github.com/huggingface/transformers/pull/40666 | 3,380,497,395 | PR_kwDOCUB6oc6mr5_B | 40,666 | Remove overwritten `GitModelTest::test_beam_search_generate` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T16:34:30 | 2025-09-03T16:55:47 | 2025-09-03T16:55:45 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40666",
"html_url": "https://github.com/huggingface/transformers/pull/40666",
"diff_url": "https://github.com/huggingface/transformers/pull/40666.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40666.patch",
"merged_at": "2025-09-03T16:55:45"
} | # What does this PR do?
This test overwrites the one from `GenerationTesterMixin`
and we have it being flaky
> FAILED tests/models/git/test_modeling_git.py::GitModelTest::test_beam_search_generate - AssertionError: torch.Size([26, 16]) != (26, 20)
https://app.circleci.com/pipelines/github/huggingface/transformers/144061/workflows/5cf0ad7e-25c7-4396-8e17-f58dfdf0adbf/jobs/1904264/parallel-runs/6
The `GenerationTesterMixin::test_beam_search_generate` has some new updates after `GitModelTest::test_beam_search_generate` being added.
Remove the overwritten one and the test works well: all pass in 3000 runs | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40666/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40666/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40665 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40665/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40665/comments | https://api.github.com/repos/huggingface/transformers/issues/40665/events | https://github.com/huggingface/transformers/pull/40665 | 3,380,431,396 | PR_kwDOCUB6oc6mrsHT | 40,665 | Add codebook_dim attribute to DacVectorQuantize for DacResidualVectorQuantize.from_latents() | {
"login": "flavioialongo",
"id": 67295718,
"node_id": "MDQ6VXNlcjY3Mjk1NzE4",
"avatar_url": "https://avatars.githubusercontent.com/u/67295718?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/flavioialongo",
"html_url": "https://github.com/flavioialongo",
"followers_url": "https://api.github.com/users/flavioialongo/followers",
"following_url": "https://api.github.com/users/flavioialongo/following{/other_user}",
"gists_url": "https://api.github.com/users/flavioialongo/gists{/gist_id}",
"starred_url": "https://api.github.com/users/flavioialongo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/flavioialongo/subscriptions",
"organizations_url": "https://api.github.com/users/flavioialongo/orgs",
"repos_url": "https://api.github.com/users/flavioialongo/repos",
"events_url": "https://api.github.com/users/flavioialongo/events{/privacy}",
"received_events_url": "https://api.github.com/users/flavioialongo/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T16:10:53 | 2025-09-04T11:33:40 | 2025-09-04T11:29:53 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40665",
"html_url": "https://github.com/huggingface/transformers/pull/40665",
"diff_url": "https://github.com/huggingface/transformers/pull/40665.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40665.patch",
"merged_at": "2025-09-04T11:29:53"
} | # What does this PR do?
This PR fixes an issue where DacResidualVectorQuantize.from_latents required an additional attribute from the DacVectorQuantize class.
- Added the missing instance attribute in the class initialization.
- Prevents runtime errors when calling from_latents.
## Before submitting
- [x] Bug-fix (non-breaking change)
- [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.
Your PR will be replied to more quickly if you can figure out the right person to tag with @
@eustlb
| {
"login": "vasqu",
"id": 73884904,
"node_id": "MDQ6VXNlcjczODg0OTA0",
"avatar_url": "https://avatars.githubusercontent.com/u/73884904?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vasqu",
"html_url": "https://github.com/vasqu",
"followers_url": "https://api.github.com/users/vasqu/followers",
"following_url": "https://api.github.com/users/vasqu/following{/other_user}",
"gists_url": "https://api.github.com/users/vasqu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vasqu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vasqu/subscriptions",
"organizations_url": "https://api.github.com/users/vasqu/orgs",
"repos_url": "https://api.github.com/users/vasqu/repos",
"events_url": "https://api.github.com/users/vasqu/events{/privacy}",
"received_events_url": "https://api.github.com/users/vasqu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40665/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40665/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40664 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40664/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40664/comments | https://api.github.com/repos/huggingface/transformers/issues/40664/events | https://github.com/huggingface/transformers/pull/40664 | 3,380,411,196 | PR_kwDOCUB6oc6mrn2A | 40,664 | Skip `test_prompt_lookup_decoding_matches_greedy_search` for `qwen2_audio` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T16:04:10 | 2025-09-03T16:43:37 | 2025-09-03T16:43:35 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40664",
"html_url": "https://github.com/huggingface/transformers/pull/40664",
"diff_url": "https://github.com/huggingface/transformers/pull/40664.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40664.patch",
"merged_at": "2025-09-03T16:43:35"
} | # What does this PR do?
Same as #40643
We will soon make it more automatically, but for now just skip this way. | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40664/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40664/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40663 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40663/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40663/comments | https://api.github.com/repos/huggingface/transformers/issues/40663/events | https://github.com/huggingface/transformers/pull/40663 | 3,380,348,915 | PR_kwDOCUB6oc6mraTc | 40,663 | Skip `test_fast_is_faster_than_slow` for `Owlv2ImageProcessingTest` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T15:44:07 | 2025-09-03T15:53:32 | 2025-09-03T15:49:10 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40663",
"html_url": "https://github.com/huggingface/transformers/pull/40663",
"diff_url": "https://github.com/huggingface/transformers/pull/40663.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40663.patch",
"merged_at": "2025-09-03T15:49:10"
} | # What does this PR do?
Similar to #40599
Never pass, but not reported due to CI pytest worker crash for some time | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40663/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40663/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40662 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40662/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40662/comments | https://api.github.com/repos/huggingface/transformers/issues/40662/events | https://github.com/huggingface/transformers/pull/40662 | 3,380,308,862 | PR_kwDOCUB6oc6mrRr8 | 40,662 | sync | {
"login": "brian030128",
"id": 37238439,
"node_id": "MDQ6VXNlcjM3MjM4NDM5",
"avatar_url": "https://avatars.githubusercontent.com/u/37238439?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/brian030128",
"html_url": "https://github.com/brian030128",
"followers_url": "https://api.github.com/users/brian030128/followers",
"following_url": "https://api.github.com/users/brian030128/following{/other_user}",
"gists_url": "https://api.github.com/users/brian030128/gists{/gist_id}",
"starred_url": "https://api.github.com/users/brian030128/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brian030128/subscriptions",
"organizations_url": "https://api.github.com/users/brian030128/orgs",
"repos_url": "https://api.github.com/users/brian030128/repos",
"events_url": "https://api.github.com/users/brian030128/events{/privacy}",
"received_events_url": "https://api.github.com/users/brian030128/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T15:30:20 | 2025-09-03T16:24:34 | 2025-09-03T16:24:34 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40662",
"html_url": "https://github.com/huggingface/transformers/pull/40662",
"diff_url": "https://github.com/huggingface/transformers/pull/40662.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40662.patch",
"merged_at": null
} | # 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 # (issue)
## 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#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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "brian030128",
"id": 37238439,
"node_id": "MDQ6VXNlcjM3MjM4NDM5",
"avatar_url": "https://avatars.githubusercontent.com/u/37238439?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/brian030128",
"html_url": "https://github.com/brian030128",
"followers_url": "https://api.github.com/users/brian030128/followers",
"following_url": "https://api.github.com/users/brian030128/following{/other_user}",
"gists_url": "https://api.github.com/users/brian030128/gists{/gist_id}",
"starred_url": "https://api.github.com/users/brian030128/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brian030128/subscriptions",
"organizations_url": "https://api.github.com/users/brian030128/orgs",
"repos_url": "https://api.github.com/users/brian030128/repos",
"events_url": "https://api.github.com/users/brian030128/events{/privacy}",
"received_events_url": "https://api.github.com/users/brian030128/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40662/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40662/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40661 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40661/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40661/comments | https://api.github.com/repos/huggingface/transformers/issues/40661/events | https://github.com/huggingface/transformers/pull/40661 | 3,380,259,766 | PR_kwDOCUB6oc6mrG_4 | 40,661 | Update `check_determinism` inside `test_determinism` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T15:15:18 | 2025-09-03T15:30:41 | 2025-09-03T15:30:39 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40661",
"html_url": "https://github.com/huggingface/transformers/pull/40661",
"diff_url": "https://github.com/huggingface/transformers/pull/40661.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40661.patch",
"merged_at": "2025-09-03T15:30:39"
} | # What does this PR do?
Flaky at least for
> FAILED tests/models/evolla/test_modeling_evolla.py::EvollaModelTest::test_determinism - ValueError: zero-size array to reduction operation maximum which has no identity
where tensors on both sides are all `nan`.
Let's simply not compare in this case.
### Failed job run page
https://app.circleci.com/pipelines/github/huggingface/transformers/144111/workflows/032ff3b8-2782-4519-b836-49b52975a197/jobs/1904923
### Full log
```
_______________________ EvollaModelTest.test_determinism _______________________
[gw1] linux -- Python 3.9.23 /usr/local/bin/python3
self = <tests.models.evolla.test_modeling_evolla.EvollaModelTest testMethod=test_determinism>
def test_determinism(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
def check_determinism(first, second):
out_1 = first.cpu().numpy()
out_2 = second.cpu().numpy()
out_1 = out_1[~np.isnan(out_1)]
out_2 = out_2[~np.isnan(out_2)]
out_1 = out_1[~np.isneginf(out_1)]
out_2 = out_2[~np.isneginf(out_2)]
max_diff = np.amax(np.abs(out_1 - out_2))
self.assertLessEqual(max_diff, 1e-5)
for model_class in self.all_model_classes:
model = model_class(copy.deepcopy(config))
model.to(torch_device)
model.eval()
with torch.no_grad():
first = model(**self._prepare_for_class(inputs_dict, model_class))[0]
second = model(**self._prepare_for_class(inputs_dict, model_class))[0]
if isinstance(first, tuple) and isinstance(second, tuple):
for tensor1, tensor2 in zip(first, second):
check_determinism(tensor1, tensor2)
else:
> check_determinism(first, second)
tests/test_modeling_common.py:1015:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_modeling_common.py:1000: in check_determinism
max_diff = np.amax(np.abs(out_1 - out_2))
/usr/local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:2827: in amax
return _wrapreduction(a, np.maximum, 'max', axis, None, out,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = array([], dtype=float32), ufunc = <ufunc 'maximum'>, method = 'max'
axis = None, dtype = None, out = None
kwargs = {'initial': <no value>, 'keepdims': <no value>, 'where': <no value>}
passkwargs = {}
def _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs):
passkwargs = {k: v for k, v in kwargs.items()
if v is not np._NoValue}
if type(obj) is not mu.ndarray:
try:
reduction = getattr(obj, method)
except AttributeError:
pass
else:
# This branch is needed for reductions like any which don't
# support a dtype.
if dtype is not None:
return reduction(axis=axis, dtype=dtype, out=out, **passkwargs)
else:
return reduction(axis=axis, out=out, **passkwargs)
> return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
E ValueError: zero-size array to reduction operation maximum which has no identity
/usr/local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:88: ValueError
```
| {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40661/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40661/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40660 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40660/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40660/comments | https://api.github.com/repos/huggingface/transformers/issues/40660/events | https://github.com/huggingface/transformers/pull/40660 | 3,380,190,721 | PR_kwDOCUB6oc6mq4Kt | 40,660 | Fix Metaclip modular conversion | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T14:54:29 | 2025-09-03T15:13:52 | 2025-09-03T15:13:50 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40660",
"html_url": "https://github.com/huggingface/transformers/pull/40660",
"diff_url": "https://github.com/huggingface/transformers/pull/40660.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40660.patch",
"merged_at": "2025-09-03T15:13:50"
} | Likely a CI issue on our end - the CI passed for https://github.com/huggingface/transformers/pull/40565 but there were some issues with the modular conversion. I reran `make fix-copies` to fix. | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40660/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40660/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40659 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40659/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40659/comments | https://api.github.com/repos/huggingface/transformers/issues/40659/events | https://github.com/huggingface/transformers/issues/40659 | 3,380,067,957 | I_kwDOCUB6oc7Jd751 | 40,659 | Automodel.from_pretrained fails with -OO flag | {
"login": "SimonDR-Boltzmann",
"id": 76128548,
"node_id": "MDQ6VXNlcjc2MTI4NTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/76128548?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SimonDR-Boltzmann",
"html_url": "https://github.com/SimonDR-Boltzmann",
"followers_url": "https://api.github.com/users/SimonDR-Boltzmann/followers",
"following_url": "https://api.github.com/users/SimonDR-Boltzmann/following{/other_user}",
"gists_url": "https://api.github.com/users/SimonDR-Boltzmann/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SimonDR-Boltzmann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SimonDR-Boltzmann/subscriptions",
"organizations_url": "https://api.github.com/users/SimonDR-Boltzmann/orgs",
"repos_url": "https://api.github.com/users/SimonDR-Boltzmann/repos",
"events_url": "https://api.github.com/users/SimonDR-Boltzmann/events{/privacy}",
"received_events_url": "https://api.github.com/users/SimonDR-Boltzmann/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-03T14:21:25 | 2025-10-12T08:02:40 | 2025-10-12T08:02:40 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.56.0
- Platform: Linux-6.1.0-37-amd64-x86_64-with-glibc2.36
- Python version: 3.11.2
- Huggingface_hub version: 0.34.4
- Safetensors version: 0.6.2
- Accelerate version: not installed
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.8.0+cpu (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?: no
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
When using `python -OO` with `AutoModel.from_pretrained` something goes wrong involving the automated docstrings.
A minimal example is:
```
from transformers import AutoConfig, AutoModel
sentence_embedding_path = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"
config = AutoConfig.from_pretrained(sentence_embedding_path)
model = AutoModel.from_pretrained(sentence_embedding_path, config=config)
```
With `python -O` this works fine, but with `python -OO` I get:
```
Traceback (most recent call last):
File "~/dev/test_transformers_opt.py", line 5, in <module>
model = AutoModel.from_pretrained(sentence_embedding_path, config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 601, in from_pretrained
model_class = _get_model_class(config, cls._model_mapping)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 394, in _get_model_class
supported_models = model_mapping[type(config)]
~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 807, in __getitem__
return self._load_attr_from_module(model_type, model_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 821, in _load_attr_from_module
return getattribute_from_module(self._modules[module_name], attr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 733, in getattribute_from_module
if hasattr(module, attr):
^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 2302, in __getattr__
module = self._get_module(self._class_to_module[name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 2332, in _get_module
raise e
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 2330, in _get_module
return importlib.import_module("." + module_name, self.__name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/simon/.pyenv/versions/3.11.2/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<venv_location>/lib/python3.11/site-packages/transformers/models/bert/modeling_bert.py", line 33, in <module>
from ...modeling_layers import GradientCheckpointingLayer
File "<venv_location>/lib/python3.11/site-packages/transformers/modeling_layers.py", line 98, in <module>
class GenericForSequenceClassification(object):
File "<venv_location>/lib/python3.11/site-packages/transformers/modeling_layers.py", line 112, in GenericForSequenceClassification
@auto_docstring
^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/auto_docstring.py", line 2048, in auto_docstring
return auto_docstring_decorator(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/auto_docstring.py", line 2041, in auto_docstring_decorator
return auto_method_docstring(
^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/auto_docstring.py", line 1751, in auto_method_docstring
return_docstring, func_documentation = _process_returns_section(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/auto_docstring.py", line 1620, in _process_returns_section
return_docstring = _prepare_output_docstrings(return_annotation, config_class, add_intro=add_intro)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<venv_location>/lib/python3.11/site-packages/transformers/utils/doc.py", line 155, in _prepare_output_docstrings
raise ValueError(
ValueError: No `Args` or `Parameters` section is found in the docstring of `SequenceClassifierOutputWithPast`. Make sure it has docstring and contain either `Args` or `Parameters`.
```
### Expected behavior
It should load the model as expected (works running normally or with `-O`) | {
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40659/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40659/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40658 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40658/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40658/comments | https://api.github.com/repos/huggingface/transformers/issues/40658/events | https://github.com/huggingface/transformers/pull/40658 | 3,379,983,840 | PR_kwDOCUB6oc6mqK7H | 40,658 | Avoid attention_mask copy in qwen2.5 | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T13:58:18 | 2025-09-04T00:49:46 | 2025-09-03T15:17:22 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40658",
"html_url": "https://github.com/huggingface/transformers/pull/40658",
"diff_url": "https://github.com/huggingface/transformers/pull/40658.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40658.patch",
"merged_at": "2025-09-03T15:17:22"
} | # What does this PR do?
Avoid attention_mask copy | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40658/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40658/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40657 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40657/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40657/comments | https://api.github.com/repos/huggingface/transformers/issues/40657/events | https://github.com/huggingface/transformers/pull/40657 | 3,379,978,040 | PR_kwDOCUB6oc6mqJpf | 40,657 | Align assisted generate for unified signature in decoding methods | {
"login": "manueldeprada",
"id": 6536835,
"node_id": "MDQ6VXNlcjY1MzY4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/manueldeprada",
"html_url": "https://github.com/manueldeprada",
"followers_url": "https://api.github.com/users/manueldeprada/followers",
"following_url": "https://api.github.com/users/manueldeprada/following{/other_user}",
"gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions",
"organizations_url": "https://api.github.com/users/manueldeprada/orgs",
"repos_url": "https://api.github.com/users/manueldeprada/repos",
"events_url": "https://api.github.com/users/manueldeprada/events{/privacy}",
"received_events_url": "https://api.github.com/users/manueldeprada/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T13:56:41 | 2025-09-04T20:47:45 | 2025-09-04T20:47:44 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40657",
"html_url": "https://github.com/huggingface/transformers/pull/40657",
"diff_url": "https://github.com/huggingface/transformers/pull/40657.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40657.patch",
"merged_at": "2025-09-04T20:47:44"
} | @gante let me know what do you think of something like this, it would make my life easier for #40652, which is still not ready for review. It also progresses towards the goal of a set of defined stages with readable general signatures. | {
"login": "manueldeprada",
"id": 6536835,
"node_id": "MDQ6VXNlcjY1MzY4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/manueldeprada",
"html_url": "https://github.com/manueldeprada",
"followers_url": "https://api.github.com/users/manueldeprada/followers",
"following_url": "https://api.github.com/users/manueldeprada/following{/other_user}",
"gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions",
"organizations_url": "https://api.github.com/users/manueldeprada/orgs",
"repos_url": "https://api.github.com/users/manueldeprada/repos",
"events_url": "https://api.github.com/users/manueldeprada/events{/privacy}",
"received_events_url": "https://api.github.com/users/manueldeprada/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40657/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40657/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40656 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40656/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40656/comments | https://api.github.com/repos/huggingface/transformers/issues/40656/events | https://github.com/huggingface/transformers/pull/40656 | 3,379,949,956 | PR_kwDOCUB6oc6mqDbv | 40,656 | No sync | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T13:49:24 | 2025-09-03T13:49:32 | 2025-09-03T13:49:32 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40656",
"html_url": "https://github.com/huggingface/transformers/pull/40656",
"diff_url": "https://github.com/huggingface/transformers/pull/40656.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40656.patch",
"merged_at": null
} | # 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 # (issue)
## 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#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.
<!-- 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
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
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: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40656/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40656/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40655 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40655/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40655/comments | https://api.github.com/repos/huggingface/transformers/issues/40655/events | https://github.com/huggingface/transformers/pull/40655 | 3,379,753,134 | PR_kwDOCUB6oc6mpYZ2 | 40,655 | Mark `LongformerModelTest::test_attention_outputs` as flaky | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T12:54:34 | 2025-09-03T13:19:03 | 2025-09-03T13:19:02 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40655",
"html_url": "https://github.com/huggingface/transformers/pull/40655",
"diff_url": "https://github.com/huggingface/transformers/pull/40655.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40655.patch",
"merged_at": "2025-09-03T13:19:02"
} | # What does this PR do?
Small failure rate, but still seeing it
https://app.circleci.com/pipelines/github/huggingface/transformers/143883/workflows/85ccd674-ccf8-4880-9144-4a2660676b0b/jobs/1902199
Not sure the way `LongformerAttention` and/or `LongformerSelfAttention` processing the attentions they would return.
No bandwidth to check this (and questionable of the worth of the time) | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40655/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40655/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40654 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40654/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40654/comments | https://api.github.com/repos/huggingface/transformers/issues/40654/events | https://github.com/huggingface/transformers/pull/40654 | 3,379,675,228 | PR_kwDOCUB6oc6mpHYO | 40,654 | Remove TF/Flax examples | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T12:35:37 | 2025-09-03T13:15:59 | 2025-09-03T13:15:58 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40654",
"html_url": "https://github.com/huggingface/transformers/pull/40654",
"diff_url": "https://github.com/huggingface/transformers/pull/40654.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40654.patch",
"merged_at": "2025-09-03T13:15:57"
} | As the title says, the frameworks have been deprecated, so we should probably drop the examples as well!
One thing to note: `check_copies.py` had a `check_full_copies` function that checked when files should be exact copies of each other. This was only used for TF/Flax examples. I've removed the `FULL_COPIES` list, the `check_full_copies` function and the call to it in `check_copies.py`, since none of them are necessary anymore. | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40654/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40654/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40653 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40653/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40653/comments | https://api.github.com/repos/huggingface/transformers/issues/40653/events | https://github.com/huggingface/transformers/pull/40653 | 3,379,661,720 | PR_kwDOCUB6oc6mpEZD | 40,653 | feat(serving): add healthcheck | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T12:32:20 | 2025-09-03T14:43:14 | 2025-09-03T14:43:12 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40653",
"html_url": "https://github.com/huggingface/transformers/pull/40653",
"diff_url": "https://github.com/huggingface/transformers/pull/40653.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40653.patch",
"merged_at": "2025-09-03T14:43:12"
} | null | {
"login": "LysandreJik",
"id": 30755778,
"node_id": "MDQ6VXNlcjMwNzU1Nzc4",
"avatar_url": "https://avatars.githubusercontent.com/u/30755778?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LysandreJik",
"html_url": "https://github.com/LysandreJik",
"followers_url": "https://api.github.com/users/LysandreJik/followers",
"following_url": "https://api.github.com/users/LysandreJik/following{/other_user}",
"gists_url": "https://api.github.com/users/LysandreJik/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LysandreJik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LysandreJik/subscriptions",
"organizations_url": "https://api.github.com/users/LysandreJik/orgs",
"repos_url": "https://api.github.com/users/LysandreJik/repos",
"events_url": "https://api.github.com/users/LysandreJik/events{/privacy}",
"received_events_url": "https://api.github.com/users/LysandreJik/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40653/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40653/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40652 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40652/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40652/comments | https://api.github.com/repos/huggingface/transformers/issues/40652/events | https://github.com/huggingface/transformers/pull/40652 | 3,379,642,082 | PR_kwDOCUB6oc6mpADn | 40,652 | 🔴 Isolate prefill from generation loops | {
"login": "manueldeprada",
"id": 6536835,
"node_id": "MDQ6VXNlcjY1MzY4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/manueldeprada",
"html_url": "https://github.com/manueldeprada",
"followers_url": "https://api.github.com/users/manueldeprada/followers",
"following_url": "https://api.github.com/users/manueldeprada/following{/other_user}",
"gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions",
"organizations_url": "https://api.github.com/users/manueldeprada/orgs",
"repos_url": "https://api.github.com/users/manueldeprada/repos",
"events_url": "https://api.github.com/users/manueldeprada/events{/privacy}",
"received_events_url": "https://api.github.com/users/manueldeprada/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-03T12:27:23 | 2025-09-19T09:37:43 | null | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40652",
"html_url": "https://github.com/huggingface/transformers/pull/40652",
"diff_url": "https://github.com/huggingface/transformers/pull/40652.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40652.patch",
"merged_at": null
} | null | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40652/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40652/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40651 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40651/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40651/comments | https://api.github.com/repos/huggingface/transformers/issues/40651/events | https://github.com/huggingface/transformers/pull/40651 | 3,379,518,090 | PR_kwDOCUB6oc6molJz | 40,651 | Add DINOv3Backbone for ConvNext variant | {
"login": "merveenoyan",
"id": 53175384,
"node_id": "MDQ6VXNlcjUzMTc1Mzg0",
"avatar_url": "https://avatars.githubusercontent.com/u/53175384?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/merveenoyan",
"html_url": "https://github.com/merveenoyan",
"followers_url": "https://api.github.com/users/merveenoyan/followers",
"following_url": "https://api.github.com/users/merveenoyan/following{/other_user}",
"gists_url": "https://api.github.com/users/merveenoyan/gists{/gist_id}",
"starred_url": "https://api.github.com/users/merveenoyan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/merveenoyan/subscriptions",
"organizations_url": "https://api.github.com/users/merveenoyan/orgs",
"repos_url": "https://api.github.com/users/merveenoyan/repos",
"events_url": "https://api.github.com/users/merveenoyan/events{/privacy}",
"received_events_url": "https://api.github.com/users/merveenoyan/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T11:48:55 | 2025-10-14T12:57:14 | 2025-10-14T12:57:05 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40651",
"html_url": "https://github.com/huggingface/transformers/pull/40651",
"diff_url": "https://github.com/huggingface/transformers/pull/40651.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40651.patch",
"merged_at": "2025-10-14T12:57:04"
} | I've taken a stab as it was a convolutional model it's very straightforward. The tests I borrowed from Dinov2, I hope it's ok @qubvel can you review if you have bandwidth?
If it's good I will try with AIMv2, PE and some other image backbones as well! | {
"login": "merveenoyan",
"id": 53175384,
"node_id": "MDQ6VXNlcjUzMTc1Mzg0",
"avatar_url": "https://avatars.githubusercontent.com/u/53175384?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/merveenoyan",
"html_url": "https://github.com/merveenoyan",
"followers_url": "https://api.github.com/users/merveenoyan/followers",
"following_url": "https://api.github.com/users/merveenoyan/following{/other_user}",
"gists_url": "https://api.github.com/users/merveenoyan/gists{/gist_id}",
"starred_url": "https://api.github.com/users/merveenoyan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/merveenoyan/subscriptions",
"organizations_url": "https://api.github.com/users/merveenoyan/orgs",
"repos_url": "https://api.github.com/users/merveenoyan/repos",
"events_url": "https://api.github.com/users/merveenoyan/events{/privacy}",
"received_events_url": "https://api.github.com/users/merveenoyan/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40651/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40651/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40650 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40650/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40650/comments | https://api.github.com/repos/huggingface/transformers/issues/40650/events | https://github.com/huggingface/transformers/issues/40650 | 3,379,458,777 | I_kwDOCUB6oc7JbnLZ | 40,650 | Apertus - Error while loading model | {
"login": "BlueskyFR",
"id": 25421460,
"node_id": "MDQ6VXNlcjI1NDIxNDYw",
"avatar_url": "https://avatars.githubusercontent.com/u/25421460?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BlueskyFR",
"html_url": "https://github.com/BlueskyFR",
"followers_url": "https://api.github.com/users/BlueskyFR/followers",
"following_url": "https://api.github.com/users/BlueskyFR/following{/other_user}",
"gists_url": "https://api.github.com/users/BlueskyFR/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BlueskyFR/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BlueskyFR/subscriptions",
"organizations_url": "https://api.github.com/users/BlueskyFR/orgs",
"repos_url": "https://api.github.com/users/BlueskyFR/repos",
"events_url": "https://api.github.com/users/BlueskyFR/events{/privacy}",
"received_events_url": "https://api.github.com/users/BlueskyFR/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-03T11:28:24 | 2025-09-03T14:42:45 | 2025-09-03T13:42:41 | NONE | null | null | null | null | ### System Info
Latest VLLM Docker image with latest git transformers, running on an NVIDIA GPU
### Who can help?
@ArthurZucker @EduardDurech @Cyrilvallez
### Information
- [ ] The official example scripts
- [ ] 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
`ValueError: There is no module or parameter named 'model.layers.0.mlp.act_fn.beta' in TransformersForCausalLM`
To reproduce, load `swiss-ai/Apertus-8B-Instruct-2509` with the latest git version of Transformers for inference.
In my case, I used the VLLM Docker image and upgraded `transformers` manually:
```bash
docker run --rm -it --gpus all -e HF_TOKEN=$HF_TOKEN vllm/vllm-openai:latest --model swiss-ai/Apertus-8B-Instruct-2509 --port 8080 --async-scheduling
```
### Expected behavior
The model should load without any issue. I don't know what this missing module is. | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40650/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40650/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40649 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40649/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40649/comments | https://api.github.com/repos/huggingface/transformers/issues/40649/events | https://github.com/huggingface/transformers/issues/40649 | 3,379,454,697 | I_kwDOCUB6oc7JbmLp | 40,649 | Support for HumanMLLM/HumanOmni | {
"login": "Zha-Miku",
"id": 54501325,
"node_id": "MDQ6VXNlcjU0NTAxMzI1",
"avatar_url": "https://avatars.githubusercontent.com/u/54501325?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Zha-Miku",
"html_url": "https://github.com/Zha-Miku",
"followers_url": "https://api.github.com/users/Zha-Miku/followers",
"following_url": "https://api.github.com/users/Zha-Miku/following{/other_user}",
"gists_url": "https://api.github.com/users/Zha-Miku/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Zha-Miku/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Zha-Miku/subscriptions",
"organizations_url": "https://api.github.com/users/Zha-Miku/orgs",
"repos_url": "https://api.github.com/users/Zha-Miku/repos",
"events_url": "https://api.github.com/users/Zha-Miku/events{/privacy}",
"received_events_url": "https://api.github.com/users/Zha-Miku/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 1843244711,
"node_id": "MDU6TGFiZWwxODQzMjQ0NzEx",
"url": "https://api.github.com/repos/huggingface/transformers/labels/New%20model",
"name": "New model",
"color": "fbca04",
"default": false,
"description": ""
}
] | open | false | null | [] | null | [] | 2025-09-03T11:26:52 | 2025-09-04T19:26:02 | null | NONE | null | null | null | null | ### Model description
this repo https://github.com/HumanMLLM/HumanOmni
I want to support multi-GPU inference for this model on Huawei 300v GPUs
### Open source status
- [x] The model implementation is available
- [x] The model weights are available
### Provide useful links for the implementation
[HumanOmni-7b-model](https://huggingface.co/StarJiaxing/HumanOmni-7B)
```json
{
"_name_or_path": "/mnt/data/jiaxing.zjx/code/HumanOmni_0818/work_dirs/HumanOmniqwen2_siglip/finetune_all_in_one_0111_k700",
"architectures": [
"HumanOmniQwen2ForCausalLM"
],
"attention_dropout": 0.0,
"audio_hidden_size": 1280,
"bos_token_id": 151643,
"eos_token_id": 151645,
"freeze_mm_mlp_adapter": false,
"hidden_act": "silu",
"hidden_size": 3584,
"image_aspect_ratio": "pad",
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"mm_audio_projector_type": "mlp2x_gelu",
"mm_audio_tower": "/models/whisper-large-v3/",
"mm_hidden_size": 1152,
"mm_projector_lr": null,
"mm_projector_type": "all_in_one",
"mm_tunable_parts": "mm_mlp_adapter,audio_projector,mm_language_model",
"mm_use_x_start_end": true,
"mm_vision_select_feature": "patch",
"mm_vision_select_layer": -2,
"mm_vision_tower": "/models/siglip-so400m-patch14-384",
"model_type": "HumanOmni_qwen2",
"num_attention_heads": 28,
"num_frames": 32,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"rms_norm_eps": 1e-06,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"tokenizer_model_max_length": 2048,
"tokenizer_padding_side": "right",
"torch_dtype": "float16",
"transformers_version": "4.45.0.dev0",
"tune_mm_mlp_adapter": false,
"use_cache": true,
"use_mm_proj": true,
"use_sliding_window": false,
"vocab_size": 152064
}
```
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40649/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40649/timeline | null | null | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | false |
https://api.github.com/repos/huggingface/transformers/issues/40648 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40648/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40648/comments | https://api.github.com/repos/huggingface/transformers/issues/40648/events | https://github.com/huggingface/transformers/pull/40648 | 3,379,429,180 | PR_kwDOCUB6oc6moRu- | 40,648 | Bump torch from 2.7.1 to 2.8.0 in /examples/flax/vision | {
"login": "dependabot[bot]",
"id": 49699333,
"node_id": "MDM6Qm90NDk2OTkzMzM=",
"avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dependabot%5Bbot%5D",
"html_url": "https://github.com/apps/dependabot",
"followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 1905493434,
"node_id": "MDU6TGFiZWwxOTA1NDkzNDM0",
"url": "https://api.github.com/repos/huggingface/transformers/labels/dependencies",
"name": "dependencies",
"color": "0366d6",
"default": false,
"description": "Pull requests that update a dependency file"
},
{
"id": 6410654816,
"node_id": "LA_kwDOCUB6oc8AAAABfhrUYA",
"url": "https://api.github.com/repos/huggingface/transformers/labels/python",
"name": "python",
"color": "2b67c6",
"default": false,
"description": "Pull requests that update Python code"
}
] | open | false | null | [] | null | [] | 2025-09-03T11:17:46 | 2025-09-03T13:27:00 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40648",
"html_url": "https://github.com/huggingface/transformers/pull/40648",
"diff_url": "https://github.com/huggingface/transformers/pull/40648.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40648.patch",
"merged_at": null
} | Bumps [torch](https://github.com/pytorch/pytorch) from 2.7.1 to 2.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pytorch/pytorch/releases">torch's releases</a>.</em></p>
<blockquote>
<h1>PyTorch 2.8.0 Release Notes</h1>
<ul>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#highlights">Highlights</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#backwards-incompatible-changes">Backwards Incompatible Changes</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#deprecations">Deprecations</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#new-features">New Features</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#improvements">Improvements</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#bug-fixes">Bug fixes</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#performance">Performance</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#documentation">Documentation</a></li>
<li><a href="https://github.com/pytorch/pytorch/blob/HEAD/#developers">Developers</a></li>
</ul>
<h1>Highlights</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pytorch/pytorch/commit/ba56102387ef21a3b04b357e5b183d48f0afefc7"><code>ba56102</code></a> Cherrypick: Add the RunLLM widget to the website (<a href="https://redirect.github.com/pytorch/pytorch/issues/159592">#159592</a>)</li>
<li><a href="https://github.com/pytorch/pytorch/commit/c525a02c89217181b5731d8043c7309a84e84066"><code>c525a02</code></a> [dynamo, docs] cherry pick torch.compile programming model docs into 2.8 (<a href="https://redirect.github.com/pytorch/pytorch/issues/15">#15</a>...</li>
<li><a href="https://github.com/pytorch/pytorch/commit/a1cb3cc05d46d198467bebbb6e8fba50a325d4e7"><code>a1cb3cc</code></a> [Release Only] Remove nvshmem from list of preload libraries (<a href="https://redirect.github.com/pytorch/pytorch/issues/158925">#158925</a>)</li>
<li><a href="https://github.com/pytorch/pytorch/commit/c76b2356bc31654de2af0c98cce1bef291f06f89"><code>c76b235</code></a> Move out super large one off foreach_copy test (<a href="https://redirect.github.com/pytorch/pytorch/issues/158880">#158880</a>)</li>
<li><a href="https://github.com/pytorch/pytorch/commit/20a0e225a01d4ebbffd44a6a59acff628359c772"><code>20a0e22</code></a> Revert "[Dynamo] Allow inlining into AO quantization modules (<a href="https://redirect.github.com/pytorch/pytorch/issues/152934">#152934</a>)" (<a href="https://redirect.github.com/pytorch/pytorch/issues/158">#158</a>...</li>
<li><a href="https://github.com/pytorch/pytorch/commit/9167ac8c75481e2beb3746aa37b7f48a213c631e"><code>9167ac8</code></a> [MPS] Switch Cholesky decomp to column wise (<a href="https://redirect.github.com/pytorch/pytorch/issues/158237">#158237</a>)</li>
<li><a href="https://github.com/pytorch/pytorch/commit/5534685c62399db8d1e51b47e2dcbc17deaab230"><code>5534685</code></a> [MPS] Reimplement <code>tri[ul]</code> as Metal shaders (<a href="https://redirect.github.com/pytorch/pytorch/issues/158867">#158867</a>)</li>
<li><a href="https://github.com/pytorch/pytorch/commit/d19e08d74b2a27e661bf57a9015014b757e8ea31"><code>d19e08d</code></a> Cherry pick PR 158746 (<a href="https://redirect.github.com/pytorch/pytorch/issues/158801">#158801</a>)</li>
<li><a href="https://github.com/pytorch/pytorch/commit/a6c044ab9aa14f0864c6a572f7c023432511c5ea"><code>a6c044a</code></a> [cherry-pick] Unify torch.tensor and torch.ops.aten.scalar_tensor behavior (#...</li>
<li><a href="https://github.com/pytorch/pytorch/commit/620ebd0646252bbb22524f5c252ec7e9ab977bee"><code>620ebd0</code></a> [Dynamo] Use proper sources for constructing dataclass defaults (<a href="https://redirect.github.com/pytorch/pytorch/issues/158689">#158689</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pytorch/pytorch/compare/v2.7.1...v2.8.0">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/huggingface/transformers/network/alerts).
</details> | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40648/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40648/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40647 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40647/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40647/comments | https://api.github.com/repos/huggingface/transformers/issues/40647/events | https://github.com/huggingface/transformers/issues/40647 | 3,379,310,437 | I_kwDOCUB6oc7JbC9l | 40,647 | how to get response text during training | {
"login": "zyandtom",
"id": 71203151,
"node_id": "MDQ6VXNlcjcxMjAzMTUx",
"avatar_url": "https://avatars.githubusercontent.com/u/71203151?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zyandtom",
"html_url": "https://github.com/zyandtom",
"followers_url": "https://api.github.com/users/zyandtom/followers",
"following_url": "https://api.github.com/users/zyandtom/following{/other_user}",
"gists_url": "https://api.github.com/users/zyandtom/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zyandtom/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zyandtom/subscriptions",
"organizations_url": "https://api.github.com/users/zyandtom/orgs",
"repos_url": "https://api.github.com/users/zyandtom/repos",
"events_url": "https://api.github.com/users/zyandtom/events{/privacy}",
"received_events_url": "https://api.github.com/users/zyandtom/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T10:37:51 | 2025-10-12T08:02:43 | 2025-10-12T08:02:43 | NONE | null | null | null | null | I want to obtain the inferred output text during the evaluation step in the training process, not just the eval loss.
<img width="1264" height="211" alt="Image" src="https://github.com/user-attachments/assets/9dd432c5-74ea-4290-adff-7865cf3ea481" /> | {
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40647/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40647/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40646 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40646/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40646/comments | https://api.github.com/repos/huggingface/transformers/issues/40646/events | https://github.com/huggingface/transformers/pull/40646 | 3,379,266,205 | PR_kwDOCUB6oc6mntvG | 40,646 | refactor: use `tolist` instead of list comprehension calling `.item()` | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T10:24:02 | 2025-09-11T08:19:23 | 2025-09-03T17:25:29 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40646",
"html_url": "https://github.com/huggingface/transformers/pull/40646",
"diff_url": "https://github.com/huggingface/transformers/pull/40646.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40646.patch",
"merged_at": "2025-09-03T17:25:29"
} | https://github.com/huggingface/transformers/pull/40479#discussion_r2317826193 | {
"login": "McPatate",
"id": 9112841,
"node_id": "MDQ6VXNlcjkxMTI4NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/9112841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/McPatate",
"html_url": "https://github.com/McPatate",
"followers_url": "https://api.github.com/users/McPatate/followers",
"following_url": "https://api.github.com/users/McPatate/following{/other_user}",
"gists_url": "https://api.github.com/users/McPatate/gists{/gist_id}",
"starred_url": "https://api.github.com/users/McPatate/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/McPatate/subscriptions",
"organizations_url": "https://api.github.com/users/McPatate/orgs",
"repos_url": "https://api.github.com/users/McPatate/repos",
"events_url": "https://api.github.com/users/McPatate/events{/privacy}",
"received_events_url": "https://api.github.com/users/McPatate/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40646/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40646/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40645 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40645/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40645/comments | https://api.github.com/repos/huggingface/transformers/issues/40645/events | https://github.com/huggingface/transformers/pull/40645 | 3,379,019,271 | PR_kwDOCUB6oc6mm355 | 40,645 | Revert change in `compile_friendly_resize` | {
"login": "qubvel",
"id": 31920396,
"node_id": "MDQ6VXNlcjMxOTIwMzk2",
"avatar_url": "https://avatars.githubusercontent.com/u/31920396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qubvel",
"html_url": "https://github.com/qubvel",
"followers_url": "https://api.github.com/users/qubvel/followers",
"following_url": "https://api.github.com/users/qubvel/following{/other_user}",
"gists_url": "https://api.github.com/users/qubvel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/qubvel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qubvel/subscriptions",
"organizations_url": "https://api.github.com/users/qubvel/orgs",
"repos_url": "https://api.github.com/users/qubvel/repos",
"events_url": "https://api.github.com/users/qubvel/events{/privacy}",
"received_events_url": "https://api.github.com/users/qubvel/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T09:11:03 | 2025-09-18T15:25:46 | 2025-09-18T15:25:46 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40645",
"html_url": "https://github.com/huggingface/transformers/pull/40645",
"diff_url": "https://github.com/huggingface/transformers/pull/40645.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40645.patch",
"merged_at": "2025-09-18T15:25:46"
} | # What does this PR do?
Reverts https://github.com/huggingface/transformers/pull/40436 and adds comments to avoid regression
cc @remi-or @yonigozlan | {
"login": "qubvel",
"id": 31920396,
"node_id": "MDQ6VXNlcjMxOTIwMzk2",
"avatar_url": "https://avatars.githubusercontent.com/u/31920396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qubvel",
"html_url": "https://github.com/qubvel",
"followers_url": "https://api.github.com/users/qubvel/followers",
"following_url": "https://api.github.com/users/qubvel/following{/other_user}",
"gists_url": "https://api.github.com/users/qubvel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/qubvel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qubvel/subscriptions",
"organizations_url": "https://api.github.com/users/qubvel/orgs",
"repos_url": "https://api.github.com/users/qubvel/repos",
"events_url": "https://api.github.com/users/qubvel/events{/privacy}",
"received_events_url": "https://api.github.com/users/qubvel/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40645/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40645/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40644 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40644/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40644/comments | https://api.github.com/repos/huggingface/transformers/issues/40644/events | https://github.com/huggingface/transformers/issues/40644 | 3,378,990,971 | I_kwDOCUB6oc7JZ097 | 40,644 | `BlenderbotForConditionalGeneration` errors out with `list index out of range` | {
"login": "ariG23498",
"id": 36856589,
"node_id": "MDQ6VXNlcjM2ODU2NTg5",
"avatar_url": "https://avatars.githubusercontent.com/u/36856589?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ariG23498",
"html_url": "https://github.com/ariG23498",
"followers_url": "https://api.github.com/users/ariG23498/followers",
"following_url": "https://api.github.com/users/ariG23498/following{/other_user}",
"gists_url": "https://api.github.com/users/ariG23498/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ariG23498/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ariG23498/subscriptions",
"organizations_url": "https://api.github.com/users/ariG23498/orgs",
"repos_url": "https://api.github.com/users/ariG23498/repos",
"events_url": "https://api.github.com/users/ariG23498/events{/privacy}",
"received_events_url": "https://api.github.com/users/ariG23498/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-03T09:03:33 | 2025-09-30T20:27:49 | 2025-09-12T16:24:23 | CONTRIBUTOR | null | null | null | null | Running the following:
```py
from transformers import AutoTokenizer, BlenderbotForConditionalGeneration
mname = "facebook/blenderbot-400M-distill"
model = BlenderbotForConditionalGeneration.from_pretrained(mname)
tokenizer = AutoTokenizer.from_pretrained(mname)
UTTERANCE = "My friends are cool but they eat too many carbs."
print("Human: ", UTTERANCE)
inputs = tokenizer([UTTERANCE], return_tensors="pt")
reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(reply_ids, skip_special_tokens=True)[0])
REPLY = "I'm not sure"
print("Human: ", REPLY)
NEXT_UTTERANCE = (
"My friends are cool but they eat too many carbs.</s> <s>That's unfortunate. "
"Are they trying to lose weight or are they just trying to be healthier?</s> "
"<s> I'm not sure."
)
inputs = tokenizer([NEXT_UTTERANCE], return_tensors="pt")
next_reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])
```
Fails with
```
IndexError: list index out of range
```
[Colab notebook](https://colab.research.google.com/gist/ariG23498/063c2888c41afebb71ca614278161445/scratchpad.ipynb)
Should work as expected. The code has been taken from the [official docs](https://huggingface.co/docs/transformers/en/model_doc/blenderbot#transformers.BlenderbotForConditionalGeneration) | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40644/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40644/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40643 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40643/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40643/comments | https://api.github.com/repos/huggingface/transformers/issues/40643/events | https://github.com/huggingface/transformers/pull/40643 | 3,378,917,412 | PR_kwDOCUB6oc6mmhuJ | 40,643 | Skip `test_prompt_lookup_decoding_matches_greedy_search` for `voxtral` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T08:43:24 | 2025-09-03T11:45:30 | 2025-09-03T11:45:29 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40643",
"html_url": "https://github.com/huggingface/transformers/pull/40643",
"diff_url": "https://github.com/huggingface/transformers/pull/40643.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40643.patch",
"merged_at": "2025-09-03T11:45:29"
} | # What does this PR do?
> tests/models/voxtral/test_modeling_voxtral.py::VoxtralForConditionalGenerationModelTest::test_prompt_lookup_decoding_matches_greedy_search
is flaky
https://app.circleci.com/pipelines/github/huggingface/transformers/144445/workflows/829f1347-398e-493f-a531-36c3178da153/jobs/1909491
```bash
@can_return_tuple
@auto_docstring
def forward(
self,
input_ids: Optional[torch.LongTensor] = None,
input_features: Optional[torch.FloatTensor] = None,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_values: Optional[Cache] = None,
inputs_embeds: Optional[torch.FloatTensor] = None,
labels: Optional[torch.LongTensor] = None,
use_cache: Optional[bool] = None,
cache_position: Optional[torch.LongTensor] = None,
logits_to_keep: Union[int, torch.Tensor] = 0,
**kwargs: Unpack[TransformersKwargs],
) -> CausalLMOutputWithPast:
if inputs_embeds is None:
inputs_embeds = self.get_input_embeddings()(input_ids)
if input_features is not None:
audio_embeds = self.get_audio_embeds(input_features)
# replace text-audio token placeholders with audio embeddings
audio_token_mask = input_ids == self.config.audio_token_id
> inputs_embeds[audio_token_mask] = audio_embeds
E RuntimeError: shape mismatch: value tensor of shape [30, 32] cannot be broadcast to indexing result of shape [32, 32]
/usr/local/lib/python3.9/site-packages/transformers/models/voxtral/modeling_voxtral.py:512: RuntimeError``` | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40643/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40643/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40642 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40642/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40642/comments | https://api.github.com/repos/huggingface/transformers/issues/40642/events | https://github.com/huggingface/transformers/issues/40642 | 3,378,794,951 | I_kwDOCUB6oc7JZFHH | 40,642 | Llama-4-Scout-17B-16E-Instruct model perplexity anomaly when transformers==4.55.1 | {
"login": "kewang-xlnx",
"id": 73578509,
"node_id": "MDQ6VXNlcjczNTc4NTA5",
"avatar_url": "https://avatars.githubusercontent.com/u/73578509?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kewang-xlnx",
"html_url": "https://github.com/kewang-xlnx",
"followers_url": "https://api.github.com/users/kewang-xlnx/followers",
"following_url": "https://api.github.com/users/kewang-xlnx/following{/other_user}",
"gists_url": "https://api.github.com/users/kewang-xlnx/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kewang-xlnx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kewang-xlnx/subscriptions",
"organizations_url": "https://api.github.com/users/kewang-xlnx/orgs",
"repos_url": "https://api.github.com/users/kewang-xlnx/repos",
"events_url": "https://api.github.com/users/kewang-xlnx/events{/privacy}",
"received_events_url": "https://api.github.com/users/kewang-xlnx/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | closed | false | null | [] | null | [] | 2025-09-03T08:06:52 | 2025-09-22T03:12:26 | 2025-09-22T03:12:26 | NONE | null | null | null | null | ### System Info
The hardware environment and other major software packages used are as follows.
```
gpu mi300
rocm 6.10.5
python 3.12.11
numpy 2.1.3
tokenizers 0.21.4
torch 2.7.1+rocm6.3
torchaudio 2.7.1+rocm6.3
torchvision 0.22.1+rocm6.3
triton 3.2.0+gite5begpu
```
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] 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
1. Loading the model
```
model = Llama4ForConditionalGeneration.from_pretrained(
ckpt_path="meta-llama/Llama-4-Scout-17B-16E-Instruct",
device_map="auto",
torch_dtype="auto"
)
```
2. Using llm_eval library to do the evaluation
### Expected behavior
When transformers==4.53.0, the harmness perplexity of `Llama-4-Scout-17B-16E-Instruct` was as below.
```
| Tasks |Version|Filter|n-shot| Metric | |Value | |Stderr|
|--------|------:|------|-----:|---------------|---|-----:|---|------|
|wikitext| 2|none | 0|bits_per_byte |_ |0.6006|_ | N/A|
| | |none | 0|byte_perplexity|_ |1.5164|_ | N/A|
| | |none | 0|word_perplexity|_ |9.2650|_ | N/A|
```
After transformers version upgrade to 4.55.1, the perplexity:
```
| Tasks |Version|Filter|n-shot| Metric | | Value | |Stderr|
|--------|------:|------|-----:|---------------|---|------:|---|------|
|wikitext| 2|none | 0|bits_per_byte |_ | 1.2306|_ | N/A|
| | |none | 0|byte_perplexity|_ | 2.3466|_ | N/A|
| | |none | 0|word_perplexity|_ |95.7053|_ | N/A|
```
All accuracy metrics have deteriorated. | {
"login": "kewang-xlnx",
"id": 73578509,
"node_id": "MDQ6VXNlcjczNTc4NTA5",
"avatar_url": "https://avatars.githubusercontent.com/u/73578509?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kewang-xlnx",
"html_url": "https://github.com/kewang-xlnx",
"followers_url": "https://api.github.com/users/kewang-xlnx/followers",
"following_url": "https://api.github.com/users/kewang-xlnx/following{/other_user}",
"gists_url": "https://api.github.com/users/kewang-xlnx/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kewang-xlnx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kewang-xlnx/subscriptions",
"organizations_url": "https://api.github.com/users/kewang-xlnx/orgs",
"repos_url": "https://api.github.com/users/kewang-xlnx/repos",
"events_url": "https://api.github.com/users/kewang-xlnx/events{/privacy}",
"received_events_url": "https://api.github.com/users/kewang-xlnx/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40642/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40642/timeline | null | completed | {
"total": 0,
"completed": 0,
"percent_completed": 0
} | {
"blocked_by": 0,
"total_blocked_by": 0,
"blocking": 0,
"total_blocking": 0
} | false | true |
https://api.github.com/repos/huggingface/transformers/issues/40641 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40641/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40641/comments | https://api.github.com/repos/huggingface/transformers/issues/40641/events | https://github.com/huggingface/transformers/pull/40641 | 3,378,667,005 | PR_kwDOCUB6oc6mluT_ | 40,641 | add DeepseekV3ForTokenClassification | {
"login": "bzantium",
"id": 19511788,
"node_id": "MDQ6VXNlcjE5NTExNzg4",
"avatar_url": "https://avatars.githubusercontent.com/u/19511788?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bzantium",
"html_url": "https://github.com/bzantium",
"followers_url": "https://api.github.com/users/bzantium/followers",
"following_url": "https://api.github.com/users/bzantium/following{/other_user}",
"gists_url": "https://api.github.com/users/bzantium/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bzantium/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bzantium/subscriptions",
"organizations_url": "https://api.github.com/users/bzantium/orgs",
"repos_url": "https://api.github.com/users/bzantium/repos",
"events_url": "https://api.github.com/users/bzantium/events{/privacy}",
"received_events_url": "https://api.github.com/users/bzantium/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-03T07:27:11 | 2025-09-04T01:50:17 | 2025-09-03T12:30:09 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40641",
"html_url": "https://github.com/huggingface/transformers/pull/40641",
"diff_url": "https://github.com/huggingface/transformers/pull/40641.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40641.patch",
"merged_at": "2025-09-03T12:30:09"
} | # What does this PR do?
Add DeepseekV3ForTokenClassificaiton for using as a value model.
Fixes #40639
## 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?
- [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?
@ArthurZucker | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40641/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40641/timeline | null | null | null | null | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.