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/40640 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40640/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40640/comments | https://api.github.com/repos/huggingface/transformers/issues/40640/events | https://github.com/huggingface/transformers/pull/40640 | 3,378,629,556 | PR_kwDOCUB6oc6mln9q | 40,640 | Resume training by trained samples to avoid elastic job loss or over-reading of data. | {
"login": "zhengchenyu",
"id": 10381583,
"node_id": "MDQ6VXNlcjEwMzgxNTgz",
"avatar_url": "https://avatars.githubusercontent.com/u/10381583?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zhengchenyu",
"html_url": "https://github.com/zhengchenyu",
"followers_url": "https://api.github.com/users/zhengchenyu/followers",
"following_url": "https://api.github.com/users/zhengchenyu/following{/other_user}",
"gists_url": "https://api.github.com/users/zhengchenyu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zhengchenyu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zhengchenyu/subscriptions",
"organizations_url": "https://api.github.com/users/zhengchenyu/orgs",
"repos_url": "https://api.github.com/users/zhengchenyu/repos",
"events_url": "https://api.github.com/users/zhengchenyu/events{/privacy}",
"received_events_url": "https://api.github.com/users/zhengchenyu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-03T07:16:33 | 2025-10-24T08:23:17 | null | NONE | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40640",
"html_url": "https://github.com/huggingface/transformers/pull/40640",
"diff_url": "https://github.com/huggingface/transformers/pull/40640.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40640.patch",
"merged_at": null
} | # What does this PR do?
Resume training by trained samples. Then we can avoid reading more or less data due to changes in the number of workers.
Fixes: #40245
## 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.
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40640/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/40640/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40639 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40639/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40639/comments | https://api.github.com/repos/huggingface/transformers/issues/40639/events | https://github.com/huggingface/transformers/issues/40639 | 3,378,568,749 | I_kwDOCUB6oc7JYN4t | 40,639 | Add DeepseekV3ForTokenClassificaiton for using as a value model | {
"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
} | [
{
"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"
}
] | closed | false | null | [] | null | [] | 2025-09-03T06:59:08 | 2025-09-03T12:30:10 | 2025-09-03T12:30:10 | CONTRIBUTOR | null | null | null | null | ### Feature request
Add DeepseekV3ForTokenClassificaiton for using as a value model.
### Motivation
In verl, they use AutoModelForTokenClassification for loading value model.
https://github.com/volcengine/verl/blob/2d6c6dbb39bf846d4ebf98c89fc5b4f49c37dd3d/verl/utils/model.py#L627
so I want to add this for using transformers directly.
### Your contribution
Implement DeepseekV3ForTokenClassificaiton | {
"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/40639/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/40639/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/40638 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40638/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40638/comments | https://api.github.com/repos/huggingface/transformers/issues/40638/events | https://github.com/huggingface/transformers/pull/40638 | 3,378,500,714 | PR_kwDOCUB6oc6mlPQH | 40,638 | fix pipeline dtype | {
"login": "jiqing-feng",
"id": 107918818,
"node_id": "U_kgDOBm614g",
"avatar_url": "https://avatars.githubusercontent.com/u/107918818?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jiqing-feng",
"html_url": "https://github.com/jiqing-feng",
"followers_url": "https://api.github.com/users/jiqing-feng/followers",
"following_url": "https://api.github.com/users/jiqing-feng/following{/other_user}",
"gists_url": "https://api.github.com/users/jiqing-feng/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jiqing-feng/subscriptions",
"organizations_url": "https://api.github.com/users/jiqing-feng/orgs",
"repos_url": "https://api.github.com/users/jiqing-feng/repos",
"events_url": "https://api.github.com/users/jiqing-feng/events{/privacy}",
"received_events_url": "https://api.github.com/users/jiqing-feng/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-03T06:34:31 | 2025-09-03T14:05:48 | 2025-09-03T14:05:48 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40638",
"html_url": "https://github.com/huggingface/transformers/pull/40638",
"diff_url": "https://github.com/huggingface/transformers/pull/40638.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40638.patch",
"merged_at": "2025-09-03T14:05:48"
} | The dtype in the pipeline does not work if I don't pass device_map. To reproduce the error:
```python
from transformers import pipeline
import torch
image_to_text = pipeline(
"image-feature-extraction",
model="google/vit-base-patch16-224-in21k",
dtype=torch.bfloat16,
)
print(image_to_text.model.dtype)
```
output before this PR
```
torch.float32
```
output after this PR
```
torch.bfloat16
```
Hi @SunMarc . Please review this PR. Thanks! | {
"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/40638/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/40638/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40637 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40637/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40637/comments | https://api.github.com/repos/huggingface/transformers/issues/40637/events | https://github.com/huggingface/transformers/pull/40637 | 3,378,286,469 | PR_kwDOCUB6oc6mklNA | 40,637 | Add openPangu-Embedded model | {
"login": "yzy1996",
"id": 20658350,
"node_id": "MDQ6VXNlcjIwNjU4MzUw",
"avatar_url": "https://avatars.githubusercontent.com/u/20658350?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yzy1996",
"html_url": "https://github.com/yzy1996",
"followers_url": "https://api.github.com/users/yzy1996/followers",
"following_url": "https://api.github.com/users/yzy1996/following{/other_user}",
"gists_url": "https://api.github.com/users/yzy1996/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yzy1996/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yzy1996/subscriptions",
"organizations_url": "https://api.github.com/users/yzy1996/orgs",
"repos_url": "https://api.github.com/users/yzy1996/repos",
"events_url": "https://api.github.com/users/yzy1996/events{/privacy}",
"received_events_url": "https://api.github.com/users/yzy1996/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-03T04:47:07 | 2025-09-24T02:02:28 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40637",
"html_url": "https://github.com/huggingface/transformers/pull/40637",
"diff_url": "https://github.com/huggingface/transformers/pull/40637.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40637.patch",
"merged_at": null
} | # What does this PR do?
This PR introduces inference support for the openPangu-Embedded model. By integrating the inference implementation directly into the Transformers library, we aim to ensure seamless compatibility and enable continuous updates alongside future open-source releases.
This implementation requires torch_npu as a dependency. I'd like to confirm whether introducing this NPU-specific dependency aligns with the community's guidelines and acceptance criteria for the Transformers library. Any guidance on this matter would be greatly appreciated.
I welcome any feedback on potential improvements or additional changes that would enhance this implementation. Please feel free to share your suggestions!
## 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. @ArthurZucker
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40637/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/40637/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40636 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40636/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40636/comments | https://api.github.com/repos/huggingface/transformers/issues/40636/events | https://github.com/huggingface/transformers/pull/40636 | 3,378,172,978 | PR_kwDOCUB6oc6mkOW5 | 40,636 | Even more test data cached | {
"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-03T03:36:55 | 2025-09-04T05:07:55 | 2025-09-03T21:20:37 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40636",
"html_url": "https://github.com/huggingface/transformers/pull/40636",
"diff_url": "https://github.com/huggingface/transformers/pull/40636.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40636.patch",
"merged_at": "2025-09-03T21:20:37"
} | # What does this PR do?
Even more test data cached | {
"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/40636/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/40636/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40635 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40635/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40635/comments | https://api.github.com/repos/huggingface/transformers/issues/40635/events | https://github.com/huggingface/transformers/issues/40635 | 3,377,939,639 | I_kwDOCUB6oc7JV0S3 | 40,635 | Safetensors files for long-t5-tglobal models fail to load correctly | {
"login": "pszemraj",
"id": 74869040,
"node_id": "MDQ6VXNlcjc0ODY5MDQw",
"avatar_url": "https://avatars.githubusercontent.com/u/74869040?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pszemraj",
"html_url": "https://github.com/pszemraj",
"followers_url": "https://api.github.com/users/pszemraj/followers",
"following_url": "https://api.github.com/users/pszemraj/following{/other_user}",
"gists_url": "https://api.github.com/users/pszemraj/gists{/gist_id}",
"starred_url": "https://api.github.com/users/pszemraj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pszemraj/subscriptions",
"organizations_url": "https://api.github.com/users/pszemraj/orgs",
"repos_url": "https://api.github.com/users/pszemraj/repos",
"events_url": "https://api.github.com/users/pszemraj/events{/privacy}",
"received_events_url": "https://api.github.com/users/pszemraj/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 1990918270,
"node_id": "MDU6TGFiZWwxOTkwOTE4Mjcw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Good%20First%20Issue",
"name": "Good First Issue",
"color": "bbf794",
"default": false,
"description": ""
},
{
"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-03T01:07:44 | 2025-10-29T12:15:51 | 2025-09-24T12:13:20 | CONTRIBUTOR | null | null | null | null | ### System Info
- `transformers` version: 4.55.4
- Platform: Linux-6.1.123+-x86_64-with-glibc2.35
- 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+cu126 (CUDA)
- Tensorflow version (GPU?): 2.19.0 (True)
- Flax version (CPU?/GPU?/TPU?): 0.10.6 (gpu)
- Jax version: 0.5.3
- JaxLib version: 0.5.3
- Using distributed or parallel set-up in script?: No
- Using GPU in script?: No
- GPU type: NVIDIA L4
### Who can help?
@ArthurZucker @younesbelkada @amyeroberts (model loading)
### Information
- [x] The official example scripts
- [x] My own modified scripts
### Tasks
- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
## desc/info
> Original discussion: https://huggingface.co/pszemraj/long-t5-tglobal-base-16384-book-summary/discussions/22
After several back-and-forth investigations and attempts at solutions, there is an issue with loading and running inference with long-t5 models in transformers that once worked. The "simplest" way to characterize this issue today is that weights are unable to be loaded from `.safetensors` files, causing garbage output.
## repro
Run inference with any long-t5 model in safetensors format
```py
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
# This uses safetensors by default and produces incorrect behavior
model_id = "pszemraj/long-t5-tglobal-base-sci-simplify"
model = AutoModelForSeq2SeqLM.from_pretrained(
model_id,
)
tokenizer = AutoTokenizer.from_pretrained(
model_id,
)
# Test generation - model produces garbage output
text = "Summarize: The quick brown fox jumps over the lazy dog. " * 50
inputs = tokenizer(text, return_tensors="pt", max_length=512, truncation=True)
outputs = model.generate(**inputs, max_length=150)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# thea: and to of
# Output is corrupted/nonsensical
```
worth calling out that when the model is loaded it will display a warning telling you it will not use some weights:
```
Some weights of LongT5ForConditionalGeneration were not initialized from the model checkpoint at test_model and are newly initialized: ['decoder.embed_tokens.weight', 'encoder.embed_tokens.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
```
> ![NOTE]
> I've put replication and expected functionality [in this colab notebook](https://colab.research.google.com/gist/pszemraj/cb256b49c333f4745208faceeb649ebf/scratchpad.ipynb)
### Expected behavior
The model should load correctly and produce coherent summaries. This works when explicitly loading from PyTorch checkpoint:
```py
model = AutoModelForSeq2SeqLM.from_pretrained(
model_id,
use_safetensors=False # Force PyTorch checkpoint (works)
)
```
In this case:
```py
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
# This uses safetensors by default and produces incorrect behavior
model_id = "pszemraj/long-t5-tglobal-base-sci-simplify"
model = AutoModelForSeq2SeqLM.from_pretrained(
model_id,
use_safetensors=False # Force PyTorch checkpoint (works)
)
tokenizer = AutoTokenizer.from_pretrained(
model_id,
)
text = "Summarize: The quick brown fox jumps over the lazy dog. " * 50
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=150,)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# SUMMARZE: The Quick Brown Fox Jumps Over The Lazy Dog.
# Imperfect (model size/quality) but sensical
```
In some cases for later-created models (ex: [this checkpoint](https://huggingface.co/pszemraj/long-t5-tglobal-base-synthsumm_direct)) the model does not have a `.bin`, unsure if it's dead in the water, or what. | {
"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/40635/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/40635/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/40634 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40634/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40634/comments | https://api.github.com/repos/huggingface/transformers/issues/40634/events | https://github.com/huggingface/transformers/pull/40634 | 3,377,932,233 | PR_kwDOCUB6oc6mjfH- | 40,634 | Enable ruff on benchmark and scripts | {
"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-03T01:03:02 | 2025-09-10T09:53:28 | 2025-09-10T09:38:06 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40634",
"html_url": "https://github.com/huggingface/transformers/pull/40634",
"diff_url": "https://github.com/huggingface/transformers/pull/40634.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40634.patch",
"merged_at": "2025-09-10T09:38:06"
} | # What does this PR do?
Enable ruff on benchmark and scripts | {
"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/40634/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/40634/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40633 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40633/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40633/comments | https://api.github.com/repos/huggingface/transformers/issues/40633/events | https://github.com/huggingface/transformers/pull/40633 | 3,377,644,696 | PR_kwDOCUB6oc6milmF | 40,633 | Add support for Custom Accelerate Instance in Trainer | {
"login": "Flakes342",
"id": 60060568,
"node_id": "MDQ6VXNlcjYwMDYwNTY4",
"avatar_url": "https://avatars.githubusercontent.com/u/60060568?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Flakes342",
"html_url": "https://github.com/Flakes342",
"followers_url": "https://api.github.com/users/Flakes342/followers",
"following_url": "https://api.github.com/users/Flakes342/following{/other_user}",
"gists_url": "https://api.github.com/users/Flakes342/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Flakes342/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Flakes342/subscriptions",
"organizations_url": "https://api.github.com/users/Flakes342/orgs",
"repos_url": "https://api.github.com/users/Flakes342/repos",
"events_url": "https://api.github.com/users/Flakes342/events{/privacy}",
"received_events_url": "https://api.github.com/users/Flakes342/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-02T22:16:06 | 2025-09-03T23:26:30 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40633",
"html_url": "https://github.com/huggingface/transformers/pull/40633",
"diff_url": "https://github.com/huggingface/transformers/pull/40633.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40633.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 #40616
This PR adds the ability to pass a **custom Accelerator instance** to the Trainer constructor, giving users fine-grained control over distributed training configurations while maintaining all existing Trainer functionality.
## 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. #40616
- [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?
## Description
Currently, users who need advanced distributed training configurations (custom DeepSpeed settings, specific FSDP configurations, etc.) have limited options to customize the _Accelerator_ used by Trainer. The existing approach forces users to either modify TrainingArguments which doesn't expose all accelerate options to them or use accelerator_config which is less intuitive and limited.
This change allows users to create and configure their own Accelerator instance with full control over:
- DeepSpeed configurations with custom plugins
- FSDP settings and policies
- Tensor parallelism configurations
- Custom dataloader behaviors
- Advanced gradient accumulation strategies
- Experiment tracking and logging setup
## Changes
- Modified `Trainer` initialization to add an optional `accelerator` parameter
- Added `postprocess_accelerator` method: Handles postprocessing for user-provided accelerators - similar to current `create_accelerator_and_postprocess` method
- Refactored accelerator initialization: Clean separation between creation and postprocessing logic
## Example
Adding a simple example of how custom accelerator functionality can be used in trainer:
```
from accelerate import Accelerator
from accelerate.utils import DeepSpeedPlugin
# Custom DeepSpeed configuration
deepspeed_plugin = DeepSpeedPlugin(
zero_stage=3,
offload_optimizer_device="cpu",
offload_param_device="cpu",
zero3_init_flag=True,
zero3_save_16bit_model=True
)
accelerator = Accelerator(deepspeed_plugin=deepspeed_plugin)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=dataset,
accelerator=accelerator
)
```
## Testing
Added comprehensive tests to _trainer/test_trainer.py_ covering:
- Basic custom accelerator functionality
- Backward compatibility (no accelerator parameter)
- Postprocessing attribute setup
- Settings preservation
- Gather function configuration
- End-to-end training integration
Please let me know if the tests need to be written in some other way. Also, please review and provide your comments and I'd be happy to incorporate any corrections/suggestions.
## Who can review? @Rocketknight1, @SunMarc, @anyone :)
<!-- 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/40633/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/40633/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40632 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40632/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40632/comments | https://api.github.com/repos/huggingface/transformers/issues/40632/events | https://github.com/huggingface/transformers/pull/40632 | 3,377,365,139 | PR_kwDOCUB6oc6mhqNr | 40,632 | Making compute_loss_func always take priority in Trainer | {
"login": "Flakes342",
"id": 60060568,
"node_id": "MDQ6VXNlcjYwMDYwNTY4",
"avatar_url": "https://avatars.githubusercontent.com/u/60060568?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Flakes342",
"html_url": "https://github.com/Flakes342",
"followers_url": "https://api.github.com/users/Flakes342/followers",
"following_url": "https://api.github.com/users/Flakes342/following{/other_user}",
"gists_url": "https://api.github.com/users/Flakes342/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Flakes342/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Flakes342/subscriptions",
"organizations_url": "https://api.github.com/users/Flakes342/orgs",
"repos_url": "https://api.github.com/users/Flakes342/repos",
"events_url": "https://api.github.com/users/Flakes342/events{/privacy}",
"received_events_url": "https://api.github.com/users/Flakes342/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-02T20:15:55 | 2025-09-22T09:48:18 | 2025-09-22T09:47:35 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40632",
"html_url": "https://github.com/huggingface/transformers/pull/40632",
"diff_url": "https://github.com/huggingface/transformers/pull/40632.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40632.patch",
"merged_at": "2025-09-22T09:47:35"
} | # 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 #40601
Currently, Trainer only uses compute_loss_func when labels are provided. This leads to unintuitive behavior:
1. User-defined losses are silently ignored if labels=None
2. Advanced training setups (unsupervised, contrastive, RLHF) cannot rely on custom losses consistently
3. Debugging is difficult since the function is skipped without notice
With this PR, now:
1. `compute_loss_func` always takes priority, regardless of whether labels are passed
2. If labels=None, the function is still called with labels=None
3. Adds a temporary warning to highlight the change
## 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. #40601
- [ ] 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": "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/40632/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/40632/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40631 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40631/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40631/comments | https://api.github.com/repos/huggingface/transformers/issues/40631/events | https://github.com/huggingface/transformers/pull/40631 | 3,377,359,266 | PR_kwDOCUB6oc6mhpAr | 40,631 | [docs] CPU install | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-09-02T20:13:38 | 2025-09-09T19:51:58 | 2025-09-09T19:51:54 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40631",
"html_url": "https://github.com/huggingface/transformers/pull/40631",
"diff_url": "https://github.com/huggingface/transformers/pull/40631.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40631.patch",
"merged_at": "2025-09-09T19:51:54"
} | Fixes #39780 for a true CPU-only install and replaces `pip` with `uv` | {
"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/40631/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/40631/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40630 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40630/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40630/comments | https://api.github.com/repos/huggingface/transformers/issues/40630/events | https://github.com/huggingface/transformers/pull/40630 | 3,376,930,313 | PR_kwDOCUB6oc6mgPWF | 40,630 | [RoPE] run RoPE tests when the model uses RoPE | {
"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-02T17:31:41 | 2025-09-09T16:14:25 | 2025-09-09T16:11:03 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40630",
"html_url": "https://github.com/huggingface/transformers/pull/40630",
"diff_url": "https://github.com/huggingface/transformers/pull/40630.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40630.patch",
"merged_at": "2025-09-09T16:11:02"
} | # What does this PR do?
The `CausalLMModelTest` mixin has RoPE tests, but it requires setting `rotary_embedding_layer` in each model tester. In most models, it was unset, so they were not running RoPE-related tests -- exposing ourselves to easily preventable issues like https://github.com/huggingface/transformers/issues/40461 😱
This PR:
- Removes `rotary_embedding_layer` from the `CausalLMModelTest` mixin.
- Automates detection of RoPE-compatible models in `CausalLMModelTest`, and uses it to enable RoPE tests on each model. No more manual errors 🤗
- Adds test skips where needed. | {
"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/40630/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/40630/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40629 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40629/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40629/comments | https://api.github.com/repos/huggingface/transformers/issues/40629/events | https://github.com/huggingface/transformers/pull/40629 | 3,376,840,673 | PR_kwDOCUB6oc6mf8HA | 40,629 | Remove random flag | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-09-02T17:03:15 | 2025-09-02T17:12:42 | 2025-09-02T17:10:02 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40629",
"html_url": "https://github.com/huggingface/transformers/pull/40629",
"diff_url": "https://github.com/huggingface/transformers/pull/40629.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40629.patch",
"merged_at": "2025-09-02T17:10:02"
} | # What does this PR do?
Checked offline with other team members. Its not used in any big downstream library | {
"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/40629/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/40629/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40628 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40628/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40628/comments | https://api.github.com/repos/huggingface/transformers/issues/40628/events | https://github.com/huggingface/transformers/pull/40628 | 3,376,616,505 | PR_kwDOCUB6oc6mfLij | 40,628 | Fixing the call to kernelize | {
"login": "MekkCyber",
"id": 93391238,
"node_id": "U_kgDOBZEJhg",
"avatar_url": "https://avatars.githubusercontent.com/u/93391238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MekkCyber",
"html_url": "https://github.com/MekkCyber",
"followers_url": "https://api.github.com/users/MekkCyber/followers",
"following_url": "https://api.github.com/users/MekkCyber/following{/other_user}",
"gists_url": "https://api.github.com/users/MekkCyber/gists{/gist_id}",
"starred_url": "https://api.github.com/users/MekkCyber/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MekkCyber/subscriptions",
"organizations_url": "https://api.github.com/users/MekkCyber/orgs",
"repos_url": "https://api.github.com/users/MekkCyber/repos",
"events_url": "https://api.github.com/users/MekkCyber/events{/privacy}",
"received_events_url": "https://api.github.com/users/MekkCyber/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 8439734066,
"node_id": "LA_kwDOCUB6oc8AAAAB9wwfMg",
"url": "https://api.github.com/repos/huggingface/transformers/labels/kernels",
"name": "kernels",
"color": "4C3716",
"default": false,
"description": ""
}
] | closed | false | null | [] | null | [] | 2025-09-02T15:55:53 | 2025-09-16T08:50:56 | 2025-09-16T08:50:54 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40628",
"html_url": "https://github.com/huggingface/transformers/pull/40628",
"diff_url": "https://github.com/huggingface/transformers/pull/40628.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40628.patch",
"merged_at": "2025-09-16T08:50:54"
} | # What does this PR do?
passing the mode to kernelize to fix : https://github.com/huggingface/transformers/issues/40459 | {
"login": "MekkCyber",
"id": 93391238,
"node_id": "U_kgDOBZEJhg",
"avatar_url": "https://avatars.githubusercontent.com/u/93391238?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MekkCyber",
"html_url": "https://github.com/MekkCyber",
"followers_url": "https://api.github.com/users/MekkCyber/followers",
"following_url": "https://api.github.com/users/MekkCyber/following{/other_user}",
"gists_url": "https://api.github.com/users/MekkCyber/gists{/gist_id}",
"starred_url": "https://api.github.com/users/MekkCyber/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MekkCyber/subscriptions",
"organizations_url": "https://api.github.com/users/MekkCyber/orgs",
"repos_url": "https://api.github.com/users/MekkCyber/repos",
"events_url": "https://api.github.com/users/MekkCyber/events{/privacy}",
"received_events_url": "https://api.github.com/users/MekkCyber/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40628/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/40628/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40627 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40627/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40627/comments | https://api.github.com/repos/huggingface/transformers/issues/40627/events | https://github.com/huggingface/transformers/pull/40627 | 3,376,535,494 | PR_kwDOCUB6oc6me6Gk | 40,627 | Fix more typos | {
"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-02T15:34:11 | 2025-09-12T10:28:37 | 2025-09-08T16:05:40 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40627",
"html_url": "https://github.com/huggingface/transformers/pull/40627",
"diff_url": "https://github.com/huggingface/transformers/pull/40627.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40627.patch",
"merged_at": "2025-09-08T16:05:40"
} | # What does this PR do?
Fix more typos.
## Before submitting
- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
| {
"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/40627/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/40627/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40626 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40626/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40626/comments | https://api.github.com/repos/huggingface/transformers/issues/40626/events | https://github.com/huggingface/transformers/pull/40626 | 3,376,515,645 | PR_kwDOCUB6oc6me120 | 40,626 | Making compute_loss_func always take priority in Trainer | {
"login": "Flakes342",
"id": 60060568,
"node_id": "MDQ6VXNlcjYwMDYwNTY4",
"avatar_url": "https://avatars.githubusercontent.com/u/60060568?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Flakes342",
"html_url": "https://github.com/Flakes342",
"followers_url": "https://api.github.com/users/Flakes342/followers",
"following_url": "https://api.github.com/users/Flakes342/following{/other_user}",
"gists_url": "https://api.github.com/users/Flakes342/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Flakes342/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Flakes342/subscriptions",
"organizations_url": "https://api.github.com/users/Flakes342/orgs",
"repos_url": "https://api.github.com/users/Flakes342/repos",
"events_url": "https://api.github.com/users/Flakes342/events{/privacy}",
"received_events_url": "https://api.github.com/users/Flakes342/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-02T15:28:23 | 2025-09-02T20:08:36 | 2025-09-02T20:08:35 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40626",
"html_url": "https://github.com/huggingface/transformers/pull/40626",
"diff_url": "https://github.com/huggingface/transformers/pull/40626.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40626.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 #40601
Currently, Trainer only uses compute_loss_func when labels are provided. This leads to unintuitive behavior:
1. User-defined losses are silently ignored if labels=None
2. Advanced training setups (unsupervised, contrastive, RLHF) cannot rely on custom losses consistently
3. Debugging is difficult since the function is skipped without notice
With this PR, now:
1. `compute_loss_func` always takes priority, regardless of whether labels are passed
2. If labels=None, the function is still called with labels=None
3. Adds a temporary warning to highlight the change
## 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. #40601
- [ ] 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": "Flakes342",
"id": 60060568,
"node_id": "MDQ6VXNlcjYwMDYwNTY4",
"avatar_url": "https://avatars.githubusercontent.com/u/60060568?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Flakes342",
"html_url": "https://github.com/Flakes342",
"followers_url": "https://api.github.com/users/Flakes342/followers",
"following_url": "https://api.github.com/users/Flakes342/following{/other_user}",
"gists_url": "https://api.github.com/users/Flakes342/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Flakes342/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Flakes342/subscriptions",
"organizations_url": "https://api.github.com/users/Flakes342/orgs",
"repos_url": "https://api.github.com/users/Flakes342/repos",
"events_url": "https://api.github.com/users/Flakes342/events{/privacy}",
"received_events_url": "https://api.github.com/users/Flakes342/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40626/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/40626/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40625 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40625/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40625/comments | https://api.github.com/repos/huggingface/transformers/issues/40625/events | https://github.com/huggingface/transformers/pull/40625 | 3,376,343,006 | PR_kwDOCUB6oc6meQTL | 40,625 | Use logical or for generate_masks_with_special_tokens_and_transfer_map in grounding dino models | {
"login": "lmarshall12",
"id": 215543211,
"node_id": "U_kgDODNjtqw",
"avatar_url": "https://avatars.githubusercontent.com/u/215543211?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lmarshall12",
"html_url": "https://github.com/lmarshall12",
"followers_url": "https://api.github.com/users/lmarshall12/followers",
"following_url": "https://api.github.com/users/lmarshall12/following{/other_user}",
"gists_url": "https://api.github.com/users/lmarshall12/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lmarshall12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmarshall12/subscriptions",
"organizations_url": "https://api.github.com/users/lmarshall12/orgs",
"repos_url": "https://api.github.com/users/lmarshall12/repos",
"events_url": "https://api.github.com/users/lmarshall12/events{/privacy}",
"received_events_url": "https://api.github.com/users/lmarshall12/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-02T14:43:43 | 2025-09-05T10:55:20 | 2025-09-05T10:55:20 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40625",
"html_url": "https://github.com/huggingface/transformers/pull/40625",
"diff_url": "https://github.com/huggingface/transformers/pull/40625.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40625.patch",
"merged_at": "2025-09-05T10:55:20"
} | # What does this PR do?
This pr changes the |= to use the torch.logical_or operator which is supported by other backends like Onnx and Tensorrt.
<!--
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": "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/40625/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/40625/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40624 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40624/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40624/comments | https://api.github.com/repos/huggingface/transformers/issues/40624/events | https://github.com/huggingface/transformers/pull/40624 | 3,376,247,974 | PR_kwDOCUB6oc6md77w | 40,624 | Add new model LFM2-VL | {
"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-02T14:17:28 | 2025-09-18T11:01:58 | 2025-09-18T11:01:58 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40624",
"html_url": "https://github.com/huggingface/transformers/pull/40624",
"diff_url": "https://github.com/huggingface/transformers/pull/40624.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40624.patch",
"merged_at": "2025-09-18T11:01:58"
} | # What does this PR do?
Same as https://github.com/huggingface/transformers/pull/40259 with updates. Can't push to the prev PR, prob the contributors didn't allow maintainer edits
I just did polishing on top of existing PR and added modular file. Should be ready for review | {
"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/40624/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/40624/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40623 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40623/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40623/comments | https://api.github.com/repos/huggingface/transformers/issues/40623/events | https://github.com/huggingface/transformers/pull/40623 | 3,376,011,237 | PR_kwDOCUB6oc6mdIr8 | 40,623 | Fix `too many requests` in `TestMistralCommonTokenizer` | {
"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-02T13:16:31 | 2025-09-03T03:05:05 | 2025-09-03T03:05:04 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40623",
"html_url": "https://github.com/huggingface/transformers/pull/40623",
"diff_url": "https://github.com/huggingface/transformers/pull/40623.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40623.patch",
"merged_at": "2025-09-03T03:05:04"
} | # What does this PR do?
We have for this test the following error (flaky)
> requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/models/hf-internal-testing/namespace-mistralai-repo_name-Mistral-Small-3.1-24B-Instruct-2503/tree/main
This PR just try to cache the tokenizers in a previous step before tests being run
.
`mistral_common` has a bug and make things a bit hard to handle in a clean way that I have to do a hack with `revision=None`.
https://app.circleci.com/pipelines/github/huggingface/transformers/144453/workflows/8e42765f-71d4-4733-9574-feb160ff8eda/jobs/1910963/parallel-runs/6/steps/6-113
| {
"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/40623/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/40623/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40622 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40622/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40622/comments | https://api.github.com/repos/huggingface/transformers/issues/40622/events | https://github.com/huggingface/transformers/pull/40622 | 3,375,939,879 | PR_kwDOCUB6oc6mc5Ke | 40,622 | Fix: PIL image load in Processing utils apply_chat_template | {
"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-02T12:59:26 | 2025-09-03T11:06:05 | 2025-09-03T11:06:05 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40622",
"html_url": "https://github.com/huggingface/transformers/pull/40622",
"diff_url": "https://github.com/huggingface/transformers/pull/40622.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40622.patch",
"merged_at": "2025-09-03T11:06:05"
} | # What does this PR do?
This PR #36682 introduced the batch size for images, everything is working correctly but the check for image existence don't support the PPIL images. The `len()` function could work with path or other things. So I converted it to check `is not None` it works for both PIL images and paths or URLs
Note: I made the same fix for videos also
Fixes #40603
## 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.
@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/40622/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/40622/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40621 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40621/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40621/comments | https://api.github.com/repos/huggingface/transformers/issues/40621/events | https://github.com/huggingface/transformers/issues/40621 | 3,375,632,692 | I_kwDOCUB6oc7JNBE0 | 40,621 | [Feature Proposal] Add GGUF support for Korean-specific LLM architectures | {
"login": "Kim-Ju-won",
"id": 81630351,
"node_id": "MDQ6VXNlcjgxNjMwMzUx",
"avatar_url": "https://avatars.githubusercontent.com/u/81630351?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Kim-Ju-won",
"html_url": "https://github.com/Kim-Ju-won",
"followers_url": "https://api.github.com/users/Kim-Ju-won/followers",
"following_url": "https://api.github.com/users/Kim-Ju-won/following{/other_user}",
"gists_url": "https://api.github.com/users/Kim-Ju-won/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Kim-Ju-won/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Kim-Ju-won/subscriptions",
"organizations_url": "https://api.github.com/users/Kim-Ju-won/orgs",
"repos_url": "https://api.github.com/users/Kim-Ju-won/repos",
"events_url": "https://api.github.com/users/Kim-Ju-won/events{/privacy}",
"received_events_url": "https://api.github.com/users/Kim-Ju-won/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-02T11:33:31 | 2025-09-02T13:23:15 | null | CONTRIBUTOR | null | null | null | null | ### Feature request
This is a feature proposal to extend GGUF support in `transformers` for several Korean-specific LLM architectures that have recently been released on the Hugging Face Hub.
Reference issue: [Community contribution: Adding GGUF support for more architectures](https://github.com/huggingface/transformers/issues/33260)
By supporting these models, we can help researchers and developers in the Korean NLP community more easily load, fine-tune, and deploy their models in the efficient GGUF format.
### Motivation
Over the past months, many Korean companies and research institutes (e.g. Naver, LG AI Research, Motif) have published their own LLMs on the Hugging Face Hub.
Currently, GGUF support in `transformers` is limited to a few well-known architectures (e.g. Llama, Mistral, Qwen2), and I understand that work is already ongoing for some others. However, several Korean-specific architectures are not yet covered by GGUF mappings or converters.
Adding GGUF support for these models would make them much more accessible for the Korean AI community, enabling efficient inference and experimentation on local machines, edge devices, and research environments. It would also align them with the broader ecosystem of GGML-compatible tools.
I believe this extension will help lower the barrier for adopting and sharing Korean LLMs across both academia and industry.
### Your contribution
I would like to contribute by extending GGUF support for the following Korean-specific architectures:
| Company | Model architecture | Model name |
|---------|--------------------|------------|
| Naver | `HyperCLOVAXForCausalLM` | naver-hyperclovax/HyperCLOVAX-SEED-Think-14B |
| LG AI Research | `Exaone4ForCausalLM` | LGAI-EXAONE/EXAONE-4.0-1.2B |
| Motif Technologies | `MotifForCausalLM` | Motif-Technologies/Motif-2.6B |
My plan is to follow the same process as outlined in the reference issue:
1. Update `GGUF_TENSOR_MAPPING` and `GGUF_CONFIG_MAPPING`
2. Implement dedicated `GGUFXXXConverter` classes for the new tokenizers
3. Write tests for loading/saving
I am happy to start working on this and would like to know if it is okay for me to proceed with opening a PR. | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40621/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/40621/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/40620 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40620/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40620/comments | https://api.github.com/repos/huggingface/transformers/issues/40620/events | https://github.com/huggingface/transformers/issues/40620 | 3,375,571,329 | I_kwDOCUB6oc7JMyGB | 40,620 | Function/Tool Calling with Streaming (transformers serve) Returns Empty Chunks for GPT-OSS-20B | {
"login": "Lanson2232",
"id": 46448882,
"node_id": "MDQ6VXNlcjQ2NDQ4ODgy",
"avatar_url": "https://avatars.githubusercontent.com/u/46448882?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Lanson2232",
"html_url": "https://github.com/Lanson2232",
"followers_url": "https://api.github.com/users/Lanson2232/followers",
"following_url": "https://api.github.com/users/Lanson2232/following{/other_user}",
"gists_url": "https://api.github.com/users/Lanson2232/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Lanson2232/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lanson2232/subscriptions",
"organizations_url": "https://api.github.com/users/Lanson2232/orgs",
"repos_url": "https://api.github.com/users/Lanson2232/repos",
"events_url": "https://api.github.com/users/Lanson2232/events{/privacy}",
"received_events_url": "https://api.github.com/users/Lanson2232/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-02T11:13:45 | 2025-10-14T13:50:06 | null | NONE | null | null | null | null | ### System Info
I'm trying to use function/tool calling with gpt-oss while streaming responses using transformers serve.
When I generate a normal chat completion without triggering functions, everything works fine.
However, if I try to get a function/tool call, the response contains only two empty chunks and nothing else.
Instead of the function call output, I only get the following two chunks:
````
data: {"id":"req_0","choices":[{"delta":{"role":"assistant"},"index":0}],"created":1756810823,"model":"openai/gpt-oss-20b@main","object":"chat.completion.chunk","system_fingerprint":""}
data: {"id":"req_0","choices":[{"delta":{},"finish_reason":"stop","index":0}],"created":1756810827,"model":"openai/gpt-oss-20b@main","object":"chat.completion.chunk","system_fingerprint":""}
````
+ Is this related to the Harmony chat template?
+ Normal text completions stream correctly; the issue only occurs when functions/tools are involved.
+ No error logs in the backend, just empty chunks.
Running on 1x RTX 5090 32GB
### 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
Steps to reproduce:
1. pip3 install git+https://github.com/huggingface/transformers
2. pip3 install "git+https://github.com/huggingface/transformers.git#egg=transformers[serving]"
3. transformers serve --device 0 --host 0.0.0.0 --port 8008
4. Curl Request
```curl
curl --location 'http://localhost:8008/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data '{
"stream": true,
"temperature": 0.8,
"model":"openai/gpt-oss-20b",
"messages": [
{
"role": "system",
"content": "You Are an helpful IVR-assistant"
},
{
"role": "user",
"content": "Connect me with Mr. X"
}
],
"tools":[
{
"type": "function",
"function": {
"name": "redirect_call_by_gender_and_lastname",
"description": "Routes the call to a person based on their last name and gender. Typical use case: “Connect me to Mr. Schmidt.”",
"parameters": {
"type": "object",
"properties": {
"lastname": {
"type": "string",
"description": "The lastname of the target"
},
"gender": {
"type": "string",
"enum": ["male", "female", "unknown"],
"description": "The gender, derived from the salutation: male for Herr, female for Frau, and unknown if no salutation is provided."
}
},
"required": ["lastname", "gender"]
}
}
}
]
}
'
```
### Expected behavior
I expect the model to return structured function_call or tool_call data as part of the streaming output, similar to how OpenAI's function calling works. | {
"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/40620/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/40620/timeline | null | reopened | {
"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/40619 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40619/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40619/comments | https://api.github.com/repos/huggingface/transformers/issues/40619/events | https://github.com/huggingface/transformers/pull/40619 | 3,375,529,288 | PR_kwDOCUB6oc6mbgy- | 40,619 | [CP] Add attention_mask to the buffer when the mask is causal | {
"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-02T11:00:04 | 2025-09-03T10:19:36 | 2025-09-03T10:19:35 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40619",
"html_url": "https://github.com/huggingface/transformers/pull/40619",
"diff_url": "https://github.com/huggingface/transformers/pull/40619.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40619.patch",
"merged_at": "2025-09-03T10:19:35"
} | # What does this PR do?
* Ensured that the `attention_mask` is always checked for causality before being added to the buffer, and that this validation is performed only once for performance.
* Modified the logic so that the `attention_mask` is appended to buffers only after successful validation, preventing non-causal masks from being used. | {
"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/40619/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/40619/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40618 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40618/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40618/comments | https://api.github.com/repos/huggingface/transformers/issues/40618/events | https://github.com/huggingface/transformers/pull/40618 | 3,375,487,417 | PR_kwDOCUB6oc6mbXo8 | 40,618 | feat: err when unsupported attn impl is set w/ `--continuous_batching` | {
"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-02T10:47:20 | 2025-09-08T14:31:50 | 2025-09-08T14:31:49 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40618",
"html_url": "https://github.com/huggingface/transformers/pull/40618",
"diff_url": "https://github.com/huggingface/transformers/pull/40618.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40618.patch",
"merged_at": "2025-09-08T14:31:49"
} | In #40479, we introduced a new `--continuous_batching` flag. Here we add a check to make sure the `--attn_implementation` is compatible with CB and error when not. | {
"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/40618/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/40618/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40617 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40617/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40617/comments | https://api.github.com/repos/huggingface/transformers/issues/40617/events | https://github.com/huggingface/transformers/pull/40617 | 3,375,370,693 | PR_kwDOCUB6oc6ma9_B | 40,617 | Fix flaky `JambaModelTest.test_load_balancing_loss` | {
"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-02T10:14:52 | 2025-09-02T11:59:51 | 2025-09-02T11:58:17 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40617",
"html_url": "https://github.com/huggingface/transformers/pull/40617",
"diff_url": "https://github.com/huggingface/transformers/pull/40617.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40617.patch",
"merged_at": "2025-09-02T11:58:17"
} | # What does this PR do?
Fix this flaky test which has
```bash
> torch.testing.assert_close(result.aux_loss.cpu(), torch.tensor(2, dtype=torch.float32), rtol=1e-2, atol=1e-2)
E AssertionError: Scalars are not close!
```
Running 10000 times and all pass.
Also makes this much much faster by reducing model size and padded sequence length: running the same tests 20 times
20 passed, 2 warnings in 11.35s v.s. 20 passed, 2 warnings in 75.72s (0:01:15)
### Full log
```
___________________ JambaModelTest.test_load_balancing_loss ____________________
[gw3] linux -- Python 3.9.23 /usr/local/bin/python3
self = <tests.models.jamba.test_modeling_jamba.JambaModelTest testMethod=test_load_balancing_loss>
def test_load_balancing_loss(self):
r"""
Let's make sure we can actually compute the loss and do a backward on it.
"""
config, input_dict = self.model_tester.prepare_config_and_inputs_for_common()
config.num_labels = 3
config.num_experts = 16
config.output_router_logits = True
input_ids = input_dict["input_ids"]
attention_mask = input_ids.ne(config.pad_token_id).to(torch_device)
model = JambaForCausalLM(config)
model.to(torch_device)
model.eval()
result = model(input_ids, attention_mask=attention_mask)
bs, seqlen = input_ids.shape
self.assertEqual(result.router_logits[0].shape, (bs * seqlen, config.num_experts))
> torch.testing.assert_close(result.aux_loss.cpu(), torch.tensor(2, dtype=torch.float32), rtol=1e-2, atol=1e-2)
E AssertionError: Scalars are not close!
E
E Expected 2.0 but got 2.0415196418762207.
E Absolute difference: 0.0415196418762207 (up to 0.01 allowed)
E Relative difference: 0.02075982093811035 (up to 0.01 allowed)
```
https://app.circleci.com/pipelines/github/huggingface/transformers/144153/workflows/ce26cb2f-f3b1-45c5-bca9-60868311cd7f/jobs/1905517 | {
"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/40617/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/40617/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40616 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40616/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40616/comments | https://api.github.com/repos/huggingface/transformers/issues/40616/events | https://github.com/huggingface/transformers/issues/40616 | 3,375,359,805 | I_kwDOCUB6oc7JL-c9 | 40,616 | Allow users to pass through `Accelerate` instance | {
"login": "nialldevlin1",
"id": 89581219,
"node_id": "MDQ6VXNlcjg5NTgxMjE5",
"avatar_url": "https://avatars.githubusercontent.com/u/89581219?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nialldevlin1",
"html_url": "https://github.com/nialldevlin1",
"followers_url": "https://api.github.com/users/nialldevlin1/followers",
"following_url": "https://api.github.com/users/nialldevlin1/following{/other_user}",
"gists_url": "https://api.github.com/users/nialldevlin1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nialldevlin1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nialldevlin1/subscriptions",
"organizations_url": "https://api.github.com/users/nialldevlin1/orgs",
"repos_url": "https://api.github.com/users/nialldevlin1/repos",
"events_url": "https://api.github.com/users/nialldevlin1/events{/privacy}",
"received_events_url": "https://api.github.com/users/nialldevlin1/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-02T10:11:15 | 2025-09-24T19:26:52 | null | NONE | null | null | null | null | ### Feature request
Users can create an `Accelerator` instance and optionally pass this through to the `Trainer`, which should then handle further postprocessing based on the state of the object.
### Motivation
In the base `Trainer` class, the call to `create_accelerator_and_postprocess` creates the `Accelerator` instance and then sets flags detailing whether certain features/modes of operation are enabled. Within this method, a check for the current accelerate version is made. If the version is greater than 0.28 then only the dataloader args are added to the arguments passed through to the `Accelerate` instantiation:
```python
args = {
"deepspeed_plugin": self.args.deepspeed_plugin,
}
if is_accelerate_available("0.28.0"):
args["dataloader_config"] = dataloader_config
else:
args.update(accelerator_config)
```
This prevents any custom setup that might be required. It is also not clear what parts of the config are actually applied and isn't helped by the fact that accelerate itself uses arguments and environment variables to silently set things - allowing a means for the user to explicitly set the state of the `Accelerate` instance is a much clearer pattern.
Instead, users should be able to create their own `Accelerate` argument, pass it through to the `Trainer`, which should then continue with the postprocessing, e.g.:
```python
def maybe_create_accelerator_and_postprocess(self, accelerator: Optional[Accelerator] = None):
self.accelerator = accelerator or self.create_accelerator()
self.gather_function = self.accelerator.gather_for_metrics
if "use_gather_object" in inspect.signature(self.gather_function).parameters:
self.gather_function = functools.partial(
self.gather_function, use_gather_object=self.args.eval_use_gather_object
)
...
```
### Your contribution
Can offer assistance, although I imagine there are several gotchas in the library that preclude certain setups that I'm not aware of | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40616/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/40616/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/40615 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40615/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40615/comments | https://api.github.com/repos/huggingface/transformers/issues/40615/events | https://github.com/huggingface/transformers/pull/40615 | 3,375,324,381 | PR_kwDOCUB6oc6maz3Y | 40,615 | docs: update GPTBigCode model card with standardized usage section | {
"login": "FrankDannie",
"id": 62831996,
"node_id": "MDQ6VXNlcjYyODMxOTk2",
"avatar_url": "https://avatars.githubusercontent.com/u/62831996?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/FrankDannie",
"html_url": "https://github.com/FrankDannie",
"followers_url": "https://api.github.com/users/FrankDannie/followers",
"following_url": "https://api.github.com/users/FrankDannie/following{/other_user}",
"gists_url": "https://api.github.com/users/FrankDannie/gists{/gist_id}",
"starred_url": "https://api.github.com/users/FrankDannie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FrankDannie/subscriptions",
"organizations_url": "https://api.github.com/users/FrankDannie/orgs",
"repos_url": "https://api.github.com/users/FrankDannie/repos",
"events_url": "https://api.github.com/users/FrankDannie/events{/privacy}",
"received_events_url": "https://api.github.com/users/FrankDannie/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-02T10:01:44 | 2025-09-18T17:18:01 | 2025-09-18T17:18:00 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40615",
"html_url": "https://github.com/huggingface/transformers/pull/40615",
"diff_url": "https://github.com/huggingface/transformers/pull/40615.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40615.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 -->
This PR updates the GPTBigCode model card to a standardized format compatible with Hugging Face Hub interactive docs.
Changes include:
- Added <hfoptions> / <hfoption> blocks for structured usage examples:
- Pipeline (quick start)
- AutoModel / AutoTokenizer (recommended for control)
- Quantization (BitsAndBytes 4-bit example)
- AttentionMaskVisualizer
- FlashAttention 2
- Consolidated all usage code snippets for copy-paste usability.
- Preserved notes on model optimizations, expected speedups, and attention implementation.
- Improves readability and makes the docs interactive for users exploring model examples.
This ensures users can quickly experiment with GPTBigCode checkpoints as described in https://github.com/huggingface/transformers/issues/36979,.
## 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": "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/40615/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/40615/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40614 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40614/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40614/comments | https://api.github.com/repos/huggingface/transformers/issues/40614/events | https://github.com/huggingface/transformers/pull/40614 | 3,375,052,999 | PR_kwDOCUB6oc6mZ48s | 40,614 | Avoid `too many request` caused by `AutoModelTest::test_dynamic_saving_from_local_repo` | {
"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-02T08:46:22 | 2025-09-02T10:08:54 | 2025-09-02T10:08:53 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40614",
"html_url": "https://github.com/huggingface/transformers/pull/40614",
"diff_url": "https://github.com/huggingface/transformers/pull/40614.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40614.patch",
"merged_at": "2025-09-02T10:08:52"
} | # What does this PR do?
This test uses `huggingface_hub's Repository` which doesn't have any cache mechanism, so from time to time we get `The requested URL returned error: 429` (`too many requests`) error.
```bash
FAILED tests/models/auto/test_modeling_auto.py::AutoModelTest::test_dynamic_saving_from_local_repo - OSError: WARNING: `git lfs clone` is deprecated and will not be updated
with new flags from `git clone`
`git clone` has been updated in upstream Git to have comparable
speeds to `git lfs clone`.
--------------------------------------------
Cloning into '.'...
fatal: unable to access 'https://huggingface.co/hf-internal-testing/tiny-random-custom-architecture/': The requested URL returned error: 429
-------------------------------------------
Error(s) during clone:
`git clone` failed: exit status 128
```
https://app.circleci.com/pipelines/github/huggingface/transformers/143470/workflows/b339d736-e318-45e5-b708-ce89dc09b150/jobs/1897077 | {
"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/40614/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/40614/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40613 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40613/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40613/comments | https://api.github.com/repos/huggingface/transformers/issues/40613/events | https://github.com/huggingface/transformers/pull/40613 | 3,375,016,684 | PR_kwDOCUB6oc6mZxKz | 40,613 | Fix processor chat template | {
"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-02T08:35:05 | 2025-09-02T08:59:48 | 2025-09-02T08:59:48 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40613",
"html_url": "https://github.com/huggingface/transformers/pull/40613",
"diff_url": "https://github.com/huggingface/transformers/pull/40613.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40613.patch",
"merged_at": "2025-09-02T08:59:48"
} | # What does this PR do?
As er title, the slow tests in gemma3 were failing and the cause of issue is an incorrect indentation. We need to add exactly one sublist of images per batch, but the current code was treating each conversation turn as a new batch
Fixed and added a fast test as well | {
"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/40613/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/40613/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40612 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40612/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40612/comments | https://api.github.com/repos/huggingface/transformers/issues/40612/events | https://github.com/huggingface/transformers/pull/40612 | 3,374,766,927 | PR_kwDOCUB6oc6mZAcf | 40,612 | Fix invalid 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-02T07:26:14 | 2025-09-02T15:11:46 | 2025-09-02T13:10:23 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40612",
"html_url": "https://github.com/huggingface/transformers/pull/40612",
"diff_url": "https://github.com/huggingface/transformers/pull/40612.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40612.patch",
"merged_at": "2025-09-02T13:10:23"
} | # What does this PR do?
| {
"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/40612/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/40612/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40611 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40611/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40611/comments | https://api.github.com/repos/huggingface/transformers/issues/40611/events | https://github.com/huggingface/transformers/pull/40611 | 3,374,598,634 | PR_kwDOCUB6oc6mYdQK | 40,611 | Disable cache for `TokenizerTesterMixin` temporarily | {
"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-02T06:26:38 | 2025-09-02T06:40:05 | 2025-09-02T06:40:04 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40611",
"html_url": "https://github.com/huggingface/transformers/pull/40611",
"diff_url": "https://github.com/huggingface/transformers/pull/40611.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40611.patch",
"merged_at": "2025-09-02T06:40:04"
} | # What does this PR do?
In #36818, we tried to make tokenization tests faster by caching the objects (tokenizers). Despite we set the `maxsize=64` for `lru_cache`, many objects still live for much longer time than necessary, say `BertTokenizationTest` finished all of its tests but continue to live in the `lru_cache`.
We have not a mechanism to detect the `pytest` worker crash until #40552, and at some point many of the `test_tokenization` jobs have worker crashed but reported as test step successful.
I will improve this cache stuff to make it memory efficient this week, but for now, let's not use it and make the community and team members happy 🎉 with ✅ CI.
## Memory usage:
### Before
<img width="2087" height="570" alt="bad" src="https://github.com/user-attachments/assets/4e38b097-4312-4f25-8407-991fe793b84d" />
### After
<img width="2081" height="558" alt="good" src="https://github.com/user-attachments/assets/6308d136-560b-48ba-b0d7-94f67a5574d8" />
| {
"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/40611/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/40611/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40610 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40610/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40610/comments | https://api.github.com/repos/huggingface/transformers/issues/40610/events | https://github.com/huggingface/transformers/pull/40610 | 3,374,451,033 | PR_kwDOCUB6oc6mX9_r | 40,610 | Fix issue of wrong number of tokens per GPUs affecting loss normalization in trainer.py | {
"login": "SamuelBarryCS",
"id": 127697809,
"node_id": "U_kgDOB5yDkQ",
"avatar_url": "https://avatars.githubusercontent.com/u/127697809?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SamuelBarryCS",
"html_url": "https://github.com/SamuelBarryCS",
"followers_url": "https://api.github.com/users/SamuelBarryCS/followers",
"following_url": "https://api.github.com/users/SamuelBarryCS/following{/other_user}",
"gists_url": "https://api.github.com/users/SamuelBarryCS/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SamuelBarryCS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SamuelBarryCS/subscriptions",
"organizations_url": "https://api.github.com/users/SamuelBarryCS/orgs",
"repos_url": "https://api.github.com/users/SamuelBarryCS/repos",
"events_url": "https://api.github.com/users/SamuelBarryCS/events{/privacy}",
"received_events_url": "https://api.github.com/users/SamuelBarryCS/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-02T05:25:27 | 2025-09-11T04:53:42 | 2025-09-11T04:53:42 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40610",
"html_url": "https://github.com/huggingface/transformers/pull/40610",
"diff_url": "https://github.com/huggingface/transformers/pull/40610.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40610.patch",
"merged_at": null
} | # What:
- Fix issue witnessed in https://github.com/huggingface/transformers/issues/37474: when using >1 GPU, the loss does not get normalized correctly
- Cause: each GPUs sees num_items_in_batch = cst = total number of tokens (instead of total number of tokens / n_gpus)
- Fix: adjust num_items_in_batch to be set to the correct value before being fed to `training_step` & `compute_loss`.
# Test performed:
- On top of the updated `trainer.py`, **I'm pushing 3 temporary files that are meant to be deleted after review** and before merging: `test_simple_demo.py` - a test file and `trainer_old.py` / `trainer_new.py` - respectively corresponding to the version of trainer.py before / after my commits but with logging for testing purpose
- Ran test with 1 & 2 GPUs to reproduce results from https://github.com/huggingface/transformers/issues/37474, and output is as follow:
### 1 GPU - behavior of both implementations is correct:
```
Found 1 different GPUs
----------------------------------------
Testing OLD Trainer
----------------------------------------
Starting OLD trainer...
The tokenizer has new PAD/BOS/EOS tokens that differ from the model config and generation config. The model config and generation config were aligned accordingly, being updated with the tokenizer's values. Updated tokens: {'pad_token_id': 0}.
{'loss': 10.4322, 'grad_norm': 11.936039924621582, 'learning_rate': 0.0001, 'epoch': 1.0}
{'loss': 9.8546, 'grad_norm': 8.70962905883789, 'learning_rate': 5e-05, 'epoch': 2.0}
{'train_runtime': 0.4988, 'train_samples_per_second': 60.144, 'train_steps_per_second': 4.01, 'train_loss': 10.143393516540527, 'epoch': 2.0}
----------------------------------------
Testing NEW Trainer
----------------------------------------
Starting NEW trainer...
{'loss': 10.4322, 'grad_norm': 11.936039924621582, 'learning_rate': 0.0001, 'epoch': 1.0}
{'loss': 9.8546, 'grad_norm': 8.70962905883789, 'learning_rate': 5e-05, 'epoch': 2.0}
{'train_runtime': 0.2013, 'train_samples_per_second': 149.029, 'train_steps_per_second': 9.935, 'train_loss': 10.143393516540527, 'epoch': 2.0}
```
### 2 GPUS: previous implementation (i.e. "old trainer") incorrectly normalizes the loss, whereas the new one fixes it:
```
Found 2 different GPUs
----------------------------------------
Testing OLD Trainer
----------------------------------------
Starting OLD trainer...
The tokenizer has new PAD/BOS/EOS tokens that differ from the model config and generation config. The model config and generation config were aligned accordingly, being updated with the tokenizer's values. Updated tokens: {'pad_token_id': 0}.
{'loss': 5.2161, 'grad_norm': 5.968019962310791, 'learning_rate': 0.0001, 'epoch': 1.0}
{'loss': 4.9273, 'grad_norm': 4.354814529418945, 'learning_rate': 5e-05, 'epoch': 2.0}
{'train_runtime': 1.6086, 'train_samples_per_second': 37.3, 'train_steps_per_second': 1.243, 'train_loss': 5.071696758270264, 'epoch': 2.0}
----------------------------------------
Testing NEW Trainer
----------------------------------------
Starting NEW trainer...
{'loss': 10.4322, 'grad_norm': 11.936039924621582, 'learning_rate': 0.0001, 'epoch': 1.0}
{'loss': 9.8546, 'grad_norm': 8.70962905883789, 'learning_rate': 5e-05, 'epoch': 2.0}
{'train_runtime': 0.1692, 'train_samples_per_second': 354.581, 'train_steps_per_second': 11.819, 'train_loss': 10.143393516540527, 'epoch': 2.0}
```
# How to review:
- Read diff of `trainer.py` (**ignore `trainer_old.py` & `trainer_new.py` that are just meant for testing purpose**)
- Run `test_simple_demo.py` on 1 and then n > 1 GPUs to confirm my test
# TODO/ Next:
- NA
| {
"login": "SamuelBarryCS",
"id": 127697809,
"node_id": "U_kgDOB5yDkQ",
"avatar_url": "https://avatars.githubusercontent.com/u/127697809?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SamuelBarryCS",
"html_url": "https://github.com/SamuelBarryCS",
"followers_url": "https://api.github.com/users/SamuelBarryCS/followers",
"following_url": "https://api.github.com/users/SamuelBarryCS/following{/other_user}",
"gists_url": "https://api.github.com/users/SamuelBarryCS/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SamuelBarryCS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SamuelBarryCS/subscriptions",
"organizations_url": "https://api.github.com/users/SamuelBarryCS/orgs",
"repos_url": "https://api.github.com/users/SamuelBarryCS/repos",
"events_url": "https://api.github.com/users/SamuelBarryCS/events{/privacy}",
"received_events_url": "https://api.github.com/users/SamuelBarryCS/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40610/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/40610/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40609 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40609/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40609/comments | https://api.github.com/repos/huggingface/transformers/issues/40609/events | https://github.com/huggingface/transformers/pull/40609 | 3,374,368,403 | PR_kwDOCUB6oc6mXs2D | 40,609 | Fix broken Llama4 accuracy in MoE part | {
"login": "nvpohanh",
"id": 53919306,
"node_id": "MDQ6VXNlcjUzOTE5MzA2",
"avatar_url": "https://avatars.githubusercontent.com/u/53919306?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nvpohanh",
"html_url": "https://github.com/nvpohanh",
"followers_url": "https://api.github.com/users/nvpohanh/followers",
"following_url": "https://api.github.com/users/nvpohanh/following{/other_user}",
"gists_url": "https://api.github.com/users/nvpohanh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nvpohanh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nvpohanh/subscriptions",
"organizations_url": "https://api.github.com/users/nvpohanh/orgs",
"repos_url": "https://api.github.com/users/nvpohanh/repos",
"events_url": "https://api.github.com/users/nvpohanh/events{/privacy}",
"received_events_url": "https://api.github.com/users/nvpohanh/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-02T04:36:42 | 2025-09-04T20:14:45 | 2025-09-04T20:14:45 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40609",
"html_url": "https://github.com/huggingface/transformers/pull/40609",
"diff_url": "https://github.com/huggingface/transformers/pull/40609.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40609.patch",
"merged_at": "2025-09-04T20:14:45"
} | Llama4 accuracy is broken by a bug in
https://github.com/huggingface/transformers/pull/39501 . It forgot to transpose the router_scores before applying it to routed_in, causing Llama4 to generate garbage output.
This PR fixes that issue by adding back the transpose() and adding some comments explaining why the transpose() is needed.
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?
## Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@ArthurZucker please review since https://github.com/huggingface/transformers/pull/39501 was made by you. Thanks!
## Accuracy tests
Test script:
```
from transformers import pipeline
import torch
model_id = "meta-llama/Llama-4-Scout-17B-16E-Instruct"
pipe = pipeline(
"text-generation",
model=model_id,
device_map="auto",
torch_dtype=torch.bfloat16,
)
output = pipe("Roses are red,", max_new_tokens=200)
print(output)
```
Before the fix on H200:
```
[{'generated_text': 'Roses are red, 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8'}]
```
After the fix on H200:
```
[{'generated_text': "Roses are red, violets are blue, and here are some Valentine's Day-themed books to read with your boo! \n Celebrate Black History Month by reading books by Black authors and about Black culture! These books are for kids and teens! \n These picture books celebrate Black History Month and are perfect for reading with your kids! These books highlight Black history, cu... \n These books are all winners or nominees for major literary awards, including the Pulitzer Prize, the National Book Award, and t... \n 100 Book Challenge 2024: Read a Book Set in Another Country \n Check out these books that are set in different countries around the world! Read a book set in another country and see what you... \n Explore the diverse world through these books that are set in different countries and cultures! Read a book set in another coun... \n 100 Book Challenge 2024: Read a Book Written by an Author of Color \n Check out these books written by authors of color!"}]
``` | {
"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/40609/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/40609/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40608 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40608/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40608/comments | https://api.github.com/repos/huggingface/transformers/issues/40608/events | https://github.com/huggingface/transformers/issues/40608 | 3,374,345,760 | I_kwDOCUB6oc7JIG4g | 40,608 | No module named 'transformers.models.gpt' | {
"login": "TPLong2002",
"id": 104190246,
"node_id": "U_kgDOBjXRJg",
"avatar_url": "https://avatars.githubusercontent.com/u/104190246?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TPLong2002",
"html_url": "https://github.com/TPLong2002",
"followers_url": "https://api.github.com/users/TPLong2002/followers",
"following_url": "https://api.github.com/users/TPLong2002/following{/other_user}",
"gists_url": "https://api.github.com/users/TPLong2002/gists{/gist_id}",
"starred_url": "https://api.github.com/users/TPLong2002/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TPLong2002/subscriptions",
"organizations_url": "https://api.github.com/users/TPLong2002/orgs",
"repos_url": "https://api.github.com/users/TPLong2002/repos",
"events_url": "https://api.github.com/users/TPLong2002/events{/privacy}",
"received_events_url": "https://api.github.com/users/TPLong2002/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-02T04:22:58 | 2025-10-25T08:02:31 | 2025-10-25T08:02:31 | NONE | null | null | null | null | ### System Info
if True:
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "model", # YOUR MODEL YOU USED FOR TRAINING
max_seq_length = 1024,
dtype = None,
load_in_4bit = True,
)
messages = [
# {"role": "system", "content": "reasoning language: French\n\nYou are a helpful assistant that can solve mathematical problems."},
{"role": "user", "content": "Xin chào"},
]
FastLanguageModel.for_inference(model)
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt = True,
return_tensors = "pt",
return_dict = True,
reasoning_effort = "low",
).to(model.device)
from transformers import TextStreamer
_ = model.generate(**inputs, max_new_tokens = 64, streamer = TextStreamer(tokenizer))
Error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[8], [line 3](vscode-notebook-cell:?execution_count=8&line=3)
1 if True:
2 from unsloth import FastLanguageModel
----> [3](vscode-notebook-cell:?execution_count=8&line=3) model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name = "model", # YOUR MODEL YOU USED FOR TRAINING
5 max_seq_length = 1024,
6 dtype = None,
7 load_in_4bit = True,
8 )
10 messages = [
11 # {"role": "system", "content": "reasoning language: French\n\nYou are a helpful assistant that can solve mathematical problems."},
12 {"role": "user", "content": "Xin chào"},
13 ]
14 FastLanguageModel.for_inference(model)
File /opt/miniforge3/lib/python3.12/site-packages/unsloth/models/loader.py:347, in FastLanguageModel.from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, load_in_8bit, full_finetuning, token, device_map, rope_scaling, fix_tokenizer, trust_remote_code, use_gradient_checkpointing, resize_model_vocab, revision, use_exact_model_name, fast_inference, gpu_memory_utilization, float8_kv_cache, random_state, max_lora_rank, disable_log_stats, *args, **kwargs)
330 dispatch_model = FastQwen3Model if model_type == "qwen3" else FastQwen3MoeModel
331 # elif model_type == "falcon_h1":
332 # dispatch_model = FastFalconH1Model
333 # if not SUPPORTS_FALCON_H1:
(...) 345 # dispatch_model = FastGraniteModel
346 else:
--> [347](https://vscode-remote+ssh-002dremote-002b79-002e141-002e67-002e124.vscode-resource.vscode-cdn.net/opt/miniforge3/lib/python3.12/site-packages/unsloth/models/loader.py:347) return FastModel.from_pretrained(
348 model_name = model_name,
349 max_seq_length = max_seq_length,
350 dtype = dtype,
351 load_in_4bit = load_in_4bit,
352 load_in_8bit = load_in_8bit,
353 full_finetuning = full_finetuning,
354 token = token,
355 device_map = device_map,
356 rope_scaling = rope_scaling, # [TODO] No effect
357 fix_tokenizer = fix_tokenizer, # [TODO] No effect
358 trust_remote_code = trust_remote_code,
359 use_gradient_checkpointing = use_gradient_checkpointing,
360 resize_model_vocab = resize_model_vocab, # [TODO] No effect
361 revision = revision,
362 return_logits = False, # Return logits
363 fullgraph = True, # No graph breaks
364 use_exact_model_name = use_exact_model_name,
365 *args, **kwargs,
366 )
367 pass
369 if use_gradient_checkpointing == "unsloth":
File /opt/miniforge3/lib/python3.12/site-packages/unsloth/models/loader.py:[803](https://vscode-remote+ssh-002dremote-002b79-002e141-002e67-002e124.vscode-resource.vscode-cdn.net/opt/miniforge3/lib/python3.12/site-packages/unsloth/models/loader.py:803), in FastModel.from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, load_in_8bit, full_finetuning, token, device_map, rope_scaling, fix_tokenizer, trust_remote_code, use_gradient_checkpointing, resize_model_vocab, revision, return_logits, fullgraph, use_exact_model_name, auto_model, whisper_language, whisper_task, unsloth_force_compile, *args, **kwargs)
801 with redirector:
802 patch_loss_functions(torch_compile = False)
--> 803 model_types, supports_sdpa = unsloth_compile_transformers(
804 dtype = dtype,
805 model_name = model_name,
806 model_types = model_types,
807 token = token,
808 sdpa_dynamic_mask = True,
809 sdpa_bool_masks = True,
810 sdpa_gqa_replace = True,
811 sdpa_dynamic_compile = True,
812 compile_attention = True,
813 disable_causal_masks = True,
814 compile_torch_modules = True,
815 compile_custom_modules = True,
816 compile_function_calls = True,
817 fuse_lm_head = True,
818 gradient_checkpointing = True,
819 manual_replacements = True,
820 fast_lora_forwards = True,
821 fast_residual_stream = False,
822 accurate_accumulation = True,
823 epilogue_fusion = True,
824 max_autotune = False,
825 shape_padding = True,
826 cudagraphs = False,
827 debug = False,
828 fullgraph = fullgraph,
829 import_from_cache = False,
830 disable = False,
831 return_logits = return_logits,
832 trust_remote_code = trust_remote_code,
833 unsloth_force_compile = unsloth_force_compile,
834 )
835 pass
836 # Fix SDPA
File /opt/miniforge3/lib/python3.12/site-packages/unsloth/models/_utils.py:[1399](https://vscode-remote+ssh-002dremote-002b79-002e141-002e67-002e124.vscode-resource.vscode-cdn.net/opt/miniforge3/lib/python3.12/site-packages/unsloth/models/_utils.py:1399), in unsloth_compile_transformers(dtype, model_name, model_types, token, revision, trust_remote_code, sdpa_dynamic_mask, sdpa_bool_masks, sdpa_gqa_replace, sdpa_dynamic_compile, compile_attention, disable_causal_masks, compile_torch_modules, compile_custom_modules, compile_function_calls, fuse_lm_head, gradient_checkpointing, manual_replacements, fast_lora_forwards, fast_residual_stream, accurate_accumulation, epilogue_fusion, max_autotune, shape_padding, cudagraphs, debug, fullgraph, import_from_cache, disable, return_logits, unsloth_force_compile)
1397 supports_sdpa = [True]
1398 for model_type in model_types:
-> 1399 _unsloth_compile_transformers(
1400 model_type,
1401 sdpa_dynamic_mask = sdpa_dynamic_mask,
1402 sdpa_bool_masks = sdpa_bool_masks,
1403 sdpa_gqa_replace = sdpa_gqa_replace,
1404 sdpa_dynamic_compile = sdpa_dynamic_compile,
1405 compile_attention = compile_attention,
1406 disable_causal_masks = disable_causal_masks,
1407 compile_torch_modules = compile_torch_modules,
1408 compile_custom_modules = compile_custom_modules,
1409 compile_function_calls = compile_function_calls,
1410 fuse_lm_head = fuse_lm_head,
1411 gradient_checkpointing = gradient_checkpointing,
1412 manual_replacements = manual_replacements,
1413 fast_lora_forwards = fast_lora_forwards,
1414 fast_residual_stream = fast_residual_stream,
1415 accurate_accumulation = accurate_accumulation,
1416 epilogue_fusion = epilogue_fusion,
1417 max_autotune = max_autotune,
1418 shape_padding = shape_padding,
1419 cudagraphs = cudagraphs,
1420 debug = debug,
1421 fullgraph = fullgraph,
1422 import_from_cache = import_from_cache,
1423 disable = disable,
1424 return_logits = return_logits,
1425 supports_sdpa = supports_sdpa,
1426 )
1427 pass
1428 # Redo patches which override compiler
File /opt/miniforge3/lib/python3.12/site-packages/unsloth_zoo/compiler.py:[1913](https://vscode-remote+ssh-002dremote-002b79-002e141-002e67-002e124.vscode-resource.vscode-cdn.net/opt/miniforge3/lib/python3.12/site-packages/unsloth_zoo/compiler.py:1913), in unsloth_compile_transformers(model_type, sdpa_dynamic_mask, sdpa_bool_masks, sdpa_gqa_replace, sdpa_dynamic_compile, compile_attention, disable_causal_masks, compile_torch_modules, compile_custom_modules, compile_function_calls, fuse_lm_head, gradient_checkpointing, manual_replacements, fast_lora_forwards, fast_residual_stream, accurate_accumulation, epilogue_fusion, max_autotune, shape_padding, cudagraphs, debug, fullgraph, import_from_cache, disable, return_logits, supports_sdpa)
1910 pass
1912 model_location = f"transformers.models.{model_type}.modeling_{model_type}"
-> 1913 exec(f"import {model_location}", globals())
1914 modeling_file = eval(model_location)
1915 if hasattr(modeling_file, "__UNSLOTH_PATCHED__"): return
File <string>:1
ModuleNotFoundError: No module named 'transformers.models.gpt'
### 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
model.save_pretrained_merged("/root/test/model", tokenizer)
### Expected behavior
. | {
"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/40608/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/40608/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/40607 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40607/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40607/comments | https://api.github.com/repos/huggingface/transformers/issues/40607/events | https://github.com/huggingface/transformers/pull/40607 | 3,374,299,990 | PR_kwDOCUB6oc6mXevg | 40,607 | Use functools.cached_property | {
"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-02T03:52:16 | 2025-09-10T12:17:06 | 2025-09-10T12:15:41 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40607",
"html_url": "https://github.com/huggingface/transformers/pull/40607",
"diff_url": "https://github.com/huggingface/transformers/pull/40607.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40607.patch",
"merged_at": "2025-09-10T12:15:41"
} | # What does this PR do?
Use `functools.cached_property` rather than the shipped one. | {
"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/40607/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/40607/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40606 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40606/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40606/comments | https://api.github.com/repos/huggingface/transformers/issues/40606/events | https://github.com/huggingface/transformers/issues/40606 | 3,374,256,950 | I_kwDOCUB6oc7JHxM2 | 40,606 | GPT-OSS attention backends available for SM120 other than Eager? | {
"login": "TheTinyTeddy",
"id": 171109504,
"node_id": "U_kgDOCjLsgA",
"avatar_url": "https://avatars.githubusercontent.com/u/171109504?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TheTinyTeddy",
"html_url": "https://github.com/TheTinyTeddy",
"followers_url": "https://api.github.com/users/TheTinyTeddy/followers",
"following_url": "https://api.github.com/users/TheTinyTeddy/following{/other_user}",
"gists_url": "https://api.github.com/users/TheTinyTeddy/gists{/gist_id}",
"starred_url": "https://api.github.com/users/TheTinyTeddy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TheTinyTeddy/subscriptions",
"organizations_url": "https://api.github.com/users/TheTinyTeddy/orgs",
"repos_url": "https://api.github.com/users/TheTinyTeddy/repos",
"events_url": "https://api.github.com/users/TheTinyTeddy/events{/privacy}",
"received_events_url": "https://api.github.com/users/TheTinyTeddy/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-02T03:21:16 | 2025-10-12T08:02:48 | 2025-10-12T08:02:48 | NONE | null | null | null | null | I was wondering any attention backend we can use for long context if using SM120 GPU? Since the "eager_attention_forward" uses the naive implementation that computes the full attention in one go, which can lead to OOM for large context, but I couldn't use other implementations since they either do not support sinks or SM120.
Many thanks! | {
"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/40606/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/40606/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/40605 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40605/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40605/comments | https://api.github.com/repos/huggingface/transformers/issues/40605/events | https://github.com/huggingface/transformers/pull/40605 | 3,374,208,449 | PR_kwDOCUB6oc6mXNAf | 40,605 | Fix arguments | {
"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-02T02:50:40 | 2025-09-05T13:50:49 | 2025-09-05T13:50:04 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40605",
"html_url": "https://github.com/huggingface/transformers/pull/40605",
"diff_url": "https://github.com/huggingface/transformers/pull/40605.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40605.patch",
"merged_at": "2025-09-05T13:50:04"
} | # What does this PR do?
This PR fixes argument issues found by pyright, it also contains other tiny fixes.
| {
"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/40605/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/40605/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40604 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40604/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40604/comments | https://api.github.com/repos/huggingface/transformers/issues/40604/events | https://github.com/huggingface/transformers/pull/40604 | 3,374,073,788 | PR_kwDOCUB6oc6mW0XF | 40,604 | Remove unnecessary pillow version check | {
"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-02T01:22:28 | 2025-09-02T15:11:20 | 2025-09-02T12:59:23 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40604",
"html_url": "https://github.com/huggingface/transformers/pull/40604",
"diff_url": "https://github.com/huggingface/transformers/pull/40604.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40604.patch",
"merged_at": "2025-09-02T12:59:23"
} | # What does this PR do?
pillow is required to >= 10.0.1 in setup.py . | {
"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/40604/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/40604/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40603 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40603/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40603/comments | https://api.github.com/repos/huggingface/transformers/issues/40603/events | https://github.com/huggingface/transformers/issues/40603 | 3,373,971,227 | I_kwDOCUB6oc7JGrcb | 40,603 | Processing utils bug in `apply_chat_template` when image content is PIL image | {
"login": "ZENGXH",
"id": 12856437,
"node_id": "MDQ6VXNlcjEyODU2NDM3",
"avatar_url": "https://avatars.githubusercontent.com/u/12856437?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ZENGXH",
"html_url": "https://github.com/ZENGXH",
"followers_url": "https://api.github.com/users/ZENGXH/followers",
"following_url": "https://api.github.com/users/ZENGXH/following{/other_user}",
"gists_url": "https://api.github.com/users/ZENGXH/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ZENGXH/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ZENGXH/subscriptions",
"organizations_url": "https://api.github.com/users/ZENGXH/orgs",
"repos_url": "https://api.github.com/users/ZENGXH/repos",
"events_url": "https://api.github.com/users/ZENGXH/events{/privacy}",
"received_events_url": "https://api.github.com/users/ZENGXH/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-01T23:53:52 | 2025-09-03T11:06:06 | 2025-09-03T11:06:06 | NONE | null | null | null | null | ### System Info
```
- `transformers` version: 4.57.0.dev0
- Platform: Linux-5.15.0-1055-aws-x86_64-with-glibc2.39
- Python version: 3.12.3
- Huggingface_hub version: 0.34.4
- Safetensors version: 0.5.3
- Accelerate version: 1.7.0
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.7.0a0+79aa17489c.nv25.04 (CUDA)
- 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?
@qubvel @zucchini-nlp
Seems this is brought by this PR: https://github.com/huggingface/transformers/pull/36682
### 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
```
from transformers.models.auto.processing_auto import AutoProcessor
from PIL import Image
processor = AutoProcessor.from_pretrained("OpenGVLab/InternVL3_5-1B-HF")
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": Image.new("RGB", (100, 100), (0, 0, 0))},
],
},
]
inputs = processor.apply_chat_template(messages, tokenize=True, add_generation_prompt=False, return_dict=True, return_tensors="pt")
```
### Expected behavior
```
Traceback (most recent call last):
File "test_processor.py", line 14, in <module>
inputs = processor.apply_chat_template(messages, tokenize=True, add_generation_prompt=False, return_dict=True, return_tensors="pt")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "src/transformers/utils/deprecation.py", line 172, in wrapped_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "src/transformers/utils/deprecation.py", line 172, in wrapped_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "src/transformers/processing_utils.py", line 1637, in apply_chat_template
images_exist = any(len(im) > 0 for im_list in batch_images for im in im_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "src/transformers/processing_utils.py", line 1637, in <genexpr>
images_exist = any(len(im) > 0 for im_list in batch_images for im in im_list)
^^^^^^^
TypeError: object of type 'Image' has no len()
```
the `batch_images` is
```
batch_images: [[<PIL.Image.Image image mode=RGB size=100x100 at 0x15519A190C50>]]
``` | {
"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/40603/reactions",
"total_count": 2,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 2
} | https://api.github.com/repos/huggingface/transformers/issues/40603/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/40602 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40602/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40602/comments | https://api.github.com/repos/huggingface/transformers/issues/40602/events | https://github.com/huggingface/transformers/pull/40602 | 3,373,903,609 | PR_kwDOCUB6oc6mWSAf | 40,602 | Add Fast PromptDepthAnything Processor | {
"login": "SamuelBarryCS",
"id": 127697809,
"node_id": "U_kgDOB5yDkQ",
"avatar_url": "https://avatars.githubusercontent.com/u/127697809?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SamuelBarryCS",
"html_url": "https://github.com/SamuelBarryCS",
"followers_url": "https://api.github.com/users/SamuelBarryCS/followers",
"following_url": "https://api.github.com/users/SamuelBarryCS/following{/other_user}",
"gists_url": "https://api.github.com/users/SamuelBarryCS/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SamuelBarryCS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SamuelBarryCS/subscriptions",
"organizations_url": "https://api.github.com/users/SamuelBarryCS/orgs",
"repos_url": "https://api.github.com/users/SamuelBarryCS/repos",
"events_url": "https://api.github.com/users/SamuelBarryCS/events{/privacy}",
"received_events_url": "https://api.github.com/users/SamuelBarryCS/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-01T22:59:28 | 2025-09-29T18:01:59 | 2025-09-15T15:03:44 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40602",
"html_url": "https://github.com/huggingface/transformers/pull/40602",
"diff_url": "https://github.com/huggingface/transformers/pull/40602.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40602.patch",
"merged_at": "2025-09-15T15:03:44"
} | # What:
- Implement fast processor for PromptDepthAnything, following request in https://github.com/huggingface/transformers/issues/36978
- Add one additional test to tests/models/prompt_depth_anything to check for numerical value
- Add a **temporary file** (to be deleted before merging) to run additional test and get speed benchmark of classic vs. fast implementation
# Test performed:
- Run `RUN_SLOW=1 python -m pytest tests/models/prompt_depth_anything/test_image_processing_prompt_depth_anything.py -v`, all passing:
<img width="338" height="49" alt="image" src="https://github.com/user-attachments/assets/1d0b2d7d-c722-48ce-bec3-f382b52f35a5" />
- Run the temporary file to get additional confidence in the fast processor output & get speed benchmarks:
```
📱 Testing on device: cpu
------------------------------
🔧 Config: batch_size=1, image_size=(384, 384)
⏳ Benchmarking slow processor...
⚡ Benchmarking fast processor...
📊 Results:
Slow: 0.0032s ± 0.0004s
Fast: 0.0006s ± 0.0000s
Speedup: 5.83x
✅ Output verification: PASSED
(Shape checked ✓, pixel value equality checked ✓, depth value equality checked ✓)
🔧 Config: batch_size=1, image_size=(512, 512)
⏳ Benchmarking slow processor...
⚡ Benchmarking fast processor...
📊 Results:
Slow: 0.0049s ± 0.0003s
Fast: 0.0014s ± 0.0001s
Speedup: 3.42x
✅ Output verification: PASSED
(Shape checked ✓, pixel value equality checked ✓, depth value equality checked ✓)
...
...
(all 12 cases passing)
```
# Impact metrics
- 10x speedup on 1 H100 setup
**Speed benchmark (normal vs fast)** on CPU:
<img width="1783" height="882" alt="image" src="https://github.com/user-attachments/assets/5cf7e90c-cb48-40db-8a55-9c9d72a5b1b0" />
**Speed benchmark (normal vs fast)** on 1 H100:
<img width="1784" height="882" alt="image" src="https://github.com/user-attachments/assets/1df7f5fe-3655-4bab-9ae0-34fa5e67e1ee" />
# How to review:
- Read diff
- Run tests with `RUN_SLOW=1 python -m pytest tests/models/prompt_depth_anything/test_image_processing_prompt_depth_anything.py -v`
# TODO/ Next:
- NA
| {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40602/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/40602/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40601 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40601/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40601/comments | https://api.github.com/repos/huggingface/transformers/issues/40601/events | https://github.com/huggingface/transformers/issues/40601 | 3,373,821,464 | I_kwDOCUB6oc7JGG4Y | 40,601 | Custom loss function computation even when training without labels. | {
"login": "lrast",
"id": 1191040,
"node_id": "MDQ6VXNlcjExOTEwNDA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1191040?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lrast",
"html_url": "https://github.com/lrast",
"followers_url": "https://api.github.com/users/lrast/followers",
"following_url": "https://api.github.com/users/lrast/following{/other_user}",
"gists_url": "https://api.github.com/users/lrast/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lrast/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lrast/subscriptions",
"organizations_url": "https://api.github.com/users/lrast/orgs",
"repos_url": "https://api.github.com/users/lrast/repos",
"events_url": "https://api.github.com/users/lrast/events{/privacy}",
"received_events_url": "https://api.github.com/users/lrast/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"
}
] | closed | false | null | [] | null | [] | 2025-09-01T21:48:35 | 2025-09-22T09:47:36 | 2025-09-22T09:47:36 | NONE | null | null | null | null | ### Feature request
Currently, `transformers.Trainer` allows a custom `compute_loss_func` function to be passed as a trainer argument. However, this user defined loss is only accessed in the case when labels is not None. I think that this hidden dependency is counter-intuitive. User defined loss functions should take priority regardless of context, and not be ignored without at least a warning.
This logic can be seen here:
https://github.com/huggingface/transformers/blob/052e652d6d53c2b26ffde87e039b723949a53493/src/transformers/trainer.py#L3639-L3660
### Motivation
I find conditionally calling `compute_loss_func` based on other configuration of the trainer to be odd and counter-intuitive. It leads to customizations being ignored in unpredictable ways. Overall, if the user defines a loss function, they expect that function to be used, rather than ignored. Therefore, the trainer kwarg should take first priority.
### Your contribution
User defined loss functions should come first
```
# User-defined compute_loss function
if self.compute_loss_func is not None:
# Check other conditions here
```
I could implement such a change, if needed. | {
"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/40601/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/40601/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/40600 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40600/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40600/comments | https://api.github.com/repos/huggingface/transformers/issues/40600/events | https://github.com/huggingface/transformers/pull/40600 | 3,373,366,651 | PR_kwDOCUB6oc6mUnzp | 40,600 | Integrate colqwen2.5 using colqwen2 modelling code | {
"login": "sahil-kabir",
"id": 66221472,
"node_id": "MDQ6VXNlcjY2MjIxNDcy",
"avatar_url": "https://avatars.githubusercontent.com/u/66221472?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sahil-kabir",
"html_url": "https://github.com/sahil-kabir",
"followers_url": "https://api.github.com/users/sahil-kabir/followers",
"following_url": "https://api.github.com/users/sahil-kabir/following{/other_user}",
"gists_url": "https://api.github.com/users/sahil-kabir/gists{/gist_id}",
"starred_url": "https://api.github.com/users/sahil-kabir/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sahil-kabir/subscriptions",
"organizations_url": "https://api.github.com/users/sahil-kabir/orgs",
"repos_url": "https://api.github.com/users/sahil-kabir/repos",
"events_url": "https://api.github.com/users/sahil-kabir/events{/privacy}",
"received_events_url": "https://api.github.com/users/sahil-kabir/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-01T17:15:36 | 2025-10-19T03:25:33 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40600",
"html_url": "https://github.com/huggingface/transformers/pull/40600",
"diff_url": "https://github.com/huggingface/transformers/pull/40600.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40600.patch",
"merged_at": null
} | Main contributor: @sahil-kabir
Guided by: @PavloFesenko
# 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 #39549 [Is there plan to integrate ColQwen2.5 into Transformers?](https://github.com/huggingface/transformers/issues/39549)
[A PR](https://github.com/huggingface/transformers/pull/38391) was made on this but was closed because colqwen2.5 could be integrated without making a new class for it. This PR allows weights for colqwen2.5 to be imported using the existing colqwen2 class.
Edit:
Looks like passing in weights for colqwen2.5 and the config for Qwen2.5 works on its own. All I'm adding now is a integration test and documentation.
I made an endpoint with colqwen2.5 weights by merging the adpater weights from `vidore/colqwen2.5-v0.2` to `Qwen/Qwen2.5-VL-3B-Instruct` (As per the documentation on the model card for `vidore/colqwen2.5-v0.2`) and shooting those weights up to `Sahil-Kabir/colqwen2.5-v0.2-hf`. And moved some extra config files from `vidore/colqwen2.5-v0.2` over to`Sahil-Kabir/colqwen2.5-v0.2`.
```python
from peft import PeftModel
import torch
qwen_backbone = "Qwen/Qwen2.5-VL-3B-Instruct"
base_model = AutoModel.from_pretrained(
qwen_backbone,
device_map="cpu",
dtype=torch.bfloat16,
trust_remote_code=True,
)
peft_model = PeftModel.from_pretrained(base_model, "vidore/colqwen2.5-v0.2")
merged = peft_model.merge_and_unload()
merged.save_pretrained("merged_model")
```
I've added an integration test to use my endpoint and show that it works on the basic tests. The test I wrote is passing.
## 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. [here](https://github.com/huggingface/transformers/pull/38391#issuecomment-3208856230)
- [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?
Hey @yonigozlan, with minimal code changes, it looks like colqwen2.5 can be imported using the colqwen2 class. By running, `!python transformers/src/transformers/models/colqwen2/convert_colqwen2_weights_to_hf.py --model_id cjkasbdkjnlakb/colqwen2.5-v0.2-merged --original_vlm_name_or_path Qwen/Qwen2.5-VL-3B-Instruct --output_dir ./colqwen2_5 --using_qwen2_5` I'm able to get a model that seems to have similar outputs to the 2.5 in the [colpali engine repo](https://github.com/illuin-tech/colpali). @PavloFesenko and I are working on figuring out where one should import the colqwen2.5 adapter weights from, tests, and documentation for now.
<!-- 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/40600/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/40600/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40599 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40599/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40599/comments | https://api.github.com/repos/huggingface/transformers/issues/40599/events | https://github.com/huggingface/transformers/pull/40599 | 3,373,227,142 | PR_kwDOCUB6oc6mUJ7J | 40,599 | feat: support request cancellation | {
"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-01T16:13:44 | 2025-09-04T15:01:36 | 2025-09-04T15:01:29 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40599",
"html_url": "https://github.com/huggingface/transformers/pull/40599",
"diff_url": "https://github.com/huggingface/transformers/pull/40599.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40599.patch",
"merged_at": "2025-09-04T15:01:29"
} | Support client-side request cancellation, so server avoids continuing to generate tokens needlessly, saving resources (also helps server exit).
Will rebase when #40479 is merged to get clearer diff. | {
"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/40599/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/40599/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40598 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40598/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40598/comments | https://api.github.com/repos/huggingface/transformers/issues/40598/events | https://github.com/huggingface/transformers/pull/40598 | 3,373,179,857 | PR_kwDOCUB6oc6mT_sN | 40,598 | Pin torchcodec to 0.5 in AMD docker | {
"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 | null | [] | null | [] | 2025-09-01T15:56:56 | 2025-09-01T18:39:55 | 2025-09-01T18:39:55 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40598",
"html_url": "https://github.com/huggingface/transformers/pull/40598",
"diff_url": "https://github.com/huggingface/transformers/pull/40598.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40598.patch",
"merged_at": "2025-09-01T18:39:55"
} | Some tests are failing on the AMD CI ([like in this run](https://github.com/huggingface/transformers/actions/runs/17351600834/job/49258855146)) because of `torchcodec` with the follwing error:
```
FAILED tests/models/internvl/test_processing_internvl.py::InternVLProcessorTest::test_apply_chat_template_video_frame_sampling - RuntimeError: torchcodec_ns::get_frames_at_indices() Expected a value of type 'List[int]' for argument 'frame_indices' but instead found type 'Tensor'.
Position: 1
Value: tensor([ 50, 150, 250], dtype=torch.int32)
Declaration: torchcodec_ns::get_frames_at_indices(Tensor(a!) decoder, *, int[] frame_indices) -> (Tensor, Tensor, Tensor)
Cast error details: Unable to cast Python instance of type <class 'torch.Tensor'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
```
and pining `torchcodec` version to 0.5 in the docker, instead of the current 0.4, fixes this. Tested 0.6 as well and it did not work. | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40598/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/40598/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40597 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40597/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40597/comments | https://api.github.com/repos/huggingface/transformers/issues/40597/events | https://github.com/huggingface/transformers/pull/40597 | 3,373,135,293 | PR_kwDOCUB6oc6mT13W | 40,597 | Fix warning for output_attentions=True | {
"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-01T15:40:51 | 2025-09-04T11:13:13 | 2025-09-03T16:25:14 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40597",
"html_url": "https://github.com/huggingface/transformers/pull/40597",
"diff_url": "https://github.com/huggingface/transformers/pull/40597.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40597.patch",
"merged_at": "2025-09-03T16:25:14"
} | # What does this PR do?
With the `@check_model_inputs` decorator, we no longer check and fallback to the `eager` attention in the Attention module's code, let's notify users to set proper attention implementation. Otherwise, we are silently getting `None` attentions even if we specify `output_attentions=True` (because the default attention is `sdpa`)
| {
"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/40597/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/40597/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40596 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40596/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40596/comments | https://api.github.com/repos/huggingface/transformers/issues/40596/events | https://github.com/huggingface/transformers/pull/40596 | 3,373,134,554 | PR_kwDOCUB6oc6mT1s5 | 40,596 | Add wav2vec2_with_prosody model | {
"login": "Jakkrapun123",
"id": 113134065,
"node_id": "U_kgDOBr5J8Q",
"avatar_url": "https://avatars.githubusercontent.com/u/113134065?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Jakkrapun123",
"html_url": "https://github.com/Jakkrapun123",
"followers_url": "https://api.github.com/users/Jakkrapun123/followers",
"following_url": "https://api.github.com/users/Jakkrapun123/following{/other_user}",
"gists_url": "https://api.github.com/users/Jakkrapun123/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Jakkrapun123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jakkrapun123/subscriptions",
"organizations_url": "https://api.github.com/users/Jakkrapun123/orgs",
"repos_url": "https://api.github.com/users/Jakkrapun123/repos",
"events_url": "https://api.github.com/users/Jakkrapun123/events{/privacy}",
"received_events_url": "https://api.github.com/users/Jakkrapun123/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-01T15:40:40 | 2025-09-01T15:50:50 | 2025-09-01T15:50:50 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40596",
"html_url": "https://github.com/huggingface/transformers/pull/40596",
"diff_url": "https://github.com/huggingface/transformers/pull/40596.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40596.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": "Jakkrapun123",
"id": 113134065,
"node_id": "U_kgDOBr5J8Q",
"avatar_url": "https://avatars.githubusercontent.com/u/113134065?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Jakkrapun123",
"html_url": "https://github.com/Jakkrapun123",
"followers_url": "https://api.github.com/users/Jakkrapun123/followers",
"following_url": "https://api.github.com/users/Jakkrapun123/following{/other_user}",
"gists_url": "https://api.github.com/users/Jakkrapun123/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Jakkrapun123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jakkrapun123/subscriptions",
"organizations_url": "https://api.github.com/users/Jakkrapun123/orgs",
"repos_url": "https://api.github.com/users/Jakkrapun123/repos",
"events_url": "https://api.github.com/users/Jakkrapun123/events{/privacy}",
"received_events_url": "https://api.github.com/users/Jakkrapun123/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40596/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/40596/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40595 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40595/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40595/comments | https://api.github.com/repos/huggingface/transformers/issues/40595/events | https://github.com/huggingface/transformers/pull/40595 | 3,373,029,723 | PR_kwDOCUB6oc6mTfLQ | 40,595 | Reduce more test data fetch | {
"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-01T15:07:28 | 2025-09-01T16:07:20 | 2025-09-01T16:07:18 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40595",
"html_url": "https://github.com/huggingface/transformers/pull/40595",
"diff_url": "https://github.com/huggingface/transformers/pull/40595.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40595.patch",
"merged_at": "2025-09-01T16:07:18"
} | # What does this PR do?
Reduce more test data fetch:
- less connection errors
- faster test 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/40595/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/40595/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40594 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40594/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40594/comments | https://api.github.com/repos/huggingface/transformers/issues/40594/events | https://github.com/huggingface/transformers/pull/40594 | 3,372,861,006 | PR_kwDOCUB6oc6mS7FC | 40,594 | Remove `_from_config` init for clip/siglip submodules | {
"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-01T14:10:37 | 2025-09-01T14:35:43 | 2025-09-01T14:35:42 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40594",
"html_url": "https://github.com/huggingface/transformers/pull/40594",
"diff_url": "https://github.com/huggingface/transformers/pull/40594.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40594.patch",
"merged_at": null
} | # What does this PR do?
We no longer need it. Initially, this was introduced to pass the proper `attn_implementation`, but since we are no longer passing it, we can initialize directly from the class constructor.
| {
"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/40594/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/40594/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40593 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40593/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40593/comments | https://api.github.com/repos/huggingface/transformers/issues/40593/events | https://github.com/huggingface/transformers/pull/40593 | 3,372,562,793 | PR_kwDOCUB6oc6mR5_Q | 40,593 | Skip `TvpImageProcessingTest::test_slow_fast_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
} | [] | closed | false | null | [] | null | [] | 2025-09-01T12:47:03 | 2025-09-01T13:03:35 | 2025-09-01T13:03:34 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40593",
"html_url": "https://github.com/huggingface/transformers/pull/40593",
"diff_url": "https://github.com/huggingface/transformers/pull/40593.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40593.patch",
"merged_at": "2025-09-01T13:03:34"
} | Even with #40543, this test is still failing on CircleCI.
We really have to review this test in general, but let's just skip this for now. | {
"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/40593/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/40593/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40592 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40592/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40592/comments | https://api.github.com/repos/huggingface/transformers/issues/40592/events | https://github.com/huggingface/transformers/pull/40592 | 3,372,530,866 | PR_kwDOCUB6oc6mRy7j | 40,592 | [`Tests`] Fixup duplicated mrope logic | {
"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-01T12:38:52 | 2025-09-01T15:22:36 | 2025-09-01T15:22:34 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40592",
"html_url": "https://github.com/huggingface/transformers/pull/40592",
"diff_url": "https://github.com/huggingface/transformers/pull/40592.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40592.patch",
"merged_at": "2025-09-01T15:22:34"
} | Rebase/merge didnt remove the logic in #40490 because they were done at 2 different lines in the code
cc @zucchini-nlp | {
"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/40592/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/40592/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40591 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40591/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40591/comments | https://api.github.com/repos/huggingface/transformers/issues/40591/events | https://github.com/huggingface/transformers/pull/40591 | 3,372,471,387 | PR_kwDOCUB6oc6mRlrm | 40,591 | fix: gas for gemma fixed | {
"login": "yevvonlim",
"id": 47552580,
"node_id": "MDQ6VXNlcjQ3NTUyNTgw",
"avatar_url": "https://avatars.githubusercontent.com/u/47552580?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yevvonlim",
"html_url": "https://github.com/yevvonlim",
"followers_url": "https://api.github.com/users/yevvonlim/followers",
"following_url": "https://api.github.com/users/yevvonlim/following{/other_user}",
"gists_url": "https://api.github.com/users/yevvonlim/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yevvonlim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yevvonlim/subscriptions",
"organizations_url": "https://api.github.com/users/yevvonlim/orgs",
"repos_url": "https://api.github.com/users/yevvonlim/repos",
"events_url": "https://api.github.com/users/yevvonlim/events{/privacy}",
"received_events_url": "https://api.github.com/users/yevvonlim/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-01T12:22:17 | 2025-09-03T08:44:43 | 2025-09-03T08:44:15 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40591",
"html_url": "https://github.com/huggingface/transformers/pull/40591",
"diff_url": "https://github.com/huggingface/transformers/pull/40591.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40591.patch",
"merged_at": "2025-09-03T08:44:15"
} | # 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 #40564
## 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.
- [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
-->
@zach-huggingface, @SunMarc and @qgallouedec | {
"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/40591/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/40591/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40590 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40590/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40590/comments | https://api.github.com/repos/huggingface/transformers/issues/40590/events | https://github.com/huggingface/transformers/pull/40590 | 3,372,131,088 | PR_kwDOCUB6oc6mQbYi | 40,590 | Allow `remi-or` to `run-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-01T10:23:05 | 2025-09-01T10:31:57 | 2025-09-01T10:30:53 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40590",
"html_url": "https://github.com/huggingface/transformers/pull/40590",
"diff_url": "https://github.com/huggingface/transformers/pull/40590.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40590.patch",
"merged_at": "2025-09-01T10:30:53"
} | # What does this PR do?
Make AMD 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/40590/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/40590/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40589 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40589/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40589/comments | https://api.github.com/repos/huggingface/transformers/issues/40589/events | https://github.com/huggingface/transformers/pull/40589 | 3,372,118,206 | PR_kwDOCUB6oc6mQYfw | 40,589 | [Docs] Standardize ConvNeXt V2 model card | {
"login": "CYBki",
"id": 115028081,
"node_id": "U_kgDOBtswcQ",
"avatar_url": "https://avatars.githubusercontent.com/u/115028081?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/CYBki",
"html_url": "https://github.com/CYBki",
"followers_url": "https://api.github.com/users/CYBki/followers",
"following_url": "https://api.github.com/users/CYBki/following{/other_user}",
"gists_url": "https://api.github.com/users/CYBki/gists{/gist_id}",
"starred_url": "https://api.github.com/users/CYBki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CYBki/subscriptions",
"organizations_url": "https://api.github.com/users/CYBki/orgs",
"repos_url": "https://api.github.com/users/CYBki/repos",
"events_url": "https://api.github.com/users/CYBki/events{/privacy}",
"received_events_url": "https://api.github.com/users/CYBki/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-09-01T10:19:08 | 2025-09-18T17:17:42 | 2025-09-18T17:17:42 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40589",
"html_url": "https://github.com/huggingface/transformers/pull/40589",
"diff_url": "https://github.com/huggingface/transformers/pull/40589.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40589.patch",
"merged_at": null
} | # What does this PR do?
This PR standardizes the **ConvNeXt V2 model card** to match the Hugging Face model card template described in [#36979](https://github.com/huggingface/transformers/issues/36979).
### Changes
- Added standardized **header and badges**.
- Wrote a short, user-friendly **model description** explaining what makes ConvNeXt V2 unique.
- Added **Pipeline**, **AutoModel**, and **transformers-cli** usage examples.
- Included **quantization snippet** using `BitsAndBytesConfig`.
- Documented **intended uses, limitations, preprocessing details, and model variants**.
- Linked **resources** (paper, implementation, example scripts, Colab notebook).
- Added **citation** section.
### Notes
- ConvNeXt V2 is primarily `Conv2d`, so quantization benefits are modest (mainly the classifier head).
- Evaluation accuracy is sensitive to input resolution (224 vs 384).
### Checklist
- [x] Matches model card standardization template.
- [x] Doc-builder syntax preserved (`hfoptions`, `[!TIP]`, `[[autodoc]]`).
- [x] Examples tested with `facebook/convnextv2-tiny-1k-224`.
---
## Who can review?
Documentation: @stevhliu
| {
"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/40589/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/40589/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40588 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40588/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40588/comments | https://api.github.com/repos/huggingface/transformers/issues/40588/events | https://github.com/huggingface/transformers/pull/40588 | 3,372,022,030 | PR_kwDOCUB6oc6mQDfR | 40,588 | Fix llava image processor | {
"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-01T09:48:56 | 2025-09-01T11:32:58 | 2025-09-01T11:32:58 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40588",
"html_url": "https://github.com/huggingface/transformers/pull/40588",
"diff_url": "https://github.com/huggingface/transformers/pull/40588.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40588.patch",
"merged_at": "2025-09-01T11:32:58"
} | # What does this PR do?
Fixes https://github.com/huggingface/transformers/issues/40577. Llava next image processor fails when `do_pad=False` because the variable was not assigned | {
"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/40588/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/40588/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40587 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40587/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40587/comments | https://api.github.com/repos/huggingface/transformers/issues/40587/events | https://github.com/huggingface/transformers/pull/40587 | 3,371,864,776 | PR_kwDOCUB6oc6mPhee | 40,587 | feat(utils): add vision utils for embedding images and getting the hidden size | {
"login": "AmitMY",
"id": 5757359,
"node_id": "MDQ6VXNlcjU3NTczNTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/5757359?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AmitMY",
"html_url": "https://github.com/AmitMY",
"followers_url": "https://api.github.com/users/AmitMY/followers",
"following_url": "https://api.github.com/users/AmitMY/following{/other_user}",
"gists_url": "https://api.github.com/users/AmitMY/gists{/gist_id}",
"starred_url": "https://api.github.com/users/AmitMY/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AmitMY/subscriptions",
"organizations_url": "https://api.github.com/users/AmitMY/orgs",
"repos_url": "https://api.github.com/users/AmitMY/repos",
"events_url": "https://api.github.com/users/AmitMY/events{/privacy}",
"received_events_url": "https://api.github.com/users/AmitMY/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-09-01T09:01:17 | 2025-10-28T14:51:08 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40587",
"html_url": "https://github.com/huggingface/transformers/pull/40587",
"diff_url": "https://github.com/huggingface/transformers/pull/40587.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40587.patch",
"merged_at": null
} | # What does this PR do?
Adds generic utilities to understand the hidden size of an image encoder (currently need to write complex logic), and generically encode images using an image encoder.
Fixes #40457
## 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.
- [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?
@qubvel @zucchini-nlp @ArkVex | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40587/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/40587/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40586 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40586/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40586/comments | https://api.github.com/repos/huggingface/transformers/issues/40586/events | https://github.com/huggingface/transformers/pull/40586 | 3,371,860,458 | PR_kwDOCUB6oc6mPgjR | 40,586 | Allow custom args in `custom_generate` Callables and unify generation args structure | {
"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-01T08:59:56 | 2025-09-03T15:30:09 | 2025-09-03T15:30:09 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40586",
"html_url": "https://github.com/huggingface/transformers/pull/40586",
"diff_url": "https://github.com/huggingface/transformers/pull/40586.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40586.patch",
"merged_at": "2025-09-03T15:30:09"
} | This PR depends on #40518
The intent of this PR is to allow custom CALLABLE generation modes (that reuse generate's preparation step) to define their own parameters.
To do this, we need to inspect the signature and remove those parameters before `validate_model_kwargs`.
So to do this, we need some notion of `gen_mode_kwargs`. I introduce that and `logit_processor_kwargs`, which also allows as to move to a more functional stage-by-stage functional approach, as discussed before @gante. An added benefit is that now there are no weird parametrizations like `get_generation_mode(assistant_model)` but rather a much more natural `get_generation_mode(**gen_mode_kwargs)`
| {
"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/40586/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/40586/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40585 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40585/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40585/comments | https://api.github.com/repos/huggingface/transformers/issues/40585/events | https://github.com/huggingface/transformers/pull/40585 | 3,371,685,258 | PR_kwDOCUB6oc6mO7pL | 40,585 | Fix typos | {
"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-01T08:08:56 | 2025-09-01T13:47:17 | 2025-09-01T12:58:24 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40585",
"html_url": "https://github.com/huggingface/transformers/pull/40585",
"diff_url": "https://github.com/huggingface/transformers/pull/40585.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40585.patch",
"merged_at": "2025-09-01T12:58:24"
} | # What does this PR do?
Fix more typos. | {
"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/40585/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/40585/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40584 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40584/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40584/comments | https://api.github.com/repos/huggingface/transformers/issues/40584/events | https://github.com/huggingface/transformers/pull/40584 | 3,371,683,166 | PR_kwDOCUB6oc6mO7NZ | 40,584 | Fix `siglip` flaky `test_eager_matches_sdpa_inference` | {
"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-01T08:08:13 | 2025-09-01T13:17:27 | 2025-09-01T13:17:25 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40584",
"html_url": "https://github.com/huggingface/transformers/pull/40584",
"diff_url": "https://github.com/huggingface/transformers/pull/40584.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40584.patch",
"merged_at": "2025-09-01T13:17:25"
} | # What does this PR do?
This test is very flaky for dtype bf16 for 3 reasons:
- `bf16` has bad precision, especially when the magnitude is large
- siglip has larger outputs (than llama, clip, for example). The maximal abs. values for them:
- siglip: 3.0~4.0
- clip: 0.9 ~ 1.0
- llama: ~0.1
- siglip tests have sequence length 225, i.e. num_patches = (image_size: 30 / pat
- ch_size: 2) ** 2
All 3 combined cause it's much more flaky.
This PR address 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/40584/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/40584/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40583 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40583/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40583/comments | https://api.github.com/repos/huggingface/transformers/issues/40583/events | https://github.com/huggingface/transformers/pull/40583 | 3,371,505,652 | PR_kwDOCUB6oc6mOU54 | 40,583 | feat(deepseek_v3): Add grouped GEMM kernel for faster MoE computation | {
"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
} | [
{
"id": 7510456769,
"node_id": "LA_kwDOCUB6oc8AAAABv6h5wQ",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Mixture%20of%20Experts",
"name": "Mixture of Experts",
"color": "DDB5D0",
"default": false,
"description": ""
}
] | open | false | null | [] | null | [] | 2025-09-01T07:12:34 | 2025-10-30T05:41:18 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40583",
"html_url": "https://github.com/huggingface/transformers/pull/40583",
"diff_url": "https://github.com/huggingface/transformers/pull/40583.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40583.patch",
"merged_at": null
} | # What does this PR do?
This PR introduces an optimization that significantly accelerates the Mixture-of-Experts (MoE) layer computations in the `DeepseekV3` model by integrating the `grouped_gemm` library. This enhances performance for both training and inference.
The original MoE implementation processed expert networks sequentially using a Python loop, which created a performance bottleneck due to high GPU kernel launch overhead. This PR addresses that issue with the following key changes:
* **🚀 Grouped GEMM Kernel Integration**: A new `grouped_forward` operational path replaces the iterative Python loop over experts with a single, high-performance kernel call from the `grouped_gemm` library. This minimizes GPU overhead and maximizes throughput.
* **🧩 Expert Module Fusing**: To efficiently leverage the `grouped_gemm` kernel, this PR implements a `fuse_experts()` utility and a `GroupedDeepseekV3MLP` module. These tools combine the weights of multiple experts into a single, contiguous tensor, which is a prerequisite for the kernel.
* **⚙️ Configuration and Usability**: A `use_grouped_gemm` flag has been added to `DeepseekV3Config` to enable this optimization.
**Important**: If you set `use_grouped_gemm=True` directly when loading a model (e.g., in `.from_pretrained()`), you must provide a `state_dict` where the expert weights have already been fused. For standard checkpoints, the recommended workflow is to load the model normally and then call the `model.fuse_experts()` method.
* **⚠️ Dependency Handling**: The model now gracefully handles the optional dependency. If `use_grouped_gemm` is enabled but the library isn't found, it raises a clear `ImportError` with installation instructions.
-----
## **How to use**
1. **Install the required library**:
```bash
pip install git+https://github.com/fanshiqing/grouped_gemm@main
```
2. **Load a standard model and fuse the experts after loading** (Recommended method):
```python
from transformers import AutoModelForCausalLM
# Load a standard checkpoint from the Hub
model = AutoModelForCausalLM.from_pretrained(
"moonshotai/Moonlight-16B-A3B-Instruct",
device_map="cuda:0",
# Do not set use_grouped_gemm=True here
)
# Fuse the experts in-place
model.fuse_experts()
# The model is now optimized and ready for faster inference or training
```
For checkpoints that have already been saved in the fused format, you can load them directly by setting `use_grouped_gemm=True` in the `.from_pretrained()` call.
Fixes #40582
## 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 @Rocketknight1 | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40583/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/40583/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40582 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40582/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40582/comments | https://api.github.com/repos/huggingface/transformers/issues/40582/events | https://github.com/huggingface/transformers/issues/40582 | 3,371,402,241 | I_kwDOCUB6oc7I84QB | 40,582 | feat(deepseek_v3): Add grouped GEMM kernel for faster MoE computation | {
"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
} | [
{
"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-01T06:35:50 | 2025-09-15T06:37:04 | null | CONTRIBUTOR | null | null | null | null | ### Feature request
This is a proposal to integrate an optimized Mixture-of-Experts (MoE) forward pass for the `DeepseekV3` model using the `grouped_gemm` library. This new implementation significantly accelerates MoE computations by replacing the iterative execution over experts with a single, batched kernel call.
The key changes include:
* A new, optional `grouped_forward` path in the `DeepseekV3MoE` module that leverages fused expert weights.
* `GroupedLinear` and `GroupedDeepseekV3MLP` modules to store the weights of all experts in a single, contiguous tensor, enabling efficient processing.
* Public-facing `fuse_experts()` and `unfuse_experts()` methods on the `DeepseekV3ForCausalLM` model to allow users to dynamically switch between the standard PyTorch implementation and the optimized `grouped_gemm` version.
The implementation relies on the `grouped_gemm` library, which can be found here: [https://github.com/fanshiqing/grouped_gemm](https://github.com/fanshiqing/grouped_gemm).
### Motivation
The current MoE implementation in `DeepseekV3MoE` processes experts by iterating through them in a Python `for` loop. For models with a large number of experts, such as DeepseekV3, this approach becomes a major performance bottleneck due to the high overhead of launching multiple small GPU kernels. I'm always frustrated when a model's architecture can't be fully utilized due to inefficient, non-batched operations.
By leveraging a grouped GEMM kernel, we can perform the matrix multiplications for all activated experts in a single, batched operation. This minimizes kernel launch overhead and significantly improves GPU utilization, leading to substantial speedups for both training and inference. This optimization makes running and fine-tuning `DeepseekV3` more efficient and accessible.
### Your contribution
I will implement the full feature as detailed in the proposal. | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40582/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/40582/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/40581 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40581/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40581/comments | https://api.github.com/repos/huggingface/transformers/issues/40581/events | https://github.com/huggingface/transformers/pull/40581 | 3,371,267,247 | PR_kwDOCUB6oc6mNhYh | 40,581 | Fix `test_eager_matches_sdpa_inference` not run for `CLIP` | {
"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-01T05:40:22 | 2025-09-01T09:21:57 | 2025-09-01T09:21:56 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40581",
"html_url": "https://github.com/huggingface/transformers/pull/40581",
"diff_url": "https://github.com/huggingface/transformers/pull/40581.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40581.patch",
"merged_at": "2025-09-01T09:21:56"
} | # What does this PR do?
This PR fixes `test_eager_matches_sdpa_inference` not run for `CLIP` after #37498.
#37498 changed `tests/models/clip/test_modeling_clip.py` from
```python
def test_eager_matches_sdpa_inference(self, torch_dtype: str):
super().test_eager_matches_sdpa_inference(
torch_dtype=torch_dtype,
logit_keys=("last_hidden_state", "pooler_output", "image_embeds"),
use_attention_mask_options=(None,),
)
```
to
```python
def test_eager_matches_sdpa_inference(self, *args):
# adding only flaky decorator here and call the parent test method
return getattr(ModelTesterMixin, self._testMethodName)(self)
```
This change invalided the comment in a previous PR
https://github.com/huggingface/transformers/pull/36650#discussion_r1989959059
After #37498, this (parametrized) test is not run at all for CLIP with
> SKIPPED (CLIP-like models have a different `test_eager_matches_sdpa_infere...)
, while a commit before it, we still have 3 tests (the overwritten ones) being run.
| {
"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/40581/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/40581/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40580 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40580/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40580/comments | https://api.github.com/repos/huggingface/transformers/issues/40580/events | https://github.com/huggingface/transformers/pull/40580 | 3,370,841,177 | PR_kwDOCUB6oc6mMG-i | 40,580 | Fix inexistent imports | {
"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-01T00:34:47 | 2025-09-01T13:47:12 | 2025-09-01T13:05:00 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40580",
"html_url": "https://github.com/huggingface/transformers/pull/40580",
"diff_url": "https://github.com/huggingface/transformers/pull/40580.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40580.patch",
"merged_at": "2025-09-01T13:05:00"
} | # What does this PR do?
Fix inexistent imports in `src/transformers/__init__.py` | {
"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/40580/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/40580/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40579 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40579/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40579/comments | https://api.github.com/repos/huggingface/transformers/issues/40579/events | https://github.com/huggingface/transformers/pull/40579 | 3,370,800,479 | PR_kwDOCUB6oc6mL-YK | 40,579 | Enable more ruff UP rules | {
"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-01T00:05:45 | 2025-09-22T11:50:43 | 2025-09-02T15:30:00 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40579",
"html_url": "https://github.com/huggingface/transformers/pull/40579",
"diff_url": "https://github.com/huggingface/transformers/pull/40579.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40579.patch",
"merged_at": "2025-09-02T15:29:59"
} | # What does this PR do?
Fix and enable remaining `ruff` rules.
| {
"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/40579/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/40579/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40578 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40578/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40578/comments | https://api.github.com/repos/huggingface/transformers/issues/40578/events | https://github.com/huggingface/transformers/pull/40578 | 3,370,735,121 | PR_kwDOCUB6oc6mLxgn | 40,578 | Update Model card for SAM | {
"login": "marcoom",
"id": 23342677,
"node_id": "MDQ6VXNlcjIzMzQyNjc3",
"avatar_url": "https://avatars.githubusercontent.com/u/23342677?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/marcoom",
"html_url": "https://github.com/marcoom",
"followers_url": "https://api.github.com/users/marcoom/followers",
"following_url": "https://api.github.com/users/marcoom/following{/other_user}",
"gists_url": "https://api.github.com/users/marcoom/gists{/gist_id}",
"starred_url": "https://api.github.com/users/marcoom/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marcoom/subscriptions",
"organizations_url": "https://api.github.com/users/marcoom/orgs",
"repos_url": "https://api.github.com/users/marcoom/repos",
"events_url": "https://api.github.com/users/marcoom/events{/privacy}",
"received_events_url": "https://api.github.com/users/marcoom/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-31T22:29:55 | 2025-09-18T17:26:45 | 2025-09-18T17:26:45 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40578",
"html_url": "https://github.com/huggingface/transformers/pull/40578",
"diff_url": "https://github.com/huggingface/transformers/pull/40578.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40578.patch",
"merged_at": null
} | # What does this PR do?
This PR updates the model-card for the SAM (Segment Anything Model) model, as described in this [issue](https://github.com/huggingface/transformers/issues/36979), in an attempt to standardize all model-cards.
<!--
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
- [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).
- [ ] Did you write any new necessary tests?
## Who can review?
@stevhliu please let me know if there are any changes. Thanks!
<!-- 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/40578/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/40578/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40577 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40577/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40577/comments | https://api.github.com/repos/huggingface/transformers/issues/40577/events | https://github.com/huggingface/transformers/issues/40577 | 3,370,565,740 | I_kwDOCUB6oc7I5sBs | 40,577 | Llava-next image processor issue | {
"login": "EliSchwartz",
"id": 8597471,
"node_id": "MDQ6VXNlcjg1OTc0NzE=",
"avatar_url": "https://avatars.githubusercontent.com/u/8597471?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/EliSchwartz",
"html_url": "https://github.com/EliSchwartz",
"followers_url": "https://api.github.com/users/EliSchwartz/followers",
"following_url": "https://api.github.com/users/EliSchwartz/following{/other_user}",
"gists_url": "https://api.github.com/users/EliSchwartz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/EliSchwartz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EliSchwartz/subscriptions",
"organizations_url": "https://api.github.com/users/EliSchwartz/orgs",
"repos_url": "https://api.github.com/users/EliSchwartz/repos",
"events_url": "https://api.github.com/users/EliSchwartz/events{/privacy}",
"received_events_url": "https://api.github.com/users/EliSchwartz/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-31T18:37:11 | 2025-09-01T11:32:58 | 2025-09-01T11:32:58 | NONE | null | null | null | null | When llava-next slow processor is used with `do_pad=False`, `processed_images` is not assigned and it results in an error when it's later assigned to the dict.
```
if do_pad:
processed_images = self._pad_for_batching(new_images)
return BatchFeature(
data={"pixel_values": processed_images, "image_sizes": image_sizes}, tensor_type=return_tensors
)
```
https://github.com/huggingface/transformers/blob/b0db5a02f39ebd2ccffd7f8eb77091fda61f9a1e/src/transformers/models/llava_next/image_processing_llava_next.py#L717
See `/image_processing_llava_next_fast.py` for reference of expected behaviour. | {
"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/40577/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/40577/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/40576 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40576/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40576/comments | https://api.github.com/repos/huggingface/transformers/issues/40576/events | https://github.com/huggingface/transformers/pull/40576 | 3,370,430,269 | PR_kwDOCUB6oc6mK34j | 40,576 | Add BF16 support check for MUSA backend | {
"login": "fmo-mt",
"id": 118255577,
"node_id": "U_kgDOBwxv2Q",
"avatar_url": "https://avatars.githubusercontent.com/u/118255577?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fmo-mt",
"html_url": "https://github.com/fmo-mt",
"followers_url": "https://api.github.com/users/fmo-mt/followers",
"following_url": "https://api.github.com/users/fmo-mt/following{/other_user}",
"gists_url": "https://api.github.com/users/fmo-mt/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fmo-mt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fmo-mt/subscriptions",
"organizations_url": "https://api.github.com/users/fmo-mt/orgs",
"repos_url": "https://api.github.com/users/fmo-mt/repos",
"events_url": "https://api.github.com/users/fmo-mt/events{/privacy}",
"received_events_url": "https://api.github.com/users/fmo-mt/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-31T15:48:18 | 2025-09-15T05:54:22 | 2025-09-08T12:39:15 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40576",
"html_url": "https://github.com/huggingface/transformers/pull/40576",
"diff_url": "https://github.com/huggingface/transformers/pull/40576.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40576.patch",
"merged_at": "2025-09-08T12:39:15"
} | # 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 -->
Add BF16 support for `MUSA` backend.
We met an unsupported error when setting `bf16: True` in a sft config file, and found that `is_torch_bf16_gpu_available` doesn't check for `torch_musa` while `MUSA` do support that.
cc @muellerzr @SunMarc @amyeroberts | {
"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/40576/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/40576/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40575 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40575/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40575/comments | https://api.github.com/repos/huggingface/transformers/issues/40575/events | https://github.com/huggingface/transformers/pull/40575 | 3,370,222,529 | PR_kwDOCUB6oc6mKNOg | 40,575 | fix(serving): Handle nested content in Responses API | {
"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-08-31T12:36:28 | 2025-09-13T13:56:21 | 2025-09-13T13:56:21 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40575",
"html_url": "https://github.com/huggingface/transformers/pull/40575",
"diff_url": "https://github.com/huggingface/transformers/pull/40575.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40575.patch",
"merged_at": null
} | This PR fixes an issue where the `/v1/responses` endpoint in `transformers serve` would fail when receiving a nested input format.
Some OpenAI-compatible clients and SDKs serialize message content as a list of objects (e.g., `[{'type': 'input_text', 'text': '...'}]`) rather than a simple string. The previous implementation did not account for this, causing an error.
This change adds a pre-processing step to normalize the input, checking for nested content and combining it into a single string before it's passed to the model processor. This makes the endpoint more robust and improves compatibility with the broader OpenAI ecosystem.
A new integration test is added to verify the fix and prevent future regressions.
Fixes #40571
## 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?
<img width="1895" height="814" alt="Screenshot 2025-08-31 175903" src="https://github.com/user-attachments/assets/aedc1d58-ef8d-441a-a681-971d89dbf71f" />
<img width="1005" height="722" alt="Screenshot 2025-08-31 180105" src="https://github.com/user-attachments/assets/7c080a79-5bfc-413e-98e4-39ac919a8eeb" />
<img width="828" height="891" alt="Screenshot 2025-08-31 180257" src="https://github.com/user-attachments/assets/66639290-fc32-4730-a5ec-a89f85fb354e" />
## Who can review?
Anyone in the community is welcome to review. Based on the contribution guide, this change touches on serving and generation. | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40575/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/40575/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40574 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40574/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40574/comments | https://api.github.com/repos/huggingface/transformers/issues/40574/events | https://github.com/huggingface/transformers/pull/40574 | 3,370,195,611 | PR_kwDOCUB6oc6mKIIv | 40,574 | [i18n-ko] Add ko translation for jan | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-31T12:04:57 | 2025-09-06T00:10:26 | 2025-09-06T00:10:26 | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40574",
"html_url": "https://github.com/huggingface/transformers/pull/40574",
"diff_url": "https://github.com/huggingface/transformers/pull/40574.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40574.patch",
"merged_at": null
} | ## Summary
Add ko translation for `docs/source/en/jan.md`.
## Changes
- Add ko translation: `docs/source/ko/jan.md`
- Original file: `docs/source/en/jan.md`
| {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40574/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/40574/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40573 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40573/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40573/comments | https://api.github.com/repos/huggingface/transformers/issues/40573/events | https://github.com/huggingface/transformers/pull/40573 | 3,370,092,579 | PR_kwDOCUB6oc6mJz5U | 40,573 | Updated the model card for VideoMAE | {
"login": "mreraser",
"id": 33192762,
"node_id": "MDQ6VXNlcjMzMTkyNzYy",
"avatar_url": "https://avatars.githubusercontent.com/u/33192762?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mreraser",
"html_url": "https://github.com/mreraser",
"followers_url": "https://api.github.com/users/mreraser/followers",
"following_url": "https://api.github.com/users/mreraser/following{/other_user}",
"gists_url": "https://api.github.com/users/mreraser/gists{/gist_id}",
"starred_url": "https://api.github.com/users/mreraser/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mreraser/subscriptions",
"organizations_url": "https://api.github.com/users/mreraser/orgs",
"repos_url": "https://api.github.com/users/mreraser/repos",
"events_url": "https://api.github.com/users/mreraser/events{/privacy}",
"received_events_url": "https://api.github.com/users/mreraser/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-31T10:04:02 | 2025-09-18T17:19:40 | 2025-09-18T17:19:40 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40573",
"html_url": "https://github.com/huggingface/transformers/pull/40573",
"diff_url": "https://github.com/huggingface/transformers/pull/40573.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40573.patch",
"merged_at": null
} | # What does this PR do?
As suggested in this issue - https://github.com/huggingface/transformers/issues/36979#issue-2947704577 - this PR updates the documentation of the [VideoMAE](https://huggingface.co/docs/transformers/v4.56.0/en/model_doc/videomae#overview) model, which will now be aligned with the standardized format for all the docs.
## Check list
- [x] Include a brief description of the model
- [x] Ready to use code examples (`Pipeline` **not** available, `AutoModel` available, and `transformers-cli` **not** available)
- [x] For large models, provide a quantization example
- [ ] Include an attention mask visualizer
## Who can review?
Hello @stevhliu! 👋
I’ve completed the updates to this file.
Could you kindly review the changes and let me know if there’s anything that should be improved or corrected?
I’d be happy to make further adjustments based on your feedback.
Thank you very much for your time and guidance! | {
"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/40573/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/40573/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40572 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40572/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40572/comments | https://api.github.com/repos/huggingface/transformers/issues/40572/events | https://github.com/huggingface/transformers/issues/40572 | 3,370,079,101 | I_kwDOCUB6oc7I31N9 | 40,572 | transformers 4.21 AutoTokenizer.from_pretrained issue | {
"login": "gda2048",
"id": 32536575,
"node_id": "MDQ6VXNlcjMyNTM2NTc1",
"avatar_url": "https://avatars.githubusercontent.com/u/32536575?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gda2048",
"html_url": "https://github.com/gda2048",
"followers_url": "https://api.github.com/users/gda2048/followers",
"following_url": "https://api.github.com/users/gda2048/following{/other_user}",
"gists_url": "https://api.github.com/users/gda2048/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gda2048/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gda2048/subscriptions",
"organizations_url": "https://api.github.com/users/gda2048/orgs",
"repos_url": "https://api.github.com/users/gda2048/repos",
"events_url": "https://api.github.com/users/gda2048/events{/privacy}",
"received_events_url": "https://api.github.com/users/gda2048/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-08-31T09:49:31 | 2025-09-01T12:25:19 | 2025-09-01T12:25:19 | NONE | null | null | null | null | ### System Info
Docker image python:3.9
It works for transformers 4.22.0 correctly, but not 4.21.0-3.
### Who can help?
@ArthurZucker and @itazap
### 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
```
docker run -it --rm python:3.9 bash
pip install transformers==4.21.3
python
from transformers import AutoTokenizer
AutoTokenizer.from_pretrained("jamiehudson/579-STmodel-product-rem-v3a")
```
```Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/transformers/configuration_utils.py", line 623, in _get_config_dict
resolved_config_file = cached_path(
File "/usr/local/lib/python3.9/site-packages/transformers/utils/hub.py", line 284, in cached_path
output_path = get_from_cache(
File "/usr/local/lib/python3.9/site-packages/transformers/utils/hub.py", line 604, in get_from_cache
http_get(
File "/usr/local/lib/python3.9/site-packages/transformers/utils/hub.py", line 439, in http_get
r = requests.get(url, stream=True, proxies=proxies, headers=headers)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 367, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 438, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '/api/resolve-cache/models/jamiehudson/579-STmodel-product-rem-v3a/576358a6d1763be9788a1931404b17c56e7f32e1/config.json?%2Fjamiehudson%2F579-STmodel-product-rem-v3a%2Fresolve%2Fmain%2Fconfig.json=&etag=%222f1e21d7899bc85551c6041fc5f827a8de7e0596%22': No scheme supplied. Perhaps you meant https:///api/resolve-cache/models/jamiehudson/579-STmodel-product-rem-v3a/576358a6d1763be9788a1931404b17c56e7f32e1/config.json?%2Fjamiehudson%2F579-STmodel-product-rem-v3a%2Fresolve%2Fmain%2Fconfig.json=&etag=%222f1e21d7899bc85551c6041fc5f827a8de7e0596%22?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 547, in from_pretrained
config = AutoConfig.from_pretrained(
File "/usr/local/lib/python3.9/site-packages/transformers/models/auto/configuration_auto.py", line 725, in from_pretrained
config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/usr/local/lib/python3.9/site-packages/transformers/configuration_utils.py", line 561, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/usr/local/lib/python3.9/site-packages/transformers/configuration_utils.py", line 656, in _get_config_dict
raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like jamiehudson/579-STmodel-product-rem-v3a is not the path to a directory containing a config.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.```
### Expected behavior
It works for 4.22+ correctly. | {
"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/40572/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/40572/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/40571 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40571/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40571/comments | https://api.github.com/repos/huggingface/transformers/issues/40571/events | https://github.com/huggingface/transformers/issues/40571 | 3,369,869,754 | I_kwDOCUB6oc7I3CG6 | 40,571 | Responses API does not support input in (complex) format | {
"login": "adner",
"id": 1386704,
"node_id": "MDQ6VXNlcjEzODY3MDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1386704?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/adner",
"html_url": "https://github.com/adner",
"followers_url": "https://api.github.com/users/adner/followers",
"following_url": "https://api.github.com/users/adner/following{/other_user}",
"gists_url": "https://api.github.com/users/adner/gists{/gist_id}",
"starred_url": "https://api.github.com/users/adner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adner/subscriptions",
"organizations_url": "https://api.github.com/users/adner/orgs",
"repos_url": "https://api.github.com/users/adner/repos",
"events_url": "https://api.github.com/users/adner/events{/privacy}",
"received_events_url": "https://api.github.com/users/adner/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-08-31T06:02:50 | 2025-09-30T19:09:24 | 2025-09-30T19:09:24 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.56.0
- Platform: Linux-6.6.87.2-microsoft-standard-WSL2-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?): 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 GeForce RTX 3090
### 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
I am serving the **openai/gpt-oss-20b** model using `transformers serve` and is calling the experimental Responses API (/v1/responses). It works when the input attribute is a string, as in the example [here](https://huggingface.co/docs/transformers/main/serving#responses-api):
```
{
"model": "openai/gpt-oss-20b",
"stream": true,
"input": "Tell me a three sentence bedtime story about a unicorn."
}
```
But if the input is an array in the following format an exception is thrown:
```
{
"model":"openai/gpt-oss-20b",
"input":[{"type":"message","role":"user","content":[{"type":"input_text","text":"Tell me a joke!"}]}],
"stream":true
}
```
[Exception stack trace](https://github.com/user-attachments/files/22063435/stack.txt)
Note that the following also works currently:
```
{
"model": "openai/gpt-oss-20b",
"input": [
{
"role": "developer",
"content": "Talk like a pirate."
},
{
"role": "user",
"content": "Are semicolons optional in JavaScript?"
}
],
"stream":true
}
```
### Expected behavior
The expectation is that the Transformers Responses API should accept also this more complex format - in addition to the simpler formats that it already supports. Existing OpenAI Responses API clients (for example the [C# OpenAI SDK](https://github.com/openai/openai-dotnet)) serialize the messages to the more complex format, which means that these currently do not work with the Transformers Responses API. | {
"login": "adner",
"id": 1386704,
"node_id": "MDQ6VXNlcjEzODY3MDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1386704?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/adner",
"html_url": "https://github.com/adner",
"followers_url": "https://api.github.com/users/adner/followers",
"following_url": "https://api.github.com/users/adner/following{/other_user}",
"gists_url": "https://api.github.com/users/adner/gists{/gist_id}",
"starred_url": "https://api.github.com/users/adner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adner/subscriptions",
"organizations_url": "https://api.github.com/users/adner/orgs",
"repos_url": "https://api.github.com/users/adner/repos",
"events_url": "https://api.github.com/users/adner/events{/privacy}",
"received_events_url": "https://api.github.com/users/adner/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40571/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/40571/timeline | null | not_planned | {
"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/40570 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40570/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40570/comments | https://api.github.com/repos/huggingface/transformers/issues/40570/events | https://github.com/huggingface/transformers/pull/40570 | 3,369,628,685 | PR_kwDOCUB6oc6mIV5u | 40,570 | Remove old code for onnxruntime < 1.13.1 | {
"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-08-31T00:38:17 | 2025-08-31T00:51:32 | 2025-08-31T00:51:32 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40570",
"html_url": "https://github.com/huggingface/transformers/pull/40570",
"diff_url": "https://github.com/huggingface/transformers/pull/40570.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40570.patch",
"merged_at": null
} | # What does this PR do?
Currently onnxruntime > 4 is required. | {
"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/40570/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/40570/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40569 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40569/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40569/comments | https://api.github.com/repos/huggingface/transformers/issues/40569/events | https://github.com/huggingface/transformers/pull/40569 | 3,369,574,587 | PR_kwDOCUB6oc6mILp7 | 40,569 | fix: Passing empty list to `images`/`videos` for some multi-modal models | {
"login": "HollowMan6",
"id": 43995067,
"node_id": "MDQ6VXNlcjQzOTk1MDY3",
"avatar_url": "https://avatars.githubusercontent.com/u/43995067?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/HollowMan6",
"html_url": "https://github.com/HollowMan6",
"followers_url": "https://api.github.com/users/HollowMan6/followers",
"following_url": "https://api.github.com/users/HollowMan6/following{/other_user}",
"gists_url": "https://api.github.com/users/HollowMan6/gists{/gist_id}",
"starred_url": "https://api.github.com/users/HollowMan6/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HollowMan6/subscriptions",
"organizations_url": "https://api.github.com/users/HollowMan6/orgs",
"repos_url": "https://api.github.com/users/HollowMan6/repos",
"events_url": "https://api.github.com/users/HollowMan6/events{/privacy}",
"received_events_url": "https://api.github.com/users/HollowMan6/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-30T22:56:38 | 2025-10-13T08:42:07 | 2025-10-13T08:41:58 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40569",
"html_url": "https://github.com/huggingface/transformers/pull/40569",
"diff_url": "https://github.com/huggingface/transformers/pull/40569.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40569.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 -->
Alternative root fix for https://github.com/volcengine/verl/pull/3281
For example, this PR fixes the following error when we pass an empty list of `images` to Qwen2.5-VL:
```log
File "torchdata/stateful_dataloader/worker.py", line 242, in _worker_loop
data = fetcher.fetch(index) # type: ignore[union-attr]
File "torch/utils/data/_utils/fetch.py", line 52, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "torch/utils/data/_utils/fetch.py", line 52, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "verl/utils/dataset/rl_dataset.py", line 248, in __getitem__
model_inputs = self.processor(text=[raw_prompt], images=images, videos=videos, return_tensors="pt")
File "transformers/models/qwen2_5_vl/processing_qwen2_5_vl.py", line 150, in __call__
image_inputs = self.image_processor(images=images, **output_kwargs["images_kwargs"])
File "transformers/image_processing_utils_fast.py", line 637, in __call__
return self.preprocess(images, *args, **kwargs)
File "transformers/models/qwen2_vl/image_processing_qwen2_vl_fast.py", line 151, in preprocess
return super().preprocess(images, videos, **kwargs)
File "transformers/image_processing_utils_fast.py", line 662, in preprocess
return self._preprocess_image_like_inputs(
File "transformers/models/qwen2_vl/image_processing_qwen2_vl_fast.py", line 173, in _preprocess_image_like_inputs
batch_feature = self._preprocess(images, **kwargs)
File "transformers/models/qwen2_vl/image_processing_qwen2_vl_fast.py", line 211, in _preprocess
grouped_images, grouped_images_index = group_images_by_shape(images, disable_grouping=disable_grouping)
File "transformers/image_transforms.py", line 917, in group_images_by_shape
device = images[0][0].device if is_nested else images[0].device
IndexError: list index out of range
```
## 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.
@ArthurZucker, @amyeroberts, @qubvel
<!-- 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": "HollowMan6",
"id": 43995067,
"node_id": "MDQ6VXNlcjQzOTk1MDY3",
"avatar_url": "https://avatars.githubusercontent.com/u/43995067?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/HollowMan6",
"html_url": "https://github.com/HollowMan6",
"followers_url": "https://api.github.com/users/HollowMan6/followers",
"following_url": "https://api.github.com/users/HollowMan6/following{/other_user}",
"gists_url": "https://api.github.com/users/HollowMan6/gists{/gist_id}",
"starred_url": "https://api.github.com/users/HollowMan6/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HollowMan6/subscriptions",
"organizations_url": "https://api.github.com/users/HollowMan6/orgs",
"repos_url": "https://api.github.com/users/HollowMan6/repos",
"events_url": "https://api.github.com/users/HollowMan6/events{/privacy}",
"received_events_url": "https://api.github.com/users/HollowMan6/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40569/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/40569/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40568 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40568/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40568/comments | https://api.github.com/repos/huggingface/transformers/issues/40568/events | https://github.com/huggingface/transformers/pull/40568 | 3,369,546,465 | PR_kwDOCUB6oc6mIGcs | 40,568 | megatron_bert model card update referencing #36979 | {
"login": "ArkVex",
"id": 159469387,
"node_id": "U_kgDOCYFPSw",
"avatar_url": "https://avatars.githubusercontent.com/u/159469387?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArkVex",
"html_url": "https://github.com/ArkVex",
"followers_url": "https://api.github.com/users/ArkVex/followers",
"following_url": "https://api.github.com/users/ArkVex/following{/other_user}",
"gists_url": "https://api.github.com/users/ArkVex/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArkVex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArkVex/subscriptions",
"organizations_url": "https://api.github.com/users/ArkVex/orgs",
"repos_url": "https://api.github.com/users/ArkVex/repos",
"events_url": "https://api.github.com/users/ArkVex/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArkVex/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-30T22:01:51 | 2025-09-18T17:19:10 | 2025-09-18T17:19:09 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40568",
"html_url": "https://github.com/huggingface/transformers/pull/40568",
"diff_url": "https://github.com/huggingface/transformers/pull/40568.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40568.patch",
"merged_at": null
} | What does this PR do?
This PR updates and standardizes the model card for Megatron-BERT ([megatron_bert.md](vscode-file://vscode-app/c:/Users/Lenovo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html)) to follow the latest documentation template as outlined in [issue #36979](vscode-file://vscode-app/c:/Users/Lenovo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html).
Adds release info and feature badges
Improves the model description and usage examples
Includes quantization and attention mask visualizer sections
Adds autodoc blocks for all relevant classes
Enhances formatting and completeness for consistency with other model cards
Motivation:
This change improves the clarity, usability, and consistency of the Megatron-BERT documentation, making it easier for users to understand and apply the model.
Fixes:
Addresses the community documentation standardization request in #36979.
| {
"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/40568/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/40568/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40567 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40567/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40567/comments | https://api.github.com/repos/huggingface/transformers/issues/40567/events | https://github.com/huggingface/transformers/pull/40567 | 3,369,531,935 | PR_kwDOCUB6oc6mIDb3 | 40,567 | megatron_bert model card update referencing #36979 | {
"login": "ArkVex",
"id": 159469387,
"node_id": "U_kgDOCYFPSw",
"avatar_url": "https://avatars.githubusercontent.com/u/159469387?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArkVex",
"html_url": "https://github.com/ArkVex",
"followers_url": "https://api.github.com/users/ArkVex/followers",
"following_url": "https://api.github.com/users/ArkVex/following{/other_user}",
"gists_url": "https://api.github.com/users/ArkVex/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArkVex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArkVex/subscriptions",
"organizations_url": "https://api.github.com/users/ArkVex/orgs",
"repos_url": "https://api.github.com/users/ArkVex/repos",
"events_url": "https://api.github.com/users/ArkVex/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArkVex/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-30T21:44:00 | 2025-08-30T21:44:59 | 2025-08-30T21:44:26 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40567",
"html_url": "https://github.com/huggingface/transformers/pull/40567",
"diff_url": "https://github.com/huggingface/transformers/pull/40567.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40567.patch",
"merged_at": null
} | What does this PR do?
This PR updates and standardizes the model card for Megatron-BERT ([megatron_bert.md](vscode-file://vscode-app/c:/Users/Lenovo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html)) to follow the latest documentation template as outlined in [issue #36979](vscode-file://vscode-app/c:/Users/Lenovo/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html).
Adds release info and feature badges
Improves the model description and usage examples
Includes quantization and attention mask visualizer sections
Adds autodoc blocks for all relevant classes
Enhances formatting and completeness for consistency with other model cards
Motivation:
This change improves the clarity, usability, and consistency of the Megatron-BERT documentation, making it easier for users to understand and apply the model.
Fixes:
Addresses the community documentation standardization request in #36979.
| {
"login": "ArkVex",
"id": 159469387,
"node_id": "U_kgDOCYFPSw",
"avatar_url": "https://avatars.githubusercontent.com/u/159469387?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArkVex",
"html_url": "https://github.com/ArkVex",
"followers_url": "https://api.github.com/users/ArkVex/followers",
"following_url": "https://api.github.com/users/ArkVex/following{/other_user}",
"gists_url": "https://api.github.com/users/ArkVex/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArkVex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArkVex/subscriptions",
"organizations_url": "https://api.github.com/users/ArkVex/orgs",
"repos_url": "https://api.github.com/users/ArkVex/repos",
"events_url": "https://api.github.com/users/ArkVex/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArkVex/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40567/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/40567/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40566 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40566/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40566/comments | https://api.github.com/repos/huggingface/transformers/issues/40566/events | https://github.com/huggingface/transformers/pull/40566 | 3,369,489,757 | PR_kwDOCUB6oc6mH7PG | 40,566 | Set `test_all_params_have_gradient=False` for `DeepseekV2ModelTest` | {
"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-08-30T20:41:08 | 2025-08-30T20:50:12 | 2025-08-30T20:46:31 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40566",
"html_url": "https://github.com/huggingface/transformers/pull/40566",
"diff_url": "https://github.com/huggingface/transformers/pull/40566.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40566.patch",
"merged_at": "2025-08-30T20:46:31"
} | # What does this PR do?
Same as #40530 | {
"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/40566/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/40566/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40565 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40565/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40565/comments | https://api.github.com/repos/huggingface/transformers/issues/40565/events | https://github.com/huggingface/transformers/pull/40565 | 3,369,429,459 | PR_kwDOCUB6oc6mHuqi | 40,565 | fix MetaCLIP 2 wrong link & wrong model names in the docstrings | {
"login": "voidism",
"id": 26344602,
"node_id": "MDQ6VXNlcjI2MzQ0NjAy",
"avatar_url": "https://avatars.githubusercontent.com/u/26344602?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/voidism",
"html_url": "https://github.com/voidism",
"followers_url": "https://api.github.com/users/voidism/followers",
"following_url": "https://api.github.com/users/voidism/following{/other_user}",
"gists_url": "https://api.github.com/users/voidism/gists{/gist_id}",
"starred_url": "https://api.github.com/users/voidism/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/voidism/subscriptions",
"organizations_url": "https://api.github.com/users/voidism/orgs",
"repos_url": "https://api.github.com/users/voidism/repos",
"events_url": "https://api.github.com/users/voidism/events{/privacy}",
"received_events_url": "https://api.github.com/users/voidism/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-30T19:26:20 | 2025-09-03T15:03:59 | 2025-09-03T12:53:56 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40565",
"html_url": "https://github.com/huggingface/transformers/pull/40565",
"diff_url": "https://github.com/huggingface/transformers/pull/40565.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40565.patch",
"merged_at": "2025-09-03T12:53:56"
} | # What does this PR do?
The new model support for MetaCLIP 2 is done, but the documentation is with the wrong links and wrong model names.
The issue is already mentioned by @howardhsu in https://github.com/huggingface/transformers/issues/39826#issuecomment-3221359417_
> just realized the example code in the documentation has invalid path `openai/metaclip_2-vit-base-patch32`, should be `facebook/metaclip-2-worldwide-huge-quickgelu` ?
@NielsRogge tried to fix it in https://github.com/huggingface/transformers/issues/39826#issuecomment-3221606899_ but it seems not trivial to fix because the modular model converter caused it.
Also, as mentioned by @ArthurZucker in https://github.com/huggingface/transformers/issues/39826#issuecomment-3227189232_
> You can probably just overwrite the full docstring for now, there are no better solutions I think
I just finished exactly what @ArthurZucker suggested to overwrite the full docstring! 🤗
I didn't modify any functionality other than the docstrings.
Fixes #39826
## Before submitting
- [x] 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?
@ArthurZucker @howardhsu @NielsRogge
Documentation: @stevhliu
| {
"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/40565/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/40565/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40564 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40564/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40564/comments | https://api.github.com/repos/huggingface/transformers/issues/40564/events | https://github.com/huggingface/transformers/issues/40564 | 3,369,314,184 | I_kwDOCUB6oc7I06eI | 40,564 | Loss Scales Incorrectly with Gradient Accumulation Steps in Trainer (Gemma3 and other models) | {
"login": "yevvonlim",
"id": 47552580,
"node_id": "MDQ6VXNlcjQ3NTUyNTgw",
"avatar_url": "https://avatars.githubusercontent.com/u/47552580?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yevvonlim",
"html_url": "https://github.com/yevvonlim",
"followers_url": "https://api.github.com/users/yevvonlim/followers",
"following_url": "https://api.github.com/users/yevvonlim/following{/other_user}",
"gists_url": "https://api.github.com/users/yevvonlim/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yevvonlim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yevvonlim/subscriptions",
"organizations_url": "https://api.github.com/users/yevvonlim/orgs",
"repos_url": "https://api.github.com/users/yevvonlim/repos",
"events_url": "https://api.github.com/users/yevvonlim/events{/privacy}",
"received_events_url": "https://api.github.com/users/yevvonlim/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-08-30T17:11:25 | 2025-10-03T18:31:44 | 2025-09-03T08:44:16 | CONTRIBUTOR | null | null | null | null | ## System Info
- **transformers version**: 4.53
- **Python version**: 3.12
- **Platform**: Linux
- **Models affected**: google/gemma-3-12b-it (confirmed), likely affects other models
- **Training setup**: torchrun with DeepSpeed, LoRA fine-tuning
## Description
The HuggingFace Trainer exhibits incorrect loss scaling behavior when using gradient accumulation, where **logged loss values increase proportionally with `gradient_accumulation_steps`** instead of remaining consistent. This affects model training monitoring, convergence analysis, and hyperparameter tuning.
### Who can help?
@zach-huggingface @SunMarc
### Information
- [x] The official example scripts
- [ ] 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
### Minimal Example
```python
from transformers import Trainer, TrainingArguments, AutoTokenizer, AutoModelForCausalLM
from datasets import Dataset
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("google/gemma-3-12b-it")
tokenizer = AutoTokenizer.from_pretrained("google/gemma-3-12b-it")
tokenizer.padding_side = "right"
# Create dummy dataset
dummy_data = {
"input_ids": [[1] * 100] * 1000, # Simple repeated tokens
"labels": [[1] * 100] * 1000
}
dataset = Dataset.from_dict(dummy_data)
# Test with different gradient accumulation steps
for ga_steps in [1, 2, 4, 8]:
trainer = Trainer(
model=model,
train_dataset=dataset,
args=TrainingArguments(
output_dir=f"./test_ga_{ga_steps}",
per_device_train_batch_size=1,
gradient_accumulation_steps=ga_steps,
max_steps=10,
logging_steps=1,
save_steps=1000,
)
)
trainer.train()
```
### Expected behavior
Loss values should remain **mathematically consistent** regardless of `gradient_accumulation_steps`, as the effective batch size and optimization steps should be equivalent.
### Actual Behavior
- `gradient_accumulation_steps=8`: Loss = X
- `gradient_accumulation_steps=16`: Loss = 2X (exactly double)
- `gradient_accumulation_steps=32`: Loss = 4X
## Root Cause Analysis
The issue stems from the `model_accepts_loss_kwargs` parameter in the Trainer class:
this issue has been raised by [here](https://github.com/hiyouga/LLaMA-Factory/issues/7743) but it is not properly handled yet (transformers 4.56.0 has same issue) | {
"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/40564/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/40564/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/40563 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40563/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40563/comments | https://api.github.com/repos/huggingface/transformers/issues/40563/events | https://github.com/huggingface/transformers/pull/40563 | 3,369,113,636 | PR_kwDOCUB6oc6mGwjQ | 40,563 | fix to get output of intermediate output of dinov3 for more use case | {
"login": "SangbumChoi",
"id": 34004152,
"node_id": "MDQ6VXNlcjM0MDA0MTUy",
"avatar_url": "https://avatars.githubusercontent.com/u/34004152?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SangbumChoi",
"html_url": "https://github.com/SangbumChoi",
"followers_url": "https://api.github.com/users/SangbumChoi/followers",
"following_url": "https://api.github.com/users/SangbumChoi/following{/other_user}",
"gists_url": "https://api.github.com/users/SangbumChoi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SangbumChoi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SangbumChoi/subscriptions",
"organizations_url": "https://api.github.com/users/SangbumChoi/orgs",
"repos_url": "https://api.github.com/users/SangbumChoi/repos",
"events_url": "https://api.github.com/users/SangbumChoi/events{/privacy}",
"received_events_url": "https://api.github.com/users/SangbumChoi/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-08-30T13:15:06 | 2025-08-30T13:16:02 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40563",
"html_url": "https://github.com/huggingface/transformers/pull/40563",
"diff_url": "https://github.com/huggingface/transformers/pull/40563.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40563.patch",
"merged_at": null
} | # What does this PR do?
@qubvel @yonigozlan Can anyone review this simple PR?
since DINOv3 has alot of use case the output format should be enables to return intermediate hidden_states.
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
-->
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40563/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/40563/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40562 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40562/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40562/comments | https://api.github.com/repos/huggingface/transformers/issues/40562/events | https://github.com/huggingface/transformers/pull/40562 | 3,369,085,016 | PR_kwDOCUB6oc6mGrJQ | 40,562 | Add sequence classification support for small Gemma 3 text models | {
"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-08-30T12:34:42 | 2025-09-11T08:26:24 | 2025-09-04T09:45:00 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40562",
"html_url": "https://github.com/huggingface/transformers/pull/40562",
"diff_url": "https://github.com/huggingface/transformers/pull/40562.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40562.patch",
"merged_at": "2025-09-04T09:45:00"
} | # What does this PR do?
Add Gemma3TextForSequenceClassification for Gemma3 small text models following generic practice
Testing:
- Tested with single-node option, loss curve and AUC are all expected with no issue.
- All testes passed
- make fixup passed
Fixes #40554
## 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.
- [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": "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/40562/reactions",
"total_count": 2,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 2,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40562/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40561 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40561/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40561/comments | https://api.github.com/repos/huggingface/transformers/issues/40561/events | https://github.com/huggingface/transformers/pull/40561 | 3,369,011,911 | PR_kwDOCUB6oc6mGcvA | 40,561 | pin `pytest-rerunfailures<16.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
} | [] | closed | false | null | [] | null | [] | 2025-08-30T10:47:38 | 2025-08-30T10:58:46 | 2025-08-30T10:58:44 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40561",
"html_url": "https://github.com/huggingface/transformers/pull/40561",
"diff_url": "https://github.com/huggingface/transformers/pull/40561.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40561.patch",
"merged_at": "2025-08-30T10:58:44"
} | # What does this PR do?
Avoid failures due to https://github.com/pytest-dev/pytest-rerunfailures/issues/303 | {
"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/40561/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/40561/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40560 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40560/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40560/comments | https://api.github.com/repos/huggingface/transformers/issues/40560/events | https://github.com/huggingface/transformers/issues/40560 | 3,369,008,580 | I_kwDOCUB6oc7Izv3E | 40,560 | `train_tokens_per_second` is wrong after continuing from checkpoint | {
"login": "AmitMY",
"id": 5757359,
"node_id": "MDQ6VXNlcjU3NTczNTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/5757359?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AmitMY",
"html_url": "https://github.com/AmitMY",
"followers_url": "https://api.github.com/users/AmitMY/followers",
"following_url": "https://api.github.com/users/AmitMY/following{/other_user}",
"gists_url": "https://api.github.com/users/AmitMY/gists{/gist_id}",
"starred_url": "https://api.github.com/users/AmitMY/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AmitMY/subscriptions",
"organizations_url": "https://api.github.com/users/AmitMY/orgs",
"repos_url": "https://api.github.com/users/AmitMY/repos",
"events_url": "https://api.github.com/users/AmitMY/events{/privacy}",
"received_events_url": "https://api.github.com/users/AmitMY/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 1990918270,
"node_id": "MDU6TGFiZWwxOTkwOTE4Mjcw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Good%20First%20Issue",
"name": "Good First Issue",
"color": "bbf794",
"default": false,
"description": ""
},
{
"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-08-30T10:42:14 | 2025-09-29T14:22:36 | 2025-09-29T14:22:36 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.55.4
- Platform: macOS-15.6.1-arm64-arm-64bit
- Python version: 3.12.2
- Huggingface_hub version: 0.34.3
- Safetensors version: 0.5.3
- Accelerate version: 1.9.0
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.7.1 (NA)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: <fill in>
### Who can help?
@zach-huggingface @SunMarc
### Information
- [x] The official example scripts
- [ ] My own modified scripts
### Tasks
- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
When continuing `run_clm.py` from a checkpoint, it starts with insane tokens per second numbers, then slowly, eventually, goes down.
<img width="359" height="284" alt="Image" src="https://github.com/user-attachments/assets/99a4bf33-b061-4475-80ed-4a5ac89ed098" />
<img width="235" height="47" alt="Image" src="https://github.com/user-attachments/assets/8778dc76-7a14-4283-9a7b-9851fdf28bf7" /> c
### Expected behavior
It should be calculated with the local training run information, not the global one. The numbers should roughly be the same since it is the same exact setup. | {
"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/40560/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/40560/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/40559 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40559/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40559/comments | https://api.github.com/repos/huggingface/transformers/issues/40559/events | https://github.com/huggingface/transformers/issues/40559 | 3,368,980,103 | I_kwDOCUB6oc7Izo6H | 40,559 | Type resolution failed for <class '__main__.TrainingArguments'>. Try declaring the class in global scope or removing line of `from __future__ import annotations` which opts in Postponed Evaluation of Annotations (PEP 563) | {
"login": "Asunatan",
"id": 105210894,
"node_id": "U_kgDOBkVkDg",
"avatar_url": "https://avatars.githubusercontent.com/u/105210894?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Asunatan",
"html_url": "https://github.com/Asunatan",
"followers_url": "https://api.github.com/users/Asunatan/followers",
"following_url": "https://api.github.com/users/Asunatan/following{/other_user}",
"gists_url": "https://api.github.com/users/Asunatan/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Asunatan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Asunatan/subscriptions",
"organizations_url": "https://api.github.com/users/Asunatan/orgs",
"repos_url": "https://api.github.com/users/Asunatan/repos",
"events_url": "https://api.github.com/users/Asunatan/events{/privacy}",
"received_events_url": "https://api.github.com/users/Asunatan/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-08-30T09:57:35 | 2025-09-01T12:40:21 | 2025-09-01T12:40:21 | NONE | null | null | null | null | ### System Info
### System info
transformers==4.56.0, Python 3.12.11, Linux (pip install)
I encountered this problem when using the latest version
`RuntimeError: Type resolution failed for <class '__main__.TrainingArguments'>. Try declaring the class in global scope or removing line of from __future__ import annotations which opts in Postponed Evaluation of Annotations (PEP 563)`
The exact code runs fine with transformers 4.55.4.
### 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
```
import transformers
from dataclasses import dataclass, field
@dataclass
class TrainingArguments(transformers.TrainingArguments):
dataloader_num_workers: int = field(
default=1,
metadata={"help": "Number of subprocesses to use for data loading (PyTorch only). 0 means that the data will be loaded in the main process."}
)
def train():
parser = transformers.HfArgumentParser((TrainingArguments,))
return parser.parse_args_into_dataclasses()
if __name__ == "__main__":
train()
```
### Expected behavior
`RuntimeError: Type resolution failed for <class '__main__.TrainingArguments'>. Try declaring the class in global scope or removing line of from __future__ import annotations which opts in Postponed Evaluation of Annotations (PEP 563)` | {
"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/40559/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/40559/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/40558 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40558/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40558/comments | https://api.github.com/repos/huggingface/transformers/issues/40558/events | https://github.com/huggingface/transformers/pull/40558 | 3,368,804,412 | PR_kwDOCUB6oc6mF1Ue | 40,558 | 🌐 [i18n-KO] Translated `code_llama.md` to Korean | {
"login": "Judy-Choi",
"id": 53294075,
"node_id": "MDQ6VXNlcjUzMjk0MDc1",
"avatar_url": "https://avatars.githubusercontent.com/u/53294075?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Judy-Choi",
"html_url": "https://github.com/Judy-Choi",
"followers_url": "https://api.github.com/users/Judy-Choi/followers",
"following_url": "https://api.github.com/users/Judy-Choi/following{/other_user}",
"gists_url": "https://api.github.com/users/Judy-Choi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Judy-Choi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Judy-Choi/subscriptions",
"organizations_url": "https://api.github.com/users/Judy-Choi/orgs",
"repos_url": "https://api.github.com/users/Judy-Choi/repos",
"events_url": "https://api.github.com/users/Judy-Choi/events{/privacy}",
"received_events_url": "https://api.github.com/users/Judy-Choi/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-30T06:22:41 | 2025-10-16T18:27:46 | 2025-10-16T18:27:46 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40558",
"html_url": "https://github.com/huggingface/transformers/pull/40558",
"diff_url": "https://github.com/huggingface/transformers/pull/40558.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40558.patch",
"merged_at": "2025-10-16T18:27:46"
} | <!-- PR의 제목은 "🌐 [i18n-KO] Translated `<your_file>.md` to Korean" 으로 부탁드립니다 -->
# What does this PR do?
Translated the `code_llama.md` file of the documentation to Korean.
Thank you in advance for your review.
Part of https://github.com/huggingface/transformers/issues/20179
## Before reviewing
- [x] Check for missing / redundant translations (번역 누락/중복 검사)
- [x] Grammar Check (맞춤법 검사)
- [x] Review or Add new terms to glossary (용어 확인 및 추가)
- [x] Check Inline TOC (e.g. `[[lowercased-header]]`)
- [x] Check live-preview for gotchas (live-preview로 정상작동 확인)
## Who can review? (Initial)
<!-- 1. 위 체크가 모두 완료된 뒤에만 KREW 팀원들에게 리뷰를 요청하는 아래 주석을 노출해주세요!-->
May you please review this PR?
<!-- @jungnerd, @luckyvickyricky, @chelsseeey, @skwh54, @maximizemaxwell, @D15M4S -->
@harheem, @nsbg, @Youngdong2, @xhaktm00, @judy-choi
<!-- @4N3MONE, @Kim-Ju-won, @ahnjj, @FacerAin, @ssum21, @TaskerJang, @HyunZ118 -->
<!-- @yijun-lee, @chhaewxn, @AhnJoonSung, @seopp, @pyapyapya -->
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?
## Who can review? (Final)
<!-- 2. KREW 팀원들의 리뷰가 끝난 후에 아래 주석을 노출해주세요! -->
@stevhliu May you please review this PR? | {
"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/40558/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/40558/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40557 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40557/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40557/comments | https://api.github.com/repos/huggingface/transformers/issues/40557/events | https://github.com/huggingface/transformers/pull/40557 | 3,368,398,776 | PR_kwDOCUB6oc6mEipC | 40,557 | Fix crash when executing MambaCache sample code | {
"login": "torotoki",
"id": 989899,
"node_id": "MDQ6VXNlcjk4OTg5OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/989899?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/torotoki",
"html_url": "https://github.com/torotoki",
"followers_url": "https://api.github.com/users/torotoki/followers",
"following_url": "https://api.github.com/users/torotoki/following{/other_user}",
"gists_url": "https://api.github.com/users/torotoki/gists{/gist_id}",
"starred_url": "https://api.github.com/users/torotoki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/torotoki/subscriptions",
"organizations_url": "https://api.github.com/users/torotoki/orgs",
"repos_url": "https://api.github.com/users/torotoki/repos",
"events_url": "https://api.github.com/users/torotoki/events{/privacy}",
"received_events_url": "https://api.github.com/users/torotoki/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-29T22:47:17 | 2025-09-10T04:36:21 | 2025-09-09T16:44:49 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40557",
"html_url": "https://github.com/huggingface/transformers/pull/40557",
"diff_url": "https://github.com/huggingface/transformers/pull/40557.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40557.patch",
"merged_at": "2025-09-09T16:44:49"
} | # 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.
-->
This PR updates the obsolete sample code of `MambaCache` that does not work.
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [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": "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/40557/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/40557/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40556 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40556/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40556/comments | https://api.github.com/repos/huggingface/transformers/issues/40556/events | https://github.com/huggingface/transformers/pull/40556 | 3,368,304,402 | PR_kwDOCUB6oc6mENl- | 40,556 | Fix collated reports upload filename | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T21:57:57 | 2025-08-30T07:35:52 | 2025-08-30T07:35:51 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40556",
"html_url": "https://github.com/huggingface/transformers/pull/40556",
"diff_url": "https://github.com/huggingface/transformers/pull/40556.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40556.patch",
"merged_at": "2025-08-30T07:35:51"
} | null | {
"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/40556/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/40556/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40555 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40555/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40555/comments | https://api.github.com/repos/huggingface/transformers/issues/40555/events | https://github.com/huggingface/transformers/pull/40555 | 3,367,573,197 | PR_kwDOCUB6oc6mB2_n | 40,555 | Simplify `get_*_features` methods + update docs | {
"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-08-29T17:31:12 | 2025-09-01T11:37:43 | 2025-09-01T11:37:43 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40555",
"html_url": "https://github.com/huggingface/transformers/pull/40555",
"diff_url": "https://github.com/huggingface/transformers/pull/40555.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40555.patch",
"merged_at": "2025-09-01T11:37:43"
} | # What does this PR do?
As per the title, unbloating the following methods to remove `output_*` arguments that have no sense for these methods.
As a bonus: updating snippets to use `load_image` function instead of PIL + requests | {
"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/40555/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/40555/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40554 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40554/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40554/comments | https://api.github.com/repos/huggingface/transformers/issues/40554/events | https://github.com/huggingface/transformers/issues/40554 | 3,367,566,515 | I_kwDOCUB6oc7IuPyz | 40,554 | Add sequence classification support for small Gemma 3 models | {
"login": "adamreichold",
"id": 12997846,
"node_id": "MDQ6VXNlcjEyOTk3ODQ2",
"avatar_url": "https://avatars.githubusercontent.com/u/12997846?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/adamreichold",
"html_url": "https://github.com/adamreichold",
"followers_url": "https://api.github.com/users/adamreichold/followers",
"following_url": "https://api.github.com/users/adamreichold/following{/other_user}",
"gists_url": "https://api.github.com/users/adamreichold/gists{/gist_id}",
"starred_url": "https://api.github.com/users/adamreichold/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adamreichold/subscriptions",
"organizations_url": "https://api.github.com/users/adamreichold/orgs",
"repos_url": "https://api.github.com/users/adamreichold/repos",
"events_url": "https://api.github.com/users/adamreichold/events{/privacy}",
"received_events_url": "https://api.github.com/users/adamreichold/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"
}
] | closed | false | null | [] | null | [] | 2025-08-29T17:27:58 | 2025-09-17T06:39:46 | 2025-09-04T09:45:01 | NONE | null | null | null | null | ### Feature request
While #39465 added support for larger Gemma 3 (4b parameters or more) via `Gemma3ForSequenceClassification`, it did not add a `Gemma3TextForSequenceClassification` as for example proposed in https://github.com/huggingface/transformers/issues/36755#issuecomment-2929098303. However this is necessary to use the small model variants with 1b and 270m parameters.
### Motivation
Especially the smallest model with 270m parameters might be an interesting replacement for older model architectures like DistilBERT in resource-constrained environments. We have seen reasonable performance in full-parameter conversation fine-tuning, but being able to use a task-specific head for sequence classification would improve things considerably.
### Your contribution
We could test proposed changes by adapting our existing training scripts which currently only work with 4b parameters or larger model variants. | {
"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/40554/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/40554/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/40553 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40553/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40553/comments | https://api.github.com/repos/huggingface/transformers/issues/40553/events | https://github.com/huggingface/transformers/pull/40553 | 3,367,563,055 | PR_kwDOCUB6oc6mB07C | 40,553 | 🔴🔴 [config] Add `get_sub_config` (in place of `get_text_config`) and fix related bugs | {
"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-08-29T17:26:19 | 2025-09-19T08:40:16 | 2025-09-19T08:40:15 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40553",
"html_url": "https://github.com/huggingface/transformers/pull/40553",
"diff_url": "https://github.com/huggingface/transformers/pull/40553.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40553.patch",
"merged_at": null
} | # What does this PR do?
This PR (🔴 = BC breaking):
1. Adds `config.get_sub_config()`. This function is an upgrade to `get_text_config`:
a. Allows model-agnostic extraction of different modalities in a single function, future-proofing its uses;
b. Uses heuristics to determine correct encoder/decoder and modality matches (as opposed to relying on hardcoded sub config names that could match). These heuristics prevent us from having to manually update matching names as new models come out. They also nudge future models towards the same patterns (👉 standardization)
c. Related to #40277: when pulling `encoder`/`decoder` attributes from older encoder-decoder configs, make sure to consider `config.attribute_map`
d. Sometimes we want any text config (e.g resizing embeddings), other times we want any decoder modality (e.g. setting up the kv cache)... and sometimes we want specifically the text decoder. `get_text_config` didn't support this level of control, but `get_sub_config` does 🤗
e. (b.) + (c.) + (d.) = several bug fixes + allow us to remove a few overwrites
2. 🔴 Deprecates `get_text_config`, replacing its calls by `get_sub_config(modality="text", ...)`. This replacement is BC-breaking because of 1.b. However, in most cases, it fixes subtle bugs.
3. Enables `SlidingWindowLayer`, the static one, on cross-attention cases (where no `cache_position` is provided).
4. Corrects `is_encoder_decoder` check in `generate` tests.
5. Fixes a few related corner cases in `test_generate_continue_from_inputs_embeds` and `test_past_key_values_format` (which allows us to delete skips/overwrites)
___________________________
This PR is a follow-up to #40454 (incomplete fix for the underlying issues, which ended up being quite complex)
Fixes #40644 | {
"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/40553/reactions",
"total_count": 4,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 2,
"confused": 0,
"heart": 2,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40553/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40552 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40552/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40552/comments | https://api.github.com/repos/huggingface/transformers/issues/40552/events | https://github.com/huggingface/transformers/pull/40552 | 3,367,266,333 | PR_kwDOCUB6oc6mA2QI | 40,552 | Fix CircleCI step passes in the case of pytest worker crash at test collection 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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T15:27:42 | 2025-09-01T09:33:25 | 2025-09-01T09:33:23 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40552",
"html_url": "https://github.com/huggingface/transformers/pull/40552",
"diff_url": "https://github.com/huggingface/transformers/pull/40552.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40552.patch",
"merged_at": "2025-09-01T09:33:23"
} | # What does this PR do?
No idea why pytest have exit code 0 in this case. Just adding a new step to check the content of `tests_output.txt` to see if there is any `crashed and worker restarting disabled` and fails that step instead if any. | {
"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/40552/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/40552/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40551 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40551/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40551/comments | https://api.github.com/repos/huggingface/transformers/issues/40551/events | https://github.com/huggingface/transformers/pull/40551 | 3,367,106,862 | PR_kwDOCUB6oc6mATz5 | 40,551 | Fix `GptOssModelTest::test_assisted_decoding_matches_greedy_search_1_same` | {
"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-08-29T14:38:18 | 2025-08-29T15:53:54 | 2025-08-29T15:53:53 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40551",
"html_url": "https://github.com/huggingface/transformers/pull/40551",
"diff_url": "https://github.com/huggingface/transformers/pull/40551.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40551.patch",
"merged_at": "2025-08-29T15:53:53"
} | # What does this PR do?
This test is flaky:
- the eps needs to be set to 1.0 to avoid large difference
- but even with this, we still get something > 5e-5 from time to time on CPU. On GPU, they are all very small , around 1e-9.
- no idea and just increate the atol/rtol to 1e-4 | {
"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/40551/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/40551/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40550 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40550/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40550/comments | https://api.github.com/repos/huggingface/transformers/issues/40550/events | https://github.com/huggingface/transformers/pull/40550 | 3,367,047,254 | PR_kwDOCUB6oc6mAGlj | 40,550 | Fix gpt-oss rope warning | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T14:22:00 | 2025-08-29T14:41:09 | 2025-08-29T14:40:33 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40550",
"html_url": "https://github.com/huggingface/transformers/pull/40550",
"diff_url": "https://github.com/huggingface/transformers/pull/40550.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40550.patch",
"merged_at": "2025-08-29T14:40:33"
} | # What does this PR do?
When initializing gpt-oss model, we would receive the following warning when it shouldn't be the case.
`config.rope_scaling['original_max_position_embeddings'], the pre-yarn context length, is unset. We will **assume** config.max_position_embeddings holds the pre-yarn context length. Some use cases may expect config.max_position_embeddings to hold the post-yarn context length (pre-yarn context length * factor) -- we recommend updating both fields for optimal downstream model usage.`
This happens because the config class was not correctly initialized compared to the one from the checkpoint. The warning was triggered when the default config class was initialized (e.g when calling `self.__class__()` for example)
cc @gante I'm not sure if this happens to other models or not | {
"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/40550/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/40550/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40549 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40549/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40549/comments | https://api.github.com/repos/huggingface/transformers/issues/40549/events | https://github.com/huggingface/transformers/pull/40549 | 3,366,945,812 | PR_kwDOCUB6oc6l_wnp | 40,549 | Standardize VitPose's MoE | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T13:49:48 | 2025-08-29T14:32:28 | 2025-08-29T14:32:26 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40549",
"html_url": "https://github.com/huggingface/transformers/pull/40549",
"diff_url": "https://github.com/huggingface/transformers/pull/40549.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40549.patch",
"merged_at": "2025-08-29T14:32:26"
} | null | {
"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/40549/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/40549/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40548 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40548/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40548/comments | https://api.github.com/repos/huggingface/transformers/issues/40548/events | https://github.com/huggingface/transformers/pull/40548 | 3,366,939,814 | PR_kwDOCUB6oc6l_vTj | 40,548 | Fix quite a lot of FA tests | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T13:47:46 | 2025-09-01T14:42:52 | 2025-09-01T14:42:51 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40548",
"html_url": "https://github.com/huggingface/transformers/pull/40548",
"diff_url": "https://github.com/huggingface/transformers/pull/40548.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40548.patch",
"merged_at": "2025-09-01T14:42:50"
} | # What does this PR do?
As per the title. For the following test:
```
pytest tests/models -k test_flash_attn_2_inference_equivalence
```
On main:
```
177 failed, 195 passed, 546 skipped
```
On this PR:
```
96 failed, 305 passed, 517 skipped
```
So it's far from perfect but still paves the way forward | {
"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/40548/reactions",
"total_count": 4,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 3,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40548/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40547 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40547/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40547/comments | https://api.github.com/repos/huggingface/transformers/issues/40547/events | https://github.com/huggingface/transformers/pull/40547 | 3,366,849,420 | PR_kwDOCUB6oc6l_b1L | 40,547 | Refactor Ernie 4.5's MoE | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T13:15:12 | 2025-08-29T15:34:52 | 2025-08-29T15:34:49 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40547",
"html_url": "https://github.com/huggingface/transformers/pull/40547",
"diff_url": "https://github.com/huggingface/transformers/pull/40547.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40547.patch",
"merged_at": "2025-08-29T15:34:49"
} | null | {
"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/40547/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/40547/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40546 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40546/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40546/comments | https://api.github.com/repos/huggingface/transformers/issues/40546/events | https://github.com/huggingface/transformers/pull/40546 | 3,366,773,640 | PR_kwDOCUB6oc6l_Lht | 40,546 | Implement VibeVoice | {
"login": "pengzhiliang",
"id": 26346329,
"node_id": "MDQ6VXNlcjI2MzQ2MzI5",
"avatar_url": "https://avatars.githubusercontent.com/u/26346329?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/pengzhiliang",
"html_url": "https://github.com/pengzhiliang",
"followers_url": "https://api.github.com/users/pengzhiliang/followers",
"following_url": "https://api.github.com/users/pengzhiliang/following{/other_user}",
"gists_url": "https://api.github.com/users/pengzhiliang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/pengzhiliang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pengzhiliang/subscriptions",
"organizations_url": "https://api.github.com/users/pengzhiliang/orgs",
"repos_url": "https://api.github.com/users/pengzhiliang/repos",
"events_url": "https://api.github.com/users/pengzhiliang/events{/privacy}",
"received_events_url": "https://api.github.com/users/pengzhiliang/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": ""
},
{
"id": 6470596964,
"node_id": "LA_kwDOCUB6oc8AAAABga15ZA",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Audio",
"name": "Audio",
"color": "760453",
"default": false,
"description": ""
}
] | open | false | null | [] | null | [] | 2025-08-29T12:47:34 | 2025-10-28T15:52:07 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40546",
"html_url": "https://github.com/huggingface/transformers/pull/40546",
"diff_url": "https://github.com/huggingface/transformers/pull/40546.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40546.patch",
"merged_at": null
} | # What does this PR do?
Merge the model from https://github.com/microsoft/VibeVoice/tree/main
HF:
https://huggingface.co/microsoft/VibeVoice-1.5B | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/40546/reactions",
"total_count": 5,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 3,
"confused": 0,
"heart": 0,
"rocket": 2,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/40546/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/40545 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40545/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40545/comments | https://api.github.com/repos/huggingface/transformers/issues/40545/events | https://github.com/huggingface/transformers/pull/40545 | 3,366,448,060 | PR_kwDOCUB6oc6l-EN0 | 40,545 | Fix gpt-oss router_indices in EP | {
"login": "jiqing-feng",
"id": 107918818,
"node_id": "U_kgDOBm614g",
"avatar_url": "https://avatars.githubusercontent.com/u/107918818?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jiqing-feng",
"html_url": "https://github.com/jiqing-feng",
"followers_url": "https://api.github.com/users/jiqing-feng/followers",
"following_url": "https://api.github.com/users/jiqing-feng/following{/other_user}",
"gists_url": "https://api.github.com/users/jiqing-feng/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jiqing-feng/subscriptions",
"organizations_url": "https://api.github.com/users/jiqing-feng/orgs",
"repos_url": "https://api.github.com/users/jiqing-feng/repos",
"events_url": "https://api.github.com/users/jiqing-feng/events{/privacy}",
"received_events_url": "https://api.github.com/users/jiqing-feng/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-08-29T11:02:06 | 2025-09-10T08:30:55 | 2025-09-10T08:30:55 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40545",
"html_url": "https://github.com/huggingface/transformers/pull/40545",
"diff_url": "https://github.com/huggingface/transformers/pull/40545.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40545.patch",
"merged_at": "2025-09-10T08:30:55"
} | The indices has been masked by `0`, but the `0` will be recognized as `experts[0]`. We need a new class specific for masking
I run gpt-oss with EP=2, and found both rank0 and rank1 computed expert 0
<img width="800" height="250" alt="image" src="https://github.com/user-attachments/assets/3c2f40b7-9852-4118-9356-39c246605582" />
After this PR, we can see the masking expert is num_expert (16) here, and 16 will be skipped.
<img width="928" height="438" alt="image" src="https://github.com/user-attachments/assets/d719cd98-1a4d-4257-a593-103dc32012dd" />
| {
"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/40545/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/40545/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40544 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40544/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40544/comments | https://api.github.com/repos/huggingface/transformers/issues/40544/events | https://github.com/huggingface/transformers/pull/40544 | 3,366,424,821 | PR_kwDOCUB6oc6l9_CC | 40,544 | Oupsy | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T10:54:22 | 2025-08-29T11:03:17 | 2025-08-29T10:59:49 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40544",
"html_url": "https://github.com/huggingface/transformers/pull/40544",
"diff_url": "https://github.com/huggingface/transformers/pull/40544.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40544.patch",
"merged_at": "2025-08-29T10:59:49"
} | # What does this PR do?
Need to pin greater or equal and smaller | {
"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/40544/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/40544/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40543 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40543/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40543/comments | https://api.github.com/repos/huggingface/transformers/issues/40543/events | https://github.com/huggingface/transformers/pull/40543 | 3,366,397,947 | PR_kwDOCUB6oc6l95Bo | 40,543 | Flaky CI is annoying | {
"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-08-29T10:46:21 | 2025-08-29T14:47:45 | 2025-08-29T14:47:45 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40543",
"html_url": "https://github.com/huggingface/transformers/pull/40543",
"diff_url": "https://github.com/huggingface/transformers/pull/40543.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40543.patch",
"merged_at": "2025-08-29T14:47:44"
} | # What does this PR do?
Mark TVP image processor test flaky, It fails a lot under PRs currently. cc @yonigozlan to investigate when you have time | {
"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/40543/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/40543/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40542 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40542/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40542/comments | https://api.github.com/repos/huggingface/transformers/issues/40542/events | https://github.com/huggingface/transformers/pull/40542 | 3,366,315,998 | PR_kwDOCUB6oc6l9nCk | 40,542 | Clean-up kernel loading and dispatch | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-08-29T10:16:40 | 2025-08-29T12:14:40 | 2025-08-29T12:14:38 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40542",
"html_url": "https://github.com/huggingface/transformers/pull/40542",
"diff_url": "https://github.com/huggingface/transformers/pull/40542.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40542.patch",
"merged_at": "2025-08-29T12:14:38"
} | # What does this PR do?
As per the title. This started to be quite complicated and convoluted to follow how `attn_implementation` are dispatched. This should simplify a bit
| {
"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/40542/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/40542/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/40541 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/40541/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/40541/comments | https://api.github.com/repos/huggingface/transformers/issues/40541/events | https://github.com/huggingface/transformers/pull/40541 | 3,366,295,667 | PR_kwDOCUB6oc6l9iih | 40,541 | Keypoint matching docs | {
"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-08-29T10:09:47 | 2025-09-05T15:24:58 | 2025-09-05T15:24:56 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/40541",
"html_url": "https://github.com/huggingface/transformers/pull/40541",
"diff_url": "https://github.com/huggingface/transformers/pull/40541.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/40541.patch",
"merged_at": "2025-09-05T15:24:56"
} | Added keypoint matching docs @sbucaille @stevhliu | {
"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/40541/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/40541/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.