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/38022 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38022/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38022/comments | https://api.github.com/repos/huggingface/transformers/issues/38022/events | https://github.com/huggingface/transformers/pull/38022 | 3,049,144,176 | PR_kwDOCUB6oc6VcWha | 38,022 | Skip `test_push_to_hub_with_saves_each_epoch` 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
} | [] | closed | false | null | [] | null | [] | 2025-05-08T14:14:11 | 2025-05-08T14:28:06 | 2025-05-08T14:26:24 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38022",
"html_url": "https://github.com/huggingface/transformers/pull/38022",
"diff_url": "https://github.com/huggingface/transformers/pull/38022.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38022.patch",
"merged_at": "2025-05-08T14:26:24"
} | # What does this PR do?
Need to check if it is staging hub issue or anything else. | {
"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/38022/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/38022/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38021 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38021/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38021/comments | https://api.github.com/repos/huggingface/transformers/issues/38021/events | https://github.com/huggingface/transformers/pull/38021 | 3,049,055,648 | PR_kwDOCUB6oc6VcDU0 | 38,021 | Update Loss Functions to Accept Tensor num_items_in_batch | {
"login": "NEREUScode",
"id": 174478950,
"node_id": "U_kgDOCmZWZg",
"avatar_url": "https://avatars.githubusercontent.com/u/174478950?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NEREUScode",
"html_url": "https://github.com/NEREUScode",
"followers_url": "https://api.github.com/users/NEREUScode/followers",
"following_url": "https://api.github.com/users/NEREUScode/following{/other_user}",
"gists_url": "https://api.github.com/users/NEREUScode/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NEREUScode/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NEREUScode/subscriptions",
"organizations_url": "https://api.github.com/users/NEREUScode/orgs",
"repos_url": "https://api.github.com/users/NEREUScode/repos",
"events_url": "https://api.github.com/users/NEREUScode/events{/privacy}",
"received_events_url": "https://api.github.com/users/NEREUScode/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T13:44:27 | 2025-05-08T21:40:41 | 2025-05-08T21:40:41 | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38021",
"html_url": "https://github.com/huggingface/transformers/pull/38021",
"diff_url": "https://github.com/huggingface/transformers/pull/38021.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38021.patch",
"merged_at": null
} | This PR updates the ForCausalLMLoss and ForMaskedLMLoss functions to handle num_items_in_batch as a torch.Tensor instead of an int, aligning with how the parameter is actually passed during training.
Changes:
Updated num_items_in_batch: Optional[int] → Optional[torch.Tensor] in both functions.
Applied .item() conversion when computing loss to retain compatibility with fixed_cross_entropy.
Preserved all existing comments and logic for clarity and maintainability.
| {
"login": "NEREUScode",
"id": 174478950,
"node_id": "U_kgDOCmZWZg",
"avatar_url": "https://avatars.githubusercontent.com/u/174478950?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NEREUScode",
"html_url": "https://github.com/NEREUScode",
"followers_url": "https://api.github.com/users/NEREUScode/followers",
"following_url": "https://api.github.com/users/NEREUScode/following{/other_user}",
"gists_url": "https://api.github.com/users/NEREUScode/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NEREUScode/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NEREUScode/subscriptions",
"organizations_url": "https://api.github.com/users/NEREUScode/orgs",
"repos_url": "https://api.github.com/users/NEREUScode/repos",
"events_url": "https://api.github.com/users/NEREUScode/events{/privacy}",
"received_events_url": "https://api.github.com/users/NEREUScode/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/38021/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/38021/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38020 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38020/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38020/comments | https://api.github.com/repos/huggingface/transformers/issues/38020/events | https://github.com/huggingface/transformers/pull/38020 | 3,048,955,518 | PR_kwDOCUB6oc6Vbthq | 38,020 | 上传 | {
"login": "diavu",
"id": 130695310,
"node_id": "U_kgDOB8pAjg",
"avatar_url": "https://avatars.githubusercontent.com/u/130695310?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/diavu",
"html_url": "https://github.com/diavu",
"followers_url": "https://api.github.com/users/diavu/followers",
"following_url": "https://api.github.com/users/diavu/following{/other_user}",
"gists_url": "https://api.github.com/users/diavu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/diavu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/diavu/subscriptions",
"organizations_url": "https://api.github.com/users/diavu/orgs",
"repos_url": "https://api.github.com/users/diavu/repos",
"events_url": "https://api.github.com/users/diavu/events{/privacy}",
"received_events_url": "https://api.github.com/users/diavu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T13:07:39 | 2025-05-08T13:22:30 | 2025-05-08T13:22:30 | NONE | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38020",
"html_url": "https://github.com/huggingface/transformers/pull/38020",
"diff_url": "https://github.com/huggingface/transformers/pull/38020.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38020.patch",
"merged_at": null
} | 上传
| {
"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/38020/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/38020/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38019 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38019/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38019/comments | https://api.github.com/repos/huggingface/transformers/issues/38019/events | https://github.com/huggingface/transformers/pull/38019 | 3,048,933,177 | PR_kwDOCUB6oc6Vbomi | 38,019 | Print commit SHA on slack message for new model notification. | {
"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-05-08T12:59:26 | 2025-05-08T13:26:21 | 2025-05-08T13:26:19 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38019",
"html_url": "https://github.com/huggingface/transformers/pull/38019",
"diff_url": "https://github.com/huggingface/transformers/pull/38019.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38019.patch",
"merged_at": "2025-05-08T13:26:19"
} | # What does this PR do?
Print commit SHA on slack message for new model notification. | {
"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/38019/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/38019/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38018 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38018/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38018/comments | https://api.github.com/repos/huggingface/transformers/issues/38018/events | https://github.com/huggingface/transformers/pull/38018 | 3,048,713,605 | PR_kwDOCUB6oc6Va4WR | 38,018 | Fix `Optional` typing | {
"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-05-08T11:33:40 | 2025-05-08T12:51:45 | 2025-05-08T12:51:45 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38018",
"html_url": "https://github.com/huggingface/transformers/pull/38018",
"diff_url": "https://github.com/huggingface/transformers/pull/38018.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38018.patch",
"merged_at": "2025-05-08T12:51:45"
} | # What does this PR do?
Make style CI green again
cc @ydshieh | {
"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/38018/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/38018/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38017 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38017/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38017/comments | https://api.github.com/repos/huggingface/transformers/issues/38017/events | https://github.com/huggingface/transformers/issues/38017 | 3,048,694,659 | I_kwDOCUB6oc61t2OD | 38,017 | Maybe the vocab_size can be duplicated to the mainconfig for PEFT to pick up | {
"login": "lancercat",
"id": 59994105,
"node_id": "MDQ6VXNlcjU5OTk0MTA1",
"avatar_url": "https://avatars.githubusercontent.com/u/59994105?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lancercat",
"html_url": "https://github.com/lancercat",
"followers_url": "https://api.github.com/users/lancercat/followers",
"following_url": "https://api.github.com/users/lancercat/following{/other_user}",
"gists_url": "https://api.github.com/users/lancercat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lancercat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lancercat/subscriptions",
"organizations_url": "https://api.github.com/users/lancercat/orgs",
"repos_url": "https://api.github.com/users/lancercat/repos",
"events_url": "https://api.github.com/users/lancercat/events{/privacy}",
"received_events_url": "https://api.github.com/users/lancercat/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T11:25:27 | 2025-07-06T08:02:55 | 2025-07-06T08:02:55 | NONE | null | null | null | null | https://github.com/huggingface/transformers/blob/06c16de3d3971e125232c2682ec99d282bb1a27d/src/transformers/models/gemma3/configuration_gemma3.py#L322
```
self.vocab_size=self.text_config.vocab_size;
```
Due to the following check in peft
https://github.com/huggingface/peft/blob/6c489499300c652a4990cfbcc18539417e73c262/src/peft/utils/save_and_load.py#L249 | {
"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/38017/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/38017/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/38016 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38016/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38016/comments | https://api.github.com/repos/huggingface/transformers/issues/38016/events | https://github.com/huggingface/transformers/pull/38016 | 3,048,685,372 | PR_kwDOCUB6oc6VayMm | 38,016 | Fix OneFormer integration test | {
"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-05-08T11:21:33 | 2025-05-12T14:44:40 | 2025-05-12T14:02:42 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38016",
"html_url": "https://github.com/huggingface/transformers/pull/38016",
"diff_url": "https://github.com/huggingface/transformers/pull/38016.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38016.patch",
"merged_at": "2025-05-12T14:02:42"
} | # What does this PR do?
Fix OneFormer integration test | {
"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/38016/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/38016/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38015 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38015/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38015/comments | https://api.github.com/repos/huggingface/transformers/issues/38015/events | https://github.com/huggingface/transformers/pull/38015 | 3,048,644,562 | PR_kwDOCUB6oc6VapTd | 38,015 | Fix linalg.norm for CovnNextV2 | {
"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
} | [
{
"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-05-08T11:04:13 | 2025-05-09T16:44:29 | 2025-05-09T16:44:29 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38015",
"html_url": "https://github.com/huggingface/transformers/pull/38015",
"diff_url": "https://github.com/huggingface/transformers/pull/38015.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38015.patch",
"merged_at": "2025-05-09T16:44:29"
} | # What does this PR do?
Bug introduced in
- https://github.com/huggingface/transformers/pull/37041
While we are normalizing on multiple dimensions
1. `torch.linlag.norm` much slower than `torch.norm`
2. `torch.linlag.norm` **is not equivalent** to `torch.norm`
Instead, `torch.linlag.vector_norm` should be used
Fixes: https://github.com/huggingface/transformers/issues/37748
cc @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/38015/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/38015/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38014 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38014/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38014/comments | https://api.github.com/repos/huggingface/transformers/issues/38014/events | https://github.com/huggingface/transformers/pull/38014 | 3,048,531,986 | PR_kwDOCUB6oc6VaQcs | 38,014 | fix(conversion): Fix size mismatch error during TF->PT model loading | {
"login": "arjunaskykok",
"id": 32124593,
"node_id": "MDQ6VXNlcjMyMTI0NTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/32124593?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arjunaskykok",
"html_url": "https://github.com/arjunaskykok",
"followers_url": "https://api.github.com/users/arjunaskykok/followers",
"following_url": "https://api.github.com/users/arjunaskykok/following{/other_user}",
"gists_url": "https://api.github.com/users/arjunaskykok/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arjunaskykok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arjunaskykok/subscriptions",
"organizations_url": "https://api.github.com/users/arjunaskykok/orgs",
"repos_url": "https://api.github.com/users/arjunaskykok/repos",
"events_url": "https://api.github.com/users/arjunaskykok/events{/privacy}",
"received_events_url": "https://api.github.com/users/arjunaskykok/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 1834054694,
"node_id": "MDU6TGFiZWwxODM0MDU0Njk0",
"url": "https://api.github.com/repos/huggingface/transformers/labels/TensorFlow",
"name": "TensorFlow",
"color": "FF6F00",
"default": false,
"description": "Anything TensorFlow"
}
] | closed | false | null | [] | null | [] | 2025-05-08T10:17:48 | 2025-05-10T11:11:47 | 2025-05-10T11:11:08 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38014",
"html_url": "https://github.com/huggingface/transformers/pull/38014",
"diff_url": "https://github.com/huggingface/transformers/pull/38014.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38014.patch",
"merged_at": "2025-05-10T11:11:08"
} | # What does this PR do?
Loading a PyTorch model from a saved TensorFlow checkpoint using
`from_pretrained(..., from_tf=True)` could fail with a
`RuntimeError: size mismatch`. The error indicated that weights like
position embeddings were expected to have the shape of word embeddings
(e.g., [vocab_size, hidden_size]).
This issue was triggered by recent changes that defaulted to initializing
the PyTorch model with meta tensors (`init_empty_weights`) during this
conversion process.
The root cause was in the tied weight handling logic within
`load_tf2_state_dict_in_pytorch_model` in `modeling_tf_pytorch_utils.py`.
Multiple distinct parameters initialized as meta tensors can share the same
`data_ptr() == 0`. The existing logic incorrectly identified these as tied
weights and reused the tensor loaded for the first parameter encountered
with `data_ptr() == 0` (often the word embeddings) for subsequent parameters
that also had `data_ptr() == 0`.
This fix modifies the tied weight check to explicitly skip cases where
`pt_weight.data_ptr() == 0`, preventing the incorrect reuse of tensors
for distinct meta parameters and resolving the size mismatch error.
Includes a unit test in `test_modeling_utils.py` to specifically verify
this scenario using `from_pretrained(..., from_tf=True)` with meta initialization.
Fixes #37786
## Who can review?
@Rocketknight1 @gante
| {
"login": "manueldeprada",
"id": 6536835,
"node_id": "MDQ6VXNlcjY1MzY4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/manueldeprada",
"html_url": "https://github.com/manueldeprada",
"followers_url": "https://api.github.com/users/manueldeprada/followers",
"following_url": "https://api.github.com/users/manueldeprada/following{/other_user}",
"gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions",
"organizations_url": "https://api.github.com/users/manueldeprada/orgs",
"repos_url": "https://api.github.com/users/manueldeprada/repos",
"events_url": "https://api.github.com/users/manueldeprada/events{/privacy}",
"received_events_url": "https://api.github.com/users/manueldeprada/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/38014/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/38014/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38013 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38013/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38013/comments | https://api.github.com/repos/huggingface/transformers/issues/38013/events | https://github.com/huggingface/transformers/pull/38013 | 3,048,489,484 | PR_kwDOCUB6oc6VaG5p | 38,013 | Qwen2.5-Omni: Update modeling_qwen2_5_omni.py to fix error when loading quantized weights with AutoAWQ. | {
"login": "tiger-of-shawn",
"id": 4829773,
"node_id": "MDQ6VXNlcjQ4Mjk3NzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4829773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tiger-of-shawn",
"html_url": "https://github.com/tiger-of-shawn",
"followers_url": "https://api.github.com/users/tiger-of-shawn/followers",
"following_url": "https://api.github.com/users/tiger-of-shawn/following{/other_user}",
"gists_url": "https://api.github.com/users/tiger-of-shawn/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tiger-of-shawn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tiger-of-shawn/subscriptions",
"organizations_url": "https://api.github.com/users/tiger-of-shawn/orgs",
"repos_url": "https://api.github.com/users/tiger-of-shawn/repos",
"events_url": "https://api.github.com/users/tiger-of-shawn/events{/privacy}",
"received_events_url": "https://api.github.com/users/tiger-of-shawn/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T10:04:02 | 2025-05-20T07:53:52 | 2025-05-20T07:53:51 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38013",
"html_url": "https://github.com/huggingface/transformers/pull/38013",
"diff_url": "https://github.com/huggingface/transformers/pull/38013.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38013.patch",
"merged_at": "2025-05-20T07:53:51"
} | Qwen2.5-Omni: Update modeling_qwen2_5_omni.py to fix loading quantized weights with AutoAWQ.
What does this PR do?
while loading AWQ quantized Qwen-Omni model with AutoAWQ, there will be an error as below:
Traceback (most recent call last):
File "/nas/yuehu/NEW/AutoAWQ/./examples/quantize_qwen_omni.py", line 188, in <module>
inference_quantized_model(quant_path)
File "/nas/yuehu/NEW/AutoAWQ/./examples/quantize_qwen_omni.py", line 123, in inference_quantized_model
model = AutoAWQForCausalLM.from_quantized(quant_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nas/yuehu/NEW/AutoAWQ/awq/models/auto.py", line 125, in from_quantized
return AWQ_CAUSAL_LM_MODEL_MAP[model_type].from_quantized(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nas/yuehu/NEW/AutoAWQ/awq/models/base.py", line 498, in from_quantized
model = target_cls.from_config(
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 440, in from_config
return model_class._from_config(config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 280, in _wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2023, in _from_config
model = cls(config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py", line 4386, in __init__
self.post_init()
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 1886, in post_init
self.init_weights()
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 3149, in init_weights
self.initialize_weights()
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2502, in initialize_weights
self.smart_apply(self._initialize_weights)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2493, in smart_apply
module.smart_apply(module._initialize_weights)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2493, in smart_apply
module.smart_apply(module._initialize_weights)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2495, in smart_apply
module.smart_apply(fn)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2495, in smart_apply
module.smart_apply(fn)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2495, in smart_apply
module.smart_apply(fn)
[Previous line repeated 1 more time]
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2496, in smart_apply
fn(self)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2470, in _initialize_weights
self._init_weights(module)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py", line 152, in _init_weights
module.weight.data.fill_(1.0)
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'data'
Fixes # (issue)
this PR can fix the above error.
Who can review?
@ArthurZucker @amyeroberts @qubvel
thanks for your reviewing. | {
"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/38013/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/38013/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38012 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38012/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38012/comments | https://api.github.com/repos/huggingface/transformers/issues/38012/events | https://github.com/huggingface/transformers/issues/38012 | 3,048,128,856 | I_kwDOCUB6oc61rsFY | 38,012 | special_image_mask handling can get hit by accidental same embedding value at certain dims | {
"login": "lancercat",
"id": 59994105,
"node_id": "MDQ6VXNlcjU5OTk0MTA1",
"avatar_url": "https://avatars.githubusercontent.com/u/59994105?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lancercat",
"html_url": "https://github.com/lancercat",
"followers_url": "https://api.github.com/users/lancercat/followers",
"following_url": "https://api.github.com/users/lancercat/following{/other_user}",
"gists_url": "https://api.github.com/users/lancercat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lancercat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lancercat/subscriptions",
"organizations_url": "https://api.github.com/users/lancercat/orgs",
"repos_url": "https://api.github.com/users/lancercat/repos",
"events_url": "https://api.github.com/users/lancercat/events{/privacy}",
"received_events_url": "https://api.github.com/users/lancercat/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T07:47:52 | 2025-05-08T14:30:30 | 2025-05-08T14:30:30 | NONE | null | null | null | null | https://github.com/huggingface/transformers/blob/5c47d08b0d6835b8d8fc1c06d9a1bc71f6e78ace/src/transformers/models/gemma3/modeling_gemma3.py#L1262
FWIS should be testing if the [whole vector] is same enough to the special token embedding,
instead of testing same at each dim,
which should be something like
```
if input_ids is None:
special_image_mask =((inputs_embeds - self.get_input_embeddings()(
torch.tensor(self.config.image_token_index, dtype=torch.long, device=inputs_embeds.device)
)).abs().sum(-1)<0.009).unsqueeze(-1);
else:
special_image_mask = (input_ids == self.config.image_token_index).unsqueeze(-1)
special_image_mask = special_image_mask.expand_as(inputs_embeds).to(inputs_embeds.device)
``` | {
"login": "lancercat",
"id": 59994105,
"node_id": "MDQ6VXNlcjU5OTk0MTA1",
"avatar_url": "https://avatars.githubusercontent.com/u/59994105?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lancercat",
"html_url": "https://github.com/lancercat",
"followers_url": "https://api.github.com/users/lancercat/followers",
"following_url": "https://api.github.com/users/lancercat/following{/other_user}",
"gists_url": "https://api.github.com/users/lancercat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lancercat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lancercat/subscriptions",
"organizations_url": "https://api.github.com/users/lancercat/orgs",
"repos_url": "https://api.github.com/users/lancercat/repos",
"events_url": "https://api.github.com/users/lancercat/events{/privacy}",
"received_events_url": "https://api.github.com/users/lancercat/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/38012/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/38012/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/38011 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38011/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38011/comments | https://api.github.com/repos/huggingface/transformers/issues/38011/events | https://github.com/huggingface/transformers/pull/38011 | 3,048,012,333 | PR_kwDOCUB6oc6VYel5 | 38,011 | update bnb tests | {
"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-05-08T06:57:19 | 2025-07-02T05:22:26 | 2025-05-08T20:35:25 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38011",
"html_url": "https://github.com/huggingface/transformers/pull/38011",
"diff_url": "https://github.com/huggingface/transformers/pull/38011.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38011.patch",
"merged_at": "2025-05-08T20:35:25"
} | Update bnb tests results as bnb has new kernels, the output will be slightly different, but still reasonable.
@SunMarc @ydshieh Please review it
cc @Titus-von-Koeller @matthewdouglas
| {
"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/38011/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/38011/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38010 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38010/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38010/comments | https://api.github.com/repos/huggingface/transformers/issues/38010/events | https://github.com/huggingface/transformers/pull/38010 | 3,048,000,608 | PR_kwDOCUB6oc6VYcDt | 38,010 | make `test_speculative_decoding_non_distil` device-agnostic | {
"login": "faaany",
"id": 24477841,
"node_id": "MDQ6VXNlcjI0NDc3ODQx",
"avatar_url": "https://avatars.githubusercontent.com/u/24477841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/faaany",
"html_url": "https://github.com/faaany",
"followers_url": "https://api.github.com/users/faaany/followers",
"following_url": "https://api.github.com/users/faaany/following{/other_user}",
"gists_url": "https://api.github.com/users/faaany/gists{/gist_id}",
"starred_url": "https://api.github.com/users/faaany/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/faaany/subscriptions",
"organizations_url": "https://api.github.com/users/faaany/orgs",
"repos_url": "https://api.github.com/users/faaany/repos",
"events_url": "https://api.github.com/users/faaany/events{/privacy}",
"received_events_url": "https://api.github.com/users/faaany/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T06:51:33 | 2025-05-08T19:20:18 | 2025-05-08T19:19:48 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38010",
"html_url": "https://github.com/huggingface/transformers/pull/38010",
"diff_url": "https://github.com/huggingface/transformers/pull/38010.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38010.patch",
"merged_at": "2025-05-08T19:19:48"
} | ## What does this PR do?
This test is not a cuda-specific test and can work on other GPUs, e.g. on XPU it can pass.
cc @ydshieh @yao-matrix | {
"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/38010/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/38010/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38009 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38009/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38009/comments | https://api.github.com/repos/huggingface/transformers/issues/38009/events | https://github.com/huggingface/transformers/pull/38009 | 3,047,874,821 | PR_kwDOCUB6oc6VYAea | 38,009 | enable generation fsdp/utils cases on XPU | {
"login": "yao-matrix",
"id": 7245027,
"node_id": "MDQ6VXNlcjcyNDUwMjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yao-matrix",
"html_url": "https://github.com/yao-matrix",
"followers_url": "https://api.github.com/users/yao-matrix/followers",
"following_url": "https://api.github.com/users/yao-matrix/following{/other_user}",
"gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions",
"organizations_url": "https://api.github.com/users/yao-matrix/orgs",
"repos_url": "https://api.github.com/users/yao-matrix/repos",
"events_url": "https://api.github.com/users/yao-matrix/events{/privacy}",
"received_events_url": "https://api.github.com/users/yao-matrix/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T05:44:48 | 2025-05-11T22:45:37 | 2025-05-09T20:52:41 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38009",
"html_url": "https://github.com/huggingface/transformers/pull/38009",
"diff_url": "https://github.com/huggingface/transformers/pull/38009.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38009.patch",
"merged_at": "2025-05-09T20:52:41"
} | null | {
"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/38009/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/38009/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38008 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38008/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38008/comments | https://api.github.com/repos/huggingface/transformers/issues/38008/events | https://github.com/huggingface/transformers/issues/38008 | 3,047,791,219 | I_kwDOCUB6oc61qZpz | 38,008 | Trainer Stuck at 0% Progress during Training on Multi-GPU Setup | {
"login": "yanho824",
"id": 92347120,
"node_id": "U_kgDOBYEa8A",
"avatar_url": "https://avatars.githubusercontent.com/u/92347120?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yanho824",
"html_url": "https://github.com/yanho824",
"followers_url": "https://api.github.com/users/yanho824/followers",
"following_url": "https://api.github.com/users/yanho824/following{/other_user}",
"gists_url": "https://api.github.com/users/yanho824/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yanho824/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yanho824/subscriptions",
"organizations_url": "https://api.github.com/users/yanho824/orgs",
"repos_url": "https://api.github.com/users/yanho824/repos",
"events_url": "https://api.github.com/users/yanho824/events{/privacy}",
"received_events_url": "https://api.github.com/users/yanho824/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-05-08T04:46:27 | 2025-06-15T08:02:40 | 2025-06-15T08:02:40 | NONE | null | null | null | null | ### System Info
- transformers version: 4.37.2
- Platform: Linux version 5.15.0-105-generic
- Python version: 3.10.17
- Huggingface_hub version: 0.31.1
- Safetensors version: 0.5.3
- Accelerate version: 0.26.0
- PyTorch version (GPU?): 2.1.2+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Machine: 4 x A800 GPUs
- NVIDIA-SMI: 535.171.04
### Who can help?
@ArthurZucker
@zach-huggingface
@SunMarc
### Information
- [ ] 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
I am running the following script:
> CUDA_VISIBLE_DEVICES=0,1,2,3` python svd_trainer.py --model_id meta-llama/Llama-2-7b-hf --target_ratio 0.4 --remapping
The core parts of the code that may be related to the issue are:
>
# training
data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=False)
from transformers import TrainingArguments
training_args = TrainingArguments(
output_dir= TA_tarined_model_output_dir,
num_train_epochs = TA_num_train_epochs,
evaluation_strategy = "epoch",
per_device_train_batch_size = 1,
per_device_eval_batch_size = 1,
warmup_steps = TA_warmup_steps,
lr_scheduler_type = "cosine",
seed = args.seed,
gradient_accumulation_steps = TA_gradient_accumulation_steps,
# load_best_model_at_end = True,
save_strategy = "no",
save_steps = 1000,
save_total_limit = 2,
remove_unused_columns=False,
# deepspeed =deepspeed_config
)
trainer = SVDTrainer(
model=model,
args=training_args,
train_dataset=tokenized_traindata,
eval_dataset=tokenized_valdata,
data_collator=data_collator,
)
model, train_dataloader, eval_dataloader = accelerator.prepare(
model, trainer.get_train_dataloader(), trainer.get_eval_dataloader()
)
trainer.train = accelerator.prepare(trainer.train)
# save setting
TA_tarined_model_output_dir.mkdir(parents=True, exist_ok=True)
output_json_path = TA_tarined_model_output_dir / "para_config.json"
data = {
"model_id": model_id,
"DATASET_NAME": DATASET_NAME,
"target_compression_ratio": target_compression_ratio,
"BETA": BETA,
"dataset_processing": {
"SEED": args.seed,
"SEQ_LEN": SEQ_LEN,
"NSAMPLES_train": NSAMPLES_train,
"NSAMPLES_val": NSAMPLES_val,
},
"training_settings": {
"TA_num_train_epochs": TA_num_train_epochs,
"TA_warmup_steps": TA_warmup_steps,
"TA_gradient_accumulation_steps": TA_gradient_accumulation_steps
},
"loss_function_settings": {
"lambda_reg": lambda_reg
},
"optimizer_settings": {
"scheduler_lr": scheduler_lr,
"scheduler_step_size": scheduler_step_size,
"scheduler_gamma": scheduler_gamma
# "scheduler_half_step_size": scheduler_half_step_size,
# "scheduler_divide": scheduler_divide
},
"dtype_settings": {
"model_load_dtype": "f16",
"computeSVD_dtype": "f32"
},
"no_svd_layer": model_no_svd_layer_dic[lower_id],
}
with open(output_json_path, "w") as json_file:
json.dump(data, json_file, indent=4)
print("training start, target_compression_ratio is ",target_compression_ratio, " , NGPUS is ", NGPUS)
trainer.train()
accelerator.wait_for_everyone()
It stuck at 0% more than 12 hours.

I wrote a test code to determine that Trainer can run on a single GPU but not on multiple GPUs. However, the program reports an error after disabling P2P using the solution in https://github.com/huggingface/transformers/issues/26724.

Also, I tried `export NCCL_P2P_LEVEL=NVL` but it makes the program report an error:

Here's how I checked the communication between the GPUs after `export NCCL_P2P_DISABLE=1`

I migrated the test code to another A800 server that is also non-multicard runnable.
### Expected behavior
If you have any insight or suggestions on how to resolve this issue, we would appreciate it.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/38008/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/38008/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/38007 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38007/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38007/comments | https://api.github.com/repos/huggingface/transformers/issues/38007/events | https://github.com/huggingface/transformers/issues/38007 | 3,047,635,396 | I_kwDOCUB6oc61pznE | 38,007 | Does Qwen_2_5_VL support variable length attention computation? | {
"login": "yingtongxiong",
"id": 45058324,
"node_id": "MDQ6VXNlcjQ1MDU4MzI0",
"avatar_url": "https://avatars.githubusercontent.com/u/45058324?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yingtongxiong",
"html_url": "https://github.com/yingtongxiong",
"followers_url": "https://api.github.com/users/yingtongxiong/followers",
"following_url": "https://api.github.com/users/yingtongxiong/following{/other_user}",
"gists_url": "https://api.github.com/users/yingtongxiong/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yingtongxiong/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yingtongxiong/subscriptions",
"organizations_url": "https://api.github.com/users/yingtongxiong/orgs",
"repos_url": "https://api.github.com/users/yingtongxiong/repos",
"events_url": "https://api.github.com/users/yingtongxiong/events{/privacy}",
"received_events_url": "https://api.github.com/users/yingtongxiong/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 | {
"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
} | [
{
"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
}
] | null | [] | 2025-05-08T02:38:21 | 2025-07-23T09:17:47 | 2025-07-23T09:17:47 | NONE | null | null | null | null | ### Feature request
Qwen_2_5_VL support variable length attention computation
### Motivation
Hello, I try to run qwen25_vl with packing samples, however, I found that it seems this function only passes the attention_mask, not the position_ids in [https://github.com/huggingface/transformers/blob/main/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py#L908](https://github.com/huggingface/transformers/blob/main/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py#L908). So I pass the position_ids to this function and met the illegal memory access. Finally, I found that the position_ids has been expanded 3 times in dim 0, so how can I use the position_ids, what if I want to use varlen flash attention? Would anyone be able to help me with this?
### Your contribution
no | {
"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/38007/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/38007/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/38006 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38006/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38006/comments | https://api.github.com/repos/huggingface/transformers/issues/38006/events | https://github.com/huggingface/transformers/pull/38006 | 3,047,555,473 | PR_kwDOCUB6oc6VW8Ty | 38,006 | enable mamba2 integration cases on xpu | {
"login": "yao-matrix",
"id": 7245027,
"node_id": "MDQ6VXNlcjcyNDUwMjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yao-matrix",
"html_url": "https://github.com/yao-matrix",
"followers_url": "https://api.github.com/users/yao-matrix/followers",
"following_url": "https://api.github.com/users/yao-matrix/following{/other_user}",
"gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions",
"organizations_url": "https://api.github.com/users/yao-matrix/orgs",
"repos_url": "https://api.github.com/users/yao-matrix/repos",
"events_url": "https://api.github.com/users/yao-matrix/events{/privacy}",
"received_events_url": "https://api.github.com/users/yao-matrix/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T01:34:27 | 2025-05-08T22:46:09 | 2025-05-08T19:48:09 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38006",
"html_url": "https://github.com/huggingface/transformers/pull/38006",
"diff_url": "https://github.com/huggingface/transformers/pull/38006.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38006.patch",
"merged_at": "2025-05-08T19:48:09"
} | all 4 cases passed.
@ydshieh , pls help review, thx.
| {
"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/38006/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/38006/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38005 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38005/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38005/comments | https://api.github.com/repos/huggingface/transformers/issues/38005/events | https://github.com/huggingface/transformers/pull/38005 | 3,047,454,698 | PR_kwDOCUB6oc6VWm_7 | 38,005 | enable utils test cases on XPU | {
"login": "yao-matrix",
"id": 7245027,
"node_id": "MDQ6VXNlcjcyNDUwMjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yao-matrix",
"html_url": "https://github.com/yao-matrix",
"followers_url": "https://api.github.com/users/yao-matrix/followers",
"following_url": "https://api.github.com/users/yao-matrix/following{/other_user}",
"gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions",
"organizations_url": "https://api.github.com/users/yao-matrix/orgs",
"repos_url": "https://api.github.com/users/yao-matrix/repos",
"events_url": "https://api.github.com/users/yao-matrix/events{/privacy}",
"received_events_url": "https://api.github.com/users/yao-matrix/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-08T00:09:55 | 2025-05-09T07:05:53 | 2025-05-09T06:45:01 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38005",
"html_url": "https://github.com/huggingface/transformers/pull/38005",
"diff_url": "https://github.com/huggingface/transformers/pull/38005.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38005.patch",
"merged_at": "2025-05-09T06:45:01"
} | @ydshieh @IlyasMoutawwakil , pls help review, thx. | {
"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/38005/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/38005/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38004 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38004/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38004/comments | https://api.github.com/repos/huggingface/transformers/issues/38004/events | https://github.com/huggingface/transformers/pull/38004 | 3,047,368,498 | PR_kwDOCUB6oc6VWT15 | 38,004 | Fix wording in `torchscript.md` | {
"login": "tosroka",
"id": 28148202,
"node_id": "MDQ6VXNlcjI4MTQ4MjAy",
"avatar_url": "https://avatars.githubusercontent.com/u/28148202?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tosroka",
"html_url": "https://github.com/tosroka",
"followers_url": "https://api.github.com/users/tosroka/followers",
"following_url": "https://api.github.com/users/tosroka/following{/other_user}",
"gists_url": "https://api.github.com/users/tosroka/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tosroka/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tosroka/subscriptions",
"organizations_url": "https://api.github.com/users/tosroka/orgs",
"repos_url": "https://api.github.com/users/tosroka/repos",
"events_url": "https://api.github.com/users/tosroka/events{/privacy}",
"received_events_url": "https://api.github.com/users/tosroka/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T23:14:32 | 2025-05-08T15:47:45 | 2025-05-08T15:47:45 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38004",
"html_url": "https://github.com/huggingface/transformers/pull/38004",
"diff_url": "https://github.com/huggingface/transformers/pull/38004.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38004.patch",
"merged_at": "2025-05-08T15:47:45"
} | # What does this PR do?
This PR improves documentation by fixing a small typo.
## 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. (doesn't apply)
- [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? (doesn't apply)
## Who can review?
Anybody, this is a very minor change.
| {
"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/38004/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/38004/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38003 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38003/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38003/comments | https://api.github.com/repos/huggingface/transformers/issues/38003/events | https://github.com/huggingface/transformers/issues/38003 | 3,047,090,130 | I_kwDOCUB6oc61nufS | 38,003 | Potential bug in Qwen 2/2.5 VL Image Preprocessor | {
"login": "ritwickchaudhry",
"id": 11583361,
"node_id": "MDQ6VXNlcjExNTgzMzYx",
"avatar_url": "https://avatars.githubusercontent.com/u/11583361?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ritwickchaudhry",
"html_url": "https://github.com/ritwickchaudhry",
"followers_url": "https://api.github.com/users/ritwickchaudhry/followers",
"following_url": "https://api.github.com/users/ritwickchaudhry/following{/other_user}",
"gists_url": "https://api.github.com/users/ritwickchaudhry/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ritwickchaudhry/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ritwickchaudhry/subscriptions",
"organizations_url": "https://api.github.com/users/ritwickchaudhry/orgs",
"repos_url": "https://api.github.com/users/ritwickchaudhry/repos",
"events_url": "https://api.github.com/users/ritwickchaudhry/events{/privacy}",
"received_events_url": "https://api.github.com/users/ritwickchaudhry/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T20:23:56 | 2025-05-14T10:28:23 | 2025-05-14T10:28:23 | CONTRIBUTOR | null | null | null | null | ERROR: type should be string, got "https://github.com/huggingface/transformers/blob/5c47d08b0d6835b8d8fc1c06d9a1bc71f6e78ace/src/transformers/models/qwen2_vl/image_processing_qwen2_vl.py#L278\n\nThe `temporal_patch_size` is used to group consecutive video frames. However, if the number of frames are not divisible, then the last frame is repeated. The current number of repetitions is `temporal_patch_size - 1`. While this will work for `temporal_patch_size = 2` but it wouldn't work for larger patch sizes.\n\nIn my opinion, the code should be modified to:\n```\nrepeats = np.repeat(patches[-1][np.newaxis], temporal_patch_size - (patches.shape[0] % temporal_patch_size), axis=0)\n```" | {
"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/38003/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/38003/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/38002 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38002/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38002/comments | https://api.github.com/repos/huggingface/transformers/issues/38002/events | https://github.com/huggingface/transformers/issues/38002 | 3,046,956,058 | I_kwDOCUB6oc61nNwa | 38,002 | [bug] `use_sliding_window` doesn't work as expected | {
"login": "ZhiyuLi-Nvidia",
"id": 195393437,
"node_id": "U_kgDOC6V3nQ",
"avatar_url": "https://avatars.githubusercontent.com/u/195393437?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ZhiyuLi-Nvidia",
"html_url": "https://github.com/ZhiyuLi-Nvidia",
"followers_url": "https://api.github.com/users/ZhiyuLi-Nvidia/followers",
"following_url": "https://api.github.com/users/ZhiyuLi-Nvidia/following{/other_user}",
"gists_url": "https://api.github.com/users/ZhiyuLi-Nvidia/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ZhiyuLi-Nvidia/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ZhiyuLi-Nvidia/subscriptions",
"organizations_url": "https://api.github.com/users/ZhiyuLi-Nvidia/orgs",
"repos_url": "https://api.github.com/users/ZhiyuLi-Nvidia/repos",
"events_url": "https://api.github.com/users/ZhiyuLi-Nvidia/events{/privacy}",
"received_events_url": "https://api.github.com/users/ZhiyuLi-Nvidia/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-05-07T19:24:03 | 2025-05-20T09:32:20 | 2025-05-20T09:32:20 | NONE | null | null | null | null | ### System Info
* transformer: main
* pytorch, cuda: anyversion
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
```
from transformers import AutoModelForCausalLM
import numpy as np
import torch
MODEL_NAME = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
input_ids = torch.randint(0, 100, (1, 8192))
with torch.no_grad():
output_raw = model(input_ids)
# correct situaion: should be the same as the original model since use_sliding_window is False
model_no_sliding = AutoModelForCausalLM.from_pretrained(MODEL_NAME, sliding_window=None)
with torch.no_grad():
output_non_sliding = model_no_sliding(input_ids)
np.testing.assert_allclose(output_raw.logits[:, :4096], output_non_sliding.logits[:, :4096])
# wrong: the logits are unexpectedly different with sliding_window=4096
np.testing.assert_allclose(output_raw.logits[:, 4096:], output_non_sliding.logits[:, 4096:])
```
### Expected behavior
# description
What is expected:
```
"sliding_window": 4096,
"use_sliding_window": false,
```
`use_sliding_window` is set as false in `deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B` [here](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B/blob/main/config.json#L20). We do expect sliding window is disabled. In other words, we should expect the same results even with different `sliding_window`.
However, the results are different in the repro script.
# Root cause
Attention Mask is changed according to `sliding_window` without respect on `use_sliding_window`.
https://github.com/huggingface/transformers/blob/3c0796aaeac722152836ea063d542a4c628a75be/src/transformers/models/qwen2/modeling_qwen2.py#L708-L715
If we add some printing under this conditional block, we can clearly see attention mask is changed even with `use_sliding_window=false` | {
"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/38002/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/38002/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/38001 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38001/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38001/comments | https://api.github.com/repos/huggingface/transformers/issues/38001/events | https://github.com/huggingface/transformers/pull/38001 | 3,046,392,745 | PR_kwDOCUB6oc6VS9Uv | 38,001 | [CSM] tiny fix on generation | {
"login": "eustlb",
"id": 94853470,
"node_id": "U_kgDOBadZXg",
"avatar_url": "https://avatars.githubusercontent.com/u/94853470?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eustlb",
"html_url": "https://github.com/eustlb",
"followers_url": "https://api.github.com/users/eustlb/followers",
"following_url": "https://api.github.com/users/eustlb/following{/other_user}",
"gists_url": "https://api.github.com/users/eustlb/gists{/gist_id}",
"starred_url": "https://api.github.com/users/eustlb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eustlb/subscriptions",
"organizations_url": "https://api.github.com/users/eustlb/orgs",
"repos_url": "https://api.github.com/users/eustlb/repos",
"events_url": "https://api.github.com/users/eustlb/events{/privacy}",
"received_events_url": "https://api.github.com/users/eustlb/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T15:32:57 | 2025-05-07T16:01:02 | 2025-05-07T15:45:23 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/38001",
"html_url": "https://github.com/huggingface/transformers/pull/38001",
"diff_url": "https://github.com/huggingface/transformers/pull/38001.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/38001.patch",
"merged_at": "2025-05-07T15:45:23"
} | # What does this PR do?
Nit fix when `output_audio=True`. | {
"login": "eustlb",
"id": 94853470,
"node_id": "U_kgDOBadZXg",
"avatar_url": "https://avatars.githubusercontent.com/u/94853470?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eustlb",
"html_url": "https://github.com/eustlb",
"followers_url": "https://api.github.com/users/eustlb/followers",
"following_url": "https://api.github.com/users/eustlb/following{/other_user}",
"gists_url": "https://api.github.com/users/eustlb/gists{/gist_id}",
"starred_url": "https://api.github.com/users/eustlb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eustlb/subscriptions",
"organizations_url": "https://api.github.com/users/eustlb/orgs",
"repos_url": "https://api.github.com/users/eustlb/repos",
"events_url": "https://api.github.com/users/eustlb/events{/privacy}",
"received_events_url": "https://api.github.com/users/eustlb/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/38001/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/38001/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/38000 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/38000/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/38000/comments | https://api.github.com/repos/huggingface/transformers/issues/38000/events | https://github.com/huggingface/transformers/issues/38000 | 3,045,986,347 | I_kwDOCUB6oc61jhAr | 38,000 | Why can't InternVL3-8B start vLLM after being converted to the Hugging Face format? It shows the error: `ValueError: 'limit_mm_per_prompt' is only supported for multimodal models.' | {
"login": "FloSophorae",
"id": 85059032,
"node_id": "MDQ6VXNlcjg1MDU5MDMy",
"avatar_url": "https://avatars.githubusercontent.com/u/85059032?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/FloSophorae",
"html_url": "https://github.com/FloSophorae",
"followers_url": "https://api.github.com/users/FloSophorae/followers",
"following_url": "https://api.github.com/users/FloSophorae/following{/other_user}",
"gists_url": "https://api.github.com/users/FloSophorae/gists{/gist_id}",
"starred_url": "https://api.github.com/users/FloSophorae/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FloSophorae/subscriptions",
"organizations_url": "https://api.github.com/users/FloSophorae/orgs",
"repos_url": "https://api.github.com/users/FloSophorae/repos",
"events_url": "https://api.github.com/users/FloSophorae/events{/privacy}",
"received_events_url": "https://api.github.com/users/FloSophorae/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-05-07T13:29:37 | 2025-06-22T22:06:46 | 2025-06-21T08:02:43 | NONE | null | null | null | null | ### System Info
vllm 0.8.5.post1
transformers 4.52.0.dev0
### Who can help?
@amyeroberts
@qubvel
### 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
```
CUDA_VISIBLE_DEVICES=0,1 vllm serve $MODEL_PATH \
--tensor-parallel-size 2 \
--port $MODEL_PROT \
--host 0.0.0.0 \
--dtype float16 \
--max-model-len 65536 \
--limit-mm-per-prompt image=30,video=0\
--enable-prefix-caching \
--gpu-memory-utilization 0.6 \
--block-size 16 > "$VLLM_LOG"
```
### Expected behavior
I downloaded the model from [OpenGVLab/InternVL3-8B](https://huggingface.co/OpenGVLab/InternVL3-8B), which natively supports running OpenAI-style chat completions with vLLM. However, after converting it to the Hugging Face format using the script `transformers/src/transformers/models/internvl/convert_internvl_weights_to_hf.py`, launching vLLM resulted in the error:
`ValueError: 'limit_mm_per_prompt' is only supported for multimodal models.`
The command I used to launch vllm is as follows:
```
CUDA_VISIBLE_DEVICES=0,1 vllm serve $MODEL_PATH \
--tensor-parallel-size 2 \
--port $MODEL_PROT \
--host 0.0.0.0 \
--dtype float16 \
--max-model-len 65536 \
--limit-mm-per-prompt image=30,video=0\
--enable-prefix-caching \
--gpu-memory-utilization 0.6 \
--block-size 16 > "$VLLM_LOG"
```
The system runs correctly when I set MODEL_PATH to the original OpenGVLab/InternVL3-8B address. But throws an error when I change the path to the converted InternVL-3B-hf format : `ValueError: 'limit_mm_per_prompt' is only supported for multimodal models.`
Could someone explain why this is happening and suggest solutions?
Thank you very much! | {
"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/38000/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/38000/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/37999 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37999/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37999/comments | https://api.github.com/repos/huggingface/transformers/issues/37999/events | https://github.com/huggingface/transformers/issues/37999 | 3,045,812,462 | I_kwDOCUB6oc61i2ju | 37,999 | RuntimeError when converting and saving Flax ViT model to PyTorch | {
"login": "nobodyPerfecZ",
"id": 69363706,
"node_id": "MDQ6VXNlcjY5MzYzNzA2",
"avatar_url": "https://avatars.githubusercontent.com/u/69363706?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nobodyPerfecZ",
"html_url": "https://github.com/nobodyPerfecZ",
"followers_url": "https://api.github.com/users/nobodyPerfecZ/followers",
"following_url": "https://api.github.com/users/nobodyPerfecZ/following{/other_user}",
"gists_url": "https://api.github.com/users/nobodyPerfecZ/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nobodyPerfecZ/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nobodyPerfecZ/subscriptions",
"organizations_url": "https://api.github.com/users/nobodyPerfecZ/orgs",
"repos_url": "https://api.github.com/users/nobodyPerfecZ/repos",
"events_url": "https://api.github.com/users/nobodyPerfecZ/events{/privacy}",
"received_events_url": "https://api.github.com/users/nobodyPerfecZ/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 2934977194,
"node_id": "MDU6TGFiZWwyOTM0OTc3MTk0",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Flax",
"name": "Flax",
"color": "4862AD",
"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-05-07T12:32:12 | 2025-06-15T08:02:43 | 2025-06-15T08:02:43 | NONE | null | null | null | null | ### System Info
Env:
- transformers version: 4.51.3
- Platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.39
- Python version: 3.10.16
- Huggingface_hub version: 0.30.2
- Safetensors version: 0.5.3
- Accelerate version: not found
- Accelerate config: not found
- DeepSpeed version: not found
- PyTorch version (GPU?): 2.7.0+cu128 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): 0.10.5 (True)
- Jax version: 0.5.1
- JaxLib version: 0.5.1
- Using distributed or parallel set-up in script?: No
- Using GPU in script?: Yes
- GPU type: NVIDIA RTX 3090
### Who can help?
@gante @Rocketknight1
### 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
Example script to reproduce the bug:
```python
from transformers import FlaxViTForImageClassification, ViTForImageClassification
# Simulate fine-tuning by loading the base model and saving it
flax_model = FlaxViTForImageClassification.from_pretrained(
pretrained_model_name_or_path="google/vit-base-patch16-224",
num_labels=5,
id2label={
0: "bicycle",
1: "bus",
2: "car",
3: "crosswalk",
4: "hydrant",
},
label2id={
"bicycle": 0,
"bus": 1,
"car": 2,
"crosswalk": 3,
"hydrant": 4,
},
ignore_mismatched_sizes=True,
)
flax_model.save_pretrained("./test-vit-finetuned-patch16-224-recaptchav2")
# Load the fine-tuned model and convert it to PyTorch
pt_model = ViTForImageClassification.from_pretrained(
pretrained_model_name_or_path="./test-vit-finetuned-patch16-224-recaptchav2",
from_flax=True,
)
pt_model.save_pretrained("./test-vit-finetuned-patch16-224-recaptchav2") # RuntimeError
```
The complete traceback is shown below:
```
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[1], line 30
25 # Load the fine-tuned model and convert it to PyTorch
26 pt_model = ViTForImageClassification.from_pretrained(
27 pretrained_model_name_or_path="./test-vit-finetuned-patch16-224-recaptchav2",
28 from_flax=True,
29 )
---> 30 pt_model.save_pretrained("./test-vit-finetuned-patch16-224-recaptchav2") # RuntimeError
File ~/miniconda3/envs/recaptchav2-solver/lib/python3.10/site-packages/transformers/modeling_utils.py:3486, in PreTrainedModel.save_pretrained(self, save_directory, is_main_process, state_dict, save_function, push_to_hub, max_shard_size, safe_serialization, variant, token, save_peft_format, **kwargs)
3483 error_names.append(set(shared_names))
3485 if len(error_names) > 0:
-> 3486 raise RuntimeError(
3487 f"The weights trying to be saved contained shared tensors {error_names} that are mismatching the transformers base configuration. Try saving using `safe_serialization=False` or remove this tensor sharing.",
3488 )
3490 # Shard the model if it is too big.
3491 if not _hf_peft_config_loaded:
RuntimeError: The weights trying to be saved contained shared tensors [{'vit.encoder.layer.6.output.dense.bias', 'vit.encoder.layer.10.layernorm_after.weight', 'vit.encoder.layer.7.attention.attention.query.bias', 'vit.encoder.layer.7.attention.attention.key.bias', 'vit.encoder.layer.7.layernorm_after.bias', 'vit.encoder.layer.0.output.dense.bias', 'vit.encoder.layer.8.attention.attention.query.bias', 'vit.encoder.layer.1.attention.output.dense.bias', 'vit.encoder.layer.3.output.dense.bias', 'vit.encoder.layer.10.layernorm_before.weight', 'vit.encoder.layer.3.layernorm_after.bias', 'vit.encoder.layer.0.layernorm_after.bias', 'vit.encoder.layer.2.attention.attention.key.bias', 'vit.encoder.layer.0.layernorm_before.weight', 'vit.encoder.layer.3.attention.attention.value.bias', 'vit.encoder.layer.11.attention.attention.key.bias', 'vit.encoder.layer.5.output.dense.bias', 'vit.layernorm.weight', 'vit.encoder.layer.8.output.dense.bias', 'vit.encoder.layer.7.attention.output.dense.bias', 'vit.encoder.layer.6.attention.attention.value.bias', 'vit.encoder.layer.5.layernorm_before.bias', 'vit.encoder.layer.6.layernorm_before.bias', 'vit.encoder.layer.4.layernorm_after.bias', 'vit.encoder.layer.11.layernorm_after.weight', 'vit.encoder.layer.4.attention.attention.query.bias', 'vit.encoder.layer.9.attention.attention.query.bias', 'vit.encoder.layer.5.attention.output.dense.bias', 'vit.encoder.layer.3.attention.attention.key.bias', 'vit.encoder.layer.8.attention.attention.key.bias', 'vit.encoder.layer.8.attention.output.dense.bias', 'vit.encoder.layer.11.layernorm_after.bias', 'vit.encoder.layer.11.layernorm_before.weight', 'vit.encoder.layer.7.output.dense.bias', 'vit.encoder.layer.3.layernorm_before.weight', 'vit.encoder.layer.4.layernorm_before.bias', 'vit.encoder.layer.1.attention.attention.query.bias', 'vit.encoder.layer.2.layernorm_before.weight', 'vit.encoder.layer.0.attention.output.dense.bias', 'vit.encoder.layer.11.attention.output.dense.bias', 'vit.encoder.layer.0.layernorm_before.bias', 'vit.encoder.layer.10.attention.output.dense.bias', 'vit.encoder.layer.11.attention.attention.query.bias', 'vit.encoder.layer.8.attention.attention.value.bias', 'vit.encoder.layer.6.attention.output.dense.bias', 'vit.layernorm.bias', 'vit.encoder.layer.1.layernorm_after.weight', 'vit.encoder.layer.10.attention.attention.query.bias', 'vit.encoder.layer.11.layernorm_before.bias', 'vit.encoder.layer.1.layernorm_before.bias', 'vit.encoder.layer.4.output.dense.bias', 'vit.embeddings.cls_token', 'vit.encoder.layer.6.attention.attention.query.bias', 'vit.encoder.layer.3.attention.attention.query.bias', 'vit.encoder.layer.9.output.dense.bias', 'vit.encoder.layer.9.attention.attention.key.bias', 'vit.embeddings.patch_embeddings.projection.bias', 'vit.encoder.layer.5.layernorm_after.weight', 'vit.encoder.layer.11.output.dense.bias', 'vit.encoder.layer.8.layernorm_after.weight', 'vit.encoder.layer.5.attention.attention.value.bias', 'vit.encoder.layer.2.attention.output.dense.bias', 'vit.encoder.layer.6.layernorm_after.bias', 'vit.encoder.layer.5.layernorm_after.bias', 'vit.encoder.layer.1.layernorm_before.weight', 'vit.encoder.layer.2.layernorm_before.bias', 'vit.encoder.layer.10.attention.attention.value.bias', 'vit.encoder.layer.9.attention.output.dense.bias', 'vit.encoder.layer.9.attention.attention.value.bias', 'vit.encoder.layer.9.layernorm_before.weight', 'vit.encoder.layer.2.output.dense.bias', 'vit.encoder.layer.0.attention.attention.query.bias', 'vit.encoder.layer.9.layernorm_after.weight', 'vit.encoder.layer.10.output.dense.bias', 'vit.encoder.layer.7.layernorm_after.weight', 'vit.encoder.layer.8.layernorm_after.bias', 'vit.encoder.layer.5.attention.attention.key.bias', 'vit.encoder.layer.7.attention.attention.value.bias', 'vit.encoder.layer.4.layernorm_after.weight', 'vit.encoder.layer.3.attention.output.dense.bias', 'vit.encoder.layer.6.layernorm_after.weight', 'vit.encoder.layer.5.attention.attention.query.bias', 'vit.encoder.layer.5.layernorm_before.weight', 'vit.encoder.layer.0.layernorm_after.weight', 'vit.encoder.layer.10.layernorm_after.bias', 'vit.encoder.layer.3.layernorm_before.bias', 'vit.encoder.layer.4.layernorm_before.weight', 'vit.encoder.layer.11.attention.attention.value.bias', 'vit.encoder.layer.0.attention.attention.key.bias', 'vit.encoder.layer.4.attention.output.dense.bias', 'vit.encoder.layer.10.attention.attention.key.bias', 'vit.encoder.layer.4.attention.attention.key.bias', 'vit.encoder.layer.1.layernorm_after.bias', 'vit.encoder.layer.7.layernorm_before.bias', 'vit.encoder.layer.4.attention.attention.value.bias', 'vit.encoder.layer.8.layernorm_before.weight', 'vit.encoder.layer.1.attention.attention.key.bias', 'vit.encoder.layer.2.attention.attention.value.bias', 'vit.encoder.layer.0.attention.attention.value.bias', 'vit.encoder.layer.10.layernorm_before.bias', 'vit.encoder.layer.9.layernorm_after.bias', 'vit.encoder.layer.2.layernorm_after.bias', 'vit.encoder.layer.1.attention.attention.value.bias', 'vit.encoder.layer.6.layernorm_before.weight', 'vit.encoder.layer.9.layernorm_before.bias', 'vit.encoder.layer.1.output.dense.bias', 'vit.encoder.layer.3.layernorm_after.weight', 'vit.encoder.layer.8.layernorm_before.bias', 'vit.encoder.layer.2.attention.attention.query.bias', 'vit.encoder.layer.2.layernorm_after.weight', 'vit.encoder.layer.7.layernorm_before.weight', 'vit.encoder.layer.6.attention.attention.key.bias'}, {'vit.encoder.layer.5.attention.attention.value.weight', 'vit.encoder.layer.6.attention.attention.query.weight', 'vit.encoder.layer.10.attention.attention.key.weight', 'vit.encoder.layer.1.attention.attention.value.weight', 'vit.encoder.layer.4.attention.attention.query.weight', 'vit.encoder.layer.11.attention.attention.value.weight', 'vit.encoder.layer.11.attention.output.dense.weight', 'vit.encoder.layer.8.attention.attention.query.weight', 'vit.encoder.layer.4.attention.attention.key.weight', 'vit.encoder.layer.10.attention.attention.query.weight', 'vit.encoder.layer.3.attention.output.dense.weight', 'vit.encoder.layer.7.attention.attention.value.weight', 'vit.encoder.layer.6.attention.attention.key.weight', 'vit.encoder.layer.3.attention.attention.key.weight', 'vit.encoder.layer.0.attention.attention.key.weight', 'vit.encoder.layer.5.attention.attention.key.weight', 'vit.encoder.layer.9.attention.output.dense.weight', 'vit.encoder.layer.4.attention.attention.value.weight', 'vit.encoder.layer.11.attention.attention.key.weight', 'vit.encoder.layer.5.attention.output.dense.weight', 'vit.encoder.layer.7.attention.attention.query.weight', 'vit.encoder.layer.10.attention.output.dense.weight', 'vit.encoder.layer.3.attention.attention.query.weight', 'vit.encoder.layer.8.attention.attention.key.weight', 'vit.encoder.layer.4.attention.output.dense.weight', 'vit.encoder.layer.8.attention.output.dense.weight', 'vit.encoder.layer.5.attention.attention.query.weight', 'vit.encoder.layer.0.attention.attention.value.weight', 'vit.encoder.layer.6.attention.output.dense.weight', 'vit.encoder.layer.9.attention.attention.query.weight', 'vit.encoder.layer.0.attention.output.dense.weight', 'vit.encoder.layer.9.attention.attention.key.weight', 'vit.encoder.layer.7.attention.attention.key.weight', 'vit.encoder.layer.2.attention.output.dense.weight', 'vit.encoder.layer.1.attention.output.dense.weight', 'vit.encoder.layer.6.attention.attention.value.weight', 'vit.encoder.layer.2.attention.attention.key.weight', 'vit.encoder.layer.2.attention.attention.value.weight', 'vit.encoder.layer.7.attention.output.dense.weight', 'vit.encoder.layer.3.attention.attention.value.weight', 'vit.encoder.layer.1.attention.attention.key.weight', 'vit.encoder.layer.8.attention.attention.value.weight', 'vit.encoder.layer.9.attention.attention.value.weight', 'vit.encoder.layer.10.attention.attention.value.weight', 'vit.encoder.layer.2.attention.attention.query.weight', 'vit.encoder.layer.11.attention.attention.query.weight', 'vit.encoder.layer.1.attention.attention.query.weight', 'vit.embeddings.patch_embeddings.projection.weight', 'vit.encoder.layer.0.attention.attention.query.weight'}, {'vit.encoder.layer.11.output.dense.weight', 'vit.encoder.layer.7.intermediate.dense.weight', 'vit.encoder.layer.7.output.dense.weight', 'vit.encoder.layer.11.intermediate.dense.weight', 'vit.encoder.layer.0.output.dense.weight', 'vit.encoder.layer.4.output.dense.weight', 'vit.encoder.layer.3.intermediate.dense.weight', 'vit.encoder.layer.0.intermediate.dense.weight', 'vit.encoder.layer.2.intermediate.dense.weight', 'vit.encoder.layer.10.intermediate.dense.weight', 'vit.encoder.layer.9.output.dense.weight', 'vit.encoder.layer.8.output.dense.weight', 'vit.encoder.layer.1.output.dense.weight', 'vit.encoder.layer.4.intermediate.dense.weight', 'vit.encoder.layer.9.intermediate.dense.weight', 'vit.encoder.layer.2.output.dense.weight', 'vit.encoder.layer.1.intermediate.dense.weight', 'vit.encoder.layer.5.output.dense.weight', 'vit.encoder.layer.6.output.dense.weight', 'vit.encoder.layer.5.intermediate.dense.weight', 'vit.encoder.layer.3.output.dense.weight', 'vit.encoder.layer.10.output.dense.weight', 'vit.encoder.layer.8.intermediate.dense.weight', 'vit.encoder.layer.6.intermediate.dense.weight'}, {'vit.encoder.layer.10.intermediate.dense.bias', 'vit.encoder.layer.3.intermediate.dense.bias', 'vit.encoder.layer.11.intermediate.dense.bias', 'vit.encoder.layer.0.intermediate.dense.bias', 'vit.encoder.layer.2.intermediate.dense.bias', 'vit.encoder.layer.8.intermediate.dense.bias', 'vit.encoder.layer.1.intermediate.dense.bias', 'vit.encoder.layer.6.intermediate.dense.bias', 'vit.encoder.layer.4.intermediate.dense.bias', 'vit.encoder.layer.9.intermediate.dense.bias', 'vit.encoder.layer.7.intermediate.dense.bias', 'vit.encoder.layer.5.intermediate.dense.bias'}] that are mismatching the transformers base configuration. Try saving using `safe_serialization=False` or remove this tensor sharing.
```
### Expected behavior
The converted PyTorch ViT model should be saved/loaded successfully without requiring manual intervention given a Flax ViT model. | {
"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/37999/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/37999/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/37998 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37998/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37998/comments | https://api.github.com/repos/huggingface/transformers/issues/37998/events | https://github.com/huggingface/transformers/pull/37998 | 3,045,710,375 | PR_kwDOCUB6oc6VQn-P | 37,998 | Update AMD docker with needed packages | {
"login": "Cemberk",
"id": 16987247,
"node_id": "MDQ6VXNlcjE2OTg3MjQ3",
"avatar_url": "https://avatars.githubusercontent.com/u/16987247?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cemberk",
"html_url": "https://github.com/Cemberk",
"followers_url": "https://api.github.com/users/Cemberk/followers",
"following_url": "https://api.github.com/users/Cemberk/following{/other_user}",
"gists_url": "https://api.github.com/users/Cemberk/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cemberk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cemberk/subscriptions",
"organizations_url": "https://api.github.com/users/Cemberk/orgs",
"repos_url": "https://api.github.com/users/Cemberk/repos",
"events_url": "https://api.github.com/users/Cemberk/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cemberk/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-05-07T11:52:48 | 2025-05-07T13:42:36 | null | NONE | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37998",
"html_url": "https://github.com/huggingface/transformers/pull/37998",
"diff_url": "https://github.com/huggingface/transformers/pull/37998.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37998.patch",
"merged_at": null
} | # What does this PR do?
The AMD Dockerfile is based on ubuntu base container we expect pytorch docker to have needed hip dependencies also added bitsandbytes and flash attention packages to fix failing tests these changes were discussed in a meeting. These changes are expected to solve 99/144 test cases posted in slack and solves 91/93 require_bitsandbytes tests @ivarflakstad
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37998/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/37998/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37997 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37997/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37997/comments | https://api.github.com/repos/huggingface/transformers/issues/37997/events | https://github.com/huggingface/transformers/pull/37997 | 3,045,566,373 | PR_kwDOCUB6oc6VQIxj | 37,997 | Add a check to import_utils.py to allow for use of faiss_gpu installation | {
"login": "Fiona-Waters",
"id": 76408967,
"node_id": "MDQ6VXNlcjc2NDA4OTY3",
"avatar_url": "https://avatars.githubusercontent.com/u/76408967?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Fiona-Waters",
"html_url": "https://github.com/Fiona-Waters",
"followers_url": "https://api.github.com/users/Fiona-Waters/followers",
"following_url": "https://api.github.com/users/Fiona-Waters/following{/other_user}",
"gists_url": "https://api.github.com/users/Fiona-Waters/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Fiona-Waters/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Fiona-Waters/subscriptions",
"organizations_url": "https://api.github.com/users/Fiona-Waters/orgs",
"repos_url": "https://api.github.com/users/Fiona-Waters/repos",
"events_url": "https://api.github.com/users/Fiona-Waters/events{/privacy}",
"received_events_url": "https://api.github.com/users/Fiona-Waters/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T10:54:53 | 2025-05-07T13:27:42 | 2025-05-07T13:27:42 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37997",
"html_url": "https://github.com/huggingface/transformers/pull/37997",
"diff_url": "https://github.com/huggingface/transformers/pull/37997.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37997.patch",
"merged_at": "2025-05-07T13:27:42"
} | # What does this PR do?
When using Transformers RagRetriever and Milvus in a jupyter notebook, the faiss library is required. I specifically need faiss-gpu, but as the check for this is not implemented here I am unable to run my code.
This PR adds a check for faiss-gpu to the existing faiss and faiss-cpu checks.
<!--
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)
Related to https://github.com/huggingface/transformers/issues/11720 - previously closed
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?
## Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface and @SunMarc
- chat templates: @Rocketknight1
Integrations:
- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber
Documentation: @stevhliu
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37997/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/37997/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37996 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37996/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37996/comments | https://api.github.com/repos/huggingface/transformers/issues/37996/events | https://github.com/huggingface/transformers/pull/37996 | 3,045,462,551 | PR_kwDOCUB6oc6VPyAx | 37,996 | [Temporary] Log some information in some pytest/pluggy internal places | {
"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-05-07T10:12:29 | 2025-05-09T09:06:39 | 2025-05-09T09:06:37 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37996",
"html_url": "https://github.com/huggingface/transformers/pull/37996",
"diff_url": "https://github.com/huggingface/transformers/pull/37996.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37996.patch",
"merged_at": "2025-05-09T09:06:37"
} | # What does this PR do?
We get
> Too long with no output (exceeded 10m0s): context deadline exceeded
from time to time. It's very unclear how could this happen. It might be pytest, pytest's plugin, our code, or even the `tee` command.
This time, let's monitor some progresses in pytest and see if we can get more information when this happens again. | {
"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/37996/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/37996/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37995 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37995/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37995/comments | https://api.github.com/repos/huggingface/transformers/issues/37995/events | https://github.com/huggingface/transformers/pull/37995 | 3,045,395,689 | PR_kwDOCUB6oc6VPjXD | 37,995 | Qwen2.5-Omni: Update modeling_qwen2_5_omni.py to fix error when loading quantized weights with AutoAWQ. | {
"login": "tiger-of-shawn",
"id": 4829773,
"node_id": "MDQ6VXNlcjQ4Mjk3NzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4829773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tiger-of-shawn",
"html_url": "https://github.com/tiger-of-shawn",
"followers_url": "https://api.github.com/users/tiger-of-shawn/followers",
"following_url": "https://api.github.com/users/tiger-of-shawn/following{/other_user}",
"gists_url": "https://api.github.com/users/tiger-of-shawn/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tiger-of-shawn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tiger-of-shawn/subscriptions",
"organizations_url": "https://api.github.com/users/tiger-of-shawn/orgs",
"repos_url": "https://api.github.com/users/tiger-of-shawn/repos",
"events_url": "https://api.github.com/users/tiger-of-shawn/events{/privacy}",
"received_events_url": "https://api.github.com/users/tiger-of-shawn/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T09:47:28 | 2025-05-08T10:37:34 | 2025-05-08T09:58:00 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37995",
"html_url": "https://github.com/huggingface/transformers/pull/37995",
"diff_url": "https://github.com/huggingface/transformers/pull/37995.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37995.patch",
"merged_at": null
} | Qwen2.5-Omni: Update modeling_qwen2_5_omni.py to fix loading quantized weights with AutoAWQ.
# What does this PR do?
while loading AWQ quantized Qwen-Omni model with AutoAWQ, there will be an error as below:
```bash
Traceback (most recent call last):
File "/nas/yuehu/NEW/AutoAWQ/./examples/quantize_qwen_omni.py", line 188, in <module>
inference_quantized_model(quant_path)
File "/nas/yuehu/NEW/AutoAWQ/./examples/quantize_qwen_omni.py", line 123, in inference_quantized_model
model = AutoAWQForCausalLM.from_quantized(quant_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nas/yuehu/NEW/AutoAWQ/awq/models/auto.py", line 125, in from_quantized
return AWQ_CAUSAL_LM_MODEL_MAP[model_type].from_quantized(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nas/yuehu/NEW/AutoAWQ/awq/models/base.py", line 498, in from_quantized
model = target_cls.from_config(
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 440, in from_config
return model_class._from_config(config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 280, in _wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2023, in _from_config
model = cls(config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py", line 4386, in __init__
self.post_init()
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 1886, in post_init
self.init_weights()
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 3149, in init_weights
self.initialize_weights()
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2502, in initialize_weights
self.smart_apply(self._initialize_weights)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2493, in smart_apply
module.smart_apply(module._initialize_weights)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2493, in smart_apply
module.smart_apply(module._initialize_weights)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2495, in smart_apply
module.smart_apply(fn)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2495, in smart_apply
module.smart_apply(fn)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2495, in smart_apply
module.smart_apply(fn)
[Previous line repeated 1 more time]
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2496, in smart_apply
fn(self)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/modeling_utils.py", line 2470, in _initialize_weights
self._init_weights(module)
File "/root/anaconda3/envs/awq/lib/python3.12/site-packages/transformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py", line 152, in _init_weights
module.weight.data.fill_(1.0)
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'data'
```
Fixes # (issue)
this PR can fix the above error.
## Who can review?
@ArthurZucker @amyeroberts @qubvel
thanks for your reviewing. | {
"login": "tiger-of-shawn",
"id": 4829773,
"node_id": "MDQ6VXNlcjQ4Mjk3NzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4829773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tiger-of-shawn",
"html_url": "https://github.com/tiger-of-shawn",
"followers_url": "https://api.github.com/users/tiger-of-shawn/followers",
"following_url": "https://api.github.com/users/tiger-of-shawn/following{/other_user}",
"gists_url": "https://api.github.com/users/tiger-of-shawn/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tiger-of-shawn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tiger-of-shawn/subscriptions",
"organizations_url": "https://api.github.com/users/tiger-of-shawn/orgs",
"repos_url": "https://api.github.com/users/tiger-of-shawn/repos",
"events_url": "https://api.github.com/users/tiger-of-shawn/events{/privacy}",
"received_events_url": "https://api.github.com/users/tiger-of-shawn/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37995/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/37995/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37994 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37994/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37994/comments | https://api.github.com/repos/huggingface/transformers/issues/37994/events | https://github.com/huggingface/transformers/pull/37994 | 3,045,382,401 | PR_kwDOCUB6oc6VPgc4 | 37,994 | proof of concept for using dataset of test cases for tokenizer tests | {
"login": "itazap",
"id": 31893021,
"node_id": "MDQ6VXNlcjMxODkzMDIx",
"avatar_url": "https://avatars.githubusercontent.com/u/31893021?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/itazap",
"html_url": "https://github.com/itazap",
"followers_url": "https://api.github.com/users/itazap/followers",
"following_url": "https://api.github.com/users/itazap/following{/other_user}",
"gists_url": "https://api.github.com/users/itazap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/itazap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/itazap/subscriptions",
"organizations_url": "https://api.github.com/users/itazap/orgs",
"repos_url": "https://api.github.com/users/itazap/repos",
"events_url": "https://api.github.com/users/itazap/events{/privacy}",
"received_events_url": "https://api.github.com/users/itazap/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-05-07T09:42:27 | 2025-05-13T16:08:04 | null | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37994",
"html_url": "https://github.com/huggingface/transformers/pull/37994",
"diff_url": "https://github.com/huggingface/transformers/pull/37994.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37994.patch",
"merged_at": null
} | To refactor comparing slow == fast, we need to 'freeze' current working behavior of tokenizers. We move the test strings to the hub (https://huggingface.co/datasets/hf-internal-testing/tokenization_test_data), with expected tokens, encoded_ids, and encoded_ids with special tokens. I got the test strings for all sentence piece based models and I ran all sp-based models on these test --> then uploaded to the dataset.
This allows us to
1. preserve testing expected behavior without relying on comparing fast == slow
2. reduce overwriting of tests per class
3. future tests can be added here!
*Note: will convert other slow == fast cases! this is a POC for `test_rust_and_python_full_tokenizers` to get some feedback :). then we can easily move tests like `test_tokenization_python_rust_equals` and many others.
**More ideas/ considerations**
- need to check if this slow downs running these tests
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37994/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/37994/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37993 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37993/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37993/comments | https://api.github.com/repos/huggingface/transformers/issues/37993/events | https://github.com/huggingface/transformers/pull/37993 | 3,045,331,378 | PR_kwDOCUB6oc6VPVMA | 37,993 | update loss computation in modeling code | {
"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-05-07T09:25:45 | 2025-09-18T15:39:08 | 2025-09-18T15:39:08 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37993",
"html_url": "https://github.com/huggingface/transformers/pull/37993",
"diff_url": "https://github.com/huggingface/transformers/pull/37993.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37993.patch",
"merged_at": null
} | # What does this PR do?
cc @stas00
Follow up of #36607, see [this comment](https://github.com/huggingface/transformers/pull/36607#issuecomment-2781494656).
The following code snippet gives
#### on main
> tensor(7.0538, grad_fn=<NllLossBackward0>)
None
#### with this PR.
> tensor(7.0538, grad_fn=<NllLossBackward0>)
tensor(7.0538, grad_fn=<NllLossBackward0>)
This is particular necessary for context parallel to run correctly.
**Once the changes is approved, I will update all other places and add documentations.**
```python
import torch
from transformers import AutoModelForCausalLM
repo_id = "meta-llama/Llama-3.2-1B"
token = "YOUR_HF_TOKEN"
model = AutoModelForCausalLM.from_pretrained(repo_id, token=token)
input_ids = torch.ones(size=(1, 16), dtype=torch.int64)
labels = input_ids.clone()
shift_labels = torch.nn.functional.pad(labels[..., 1:], (0, 1), value=-100)
outputs_with_labels = model(input_ids, labels=labels)
outputs_with_shift_labels = model(input_ids, shift_labels=shift_labels)
print(outputs_with_labels.loss)
print(outputs_with_shift_labels.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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37993/reactions",
"total_count": 2,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 2,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37993/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37992 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37992/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37992/comments | https://api.github.com/repos/huggingface/transformers/issues/37992/events | https://github.com/huggingface/transformers/issues/37992 | 3,045,310,566 | I_kwDOCUB6oc61g8Bm | 37,992 | Versions greater than 4.49 are not compatible with Ascend NPU | {
"login": "1737686924",
"id": 156283920,
"node_id": "U_kgDOCVC0EA",
"avatar_url": "https://avatars.githubusercontent.com/u/156283920?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/1737686924",
"html_url": "https://github.com/1737686924",
"followers_url": "https://api.github.com/users/1737686924/followers",
"following_url": "https://api.github.com/users/1737686924/following{/other_user}",
"gists_url": "https://api.github.com/users/1737686924/gists{/gist_id}",
"starred_url": "https://api.github.com/users/1737686924/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1737686924/subscriptions",
"organizations_url": "https://api.github.com/users/1737686924/orgs",
"repos_url": "https://api.github.com/users/1737686924/repos",
"events_url": "https://api.github.com/users/1737686924/events{/privacy}",
"received_events_url": "https://api.github.com/users/1737686924/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-05-07T09:18:43 | 2025-05-12T18:04:58 | 2025-05-12T18:04:58 | NONE | null | null | null | null | ### System Info
910B1,python==3.10,transformers==4.51.0
### Who can help?

When torch==2.2.0 and torch-npu==2.2.0 and transformers>4.49, the error "AssertionError: Torch not compiled with CUDA enabled" will appear. <=4.49 has no problem. Upgrading to torch==2.4.0 and torch-npu==2.4.0 and transformers>4.49 allows training, but the graphics card cannot be specified. By default, it starts from card 0.
### 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
When torch==2.2.0 and torch-npu==2.2.0 and transformers>4.49, the error "AssertionError: Torch not compiled with CUDA enabled" will appear. <=4.49 has no problem. Upgrading to torch==2.4.0 and torch-npu==2.4.0 and transformers>4.49 allows training, but the graphics card cannot be specified. By default, it starts from card 0.
### Expected behavior
When torch==2.2.0 and torch-npu==2.2.0 and transformers>4.49, the error "AssertionError: Torch not compiled with CUDA enabled" will appear. <=4.49 has no problem. Upgrading to torch==2.4.0 and torch-npu==2.4.0 and transformers>4.49 allows training, but the graphics card cannot be specified. By default, it starts from card 0. | {
"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/37992/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/37992/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/37991 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37991/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37991/comments | https://api.github.com/repos/huggingface/transformers/issues/37991/events | https://github.com/huggingface/transformers/pull/37991 | 3,045,179,129 | PR_kwDOCUB6oc6VOzVf | 37,991 | remove duplicate code | {
"login": "kaixuanliu",
"id": 13268042,
"node_id": "MDQ6VXNlcjEzMjY4MDQy",
"avatar_url": "https://avatars.githubusercontent.com/u/13268042?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kaixuanliu",
"html_url": "https://github.com/kaixuanliu",
"followers_url": "https://api.github.com/users/kaixuanliu/followers",
"following_url": "https://api.github.com/users/kaixuanliu/following{/other_user}",
"gists_url": "https://api.github.com/users/kaixuanliu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kaixuanliu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaixuanliu/subscriptions",
"organizations_url": "https://api.github.com/users/kaixuanliu/orgs",
"repos_url": "https://api.github.com/users/kaixuanliu/repos",
"events_url": "https://api.github.com/users/kaixuanliu/events{/privacy}",
"received_events_url": "https://api.github.com/users/kaixuanliu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T08:38:56 | 2025-05-07T13:34:58 | 2025-05-07T12:46:45 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37991",
"html_url": "https://github.com/huggingface/transformers/pull/37991",
"diff_url": "https://github.com/huggingface/transformers/pull/37991.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37991.patch",
"merged_at": "2025-05-07T12:46:45"
} | @amyeroberts, @qubvel pls help review.
| {
"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/37991/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/37991/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37990 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37990/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37990/comments | https://api.github.com/repos/huggingface/transformers/issues/37990/events | https://github.com/huggingface/transformers/pull/37990 | 3,045,119,108 | PR_kwDOCUB6oc6VOmKn | 37,990 | make aya vision 5 integration tests pass on xpu | {
"login": "yao-matrix",
"id": 7245027,
"node_id": "MDQ6VXNlcjcyNDUwMjc=",
"avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yao-matrix",
"html_url": "https://github.com/yao-matrix",
"followers_url": "https://api.github.com/users/yao-matrix/followers",
"following_url": "https://api.github.com/users/yao-matrix/following{/other_user}",
"gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions",
"organizations_url": "https://api.github.com/users/yao-matrix/orgs",
"repos_url": "https://api.github.com/users/yao-matrix/repos",
"events_url": "https://api.github.com/users/yao-matrix/events{/privacy}",
"received_events_url": "https://api.github.com/users/yao-matrix/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T08:20:20 | 2025-05-07T22:36:39 | 2025-05-07T09:16:38 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37990",
"html_url": "https://github.com/huggingface/transformers/pull/37990",
"diff_url": "https://github.com/huggingface/transformers/pull/37990.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37990.patch",
"merged_at": "2025-05-07T09:16:38"
} | tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_forward
tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_generate_text_only
tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_generate_chat_template
tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_batched_generate
tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_batched_generate_multi_image
@ydshieh @IlyasMoutawwakil , pls help review, thx.
| {
"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/37990/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/37990/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37989 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37989/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37989/comments | https://api.github.com/repos/huggingface/transformers/issues/37989/events | https://github.com/huggingface/transformers/issues/37989 | 3,044,988,986 | I_kwDOCUB6oc61ftg6 | 37,989 | Bug Report: Unexpected Keyword Argument 'padding_side' in PreTrainedTokenizerFast | {
"login": "yunqianluo",
"id": 13880181,
"node_id": "MDQ6VXNlcjEzODgwMTgx",
"avatar_url": "https://avatars.githubusercontent.com/u/13880181?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yunqianluo",
"html_url": "https://github.com/yunqianluo",
"followers_url": "https://api.github.com/users/yunqianluo/followers",
"following_url": "https://api.github.com/users/yunqianluo/following{/other_user}",
"gists_url": "https://api.github.com/users/yunqianluo/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yunqianluo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yunqianluo/subscriptions",
"organizations_url": "https://api.github.com/users/yunqianluo/orgs",
"repos_url": "https://api.github.com/users/yunqianluo/repos",
"events_url": "https://api.github.com/users/yunqianluo/events{/privacy}",
"received_events_url": "https://api.github.com/users/yunqianluo/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-05-07T07:31:05 | 2025-06-15T08:02:45 | 2025-06-15T08:02:45 | NONE | null | null | null | null | ### System Info
absl-py==2.1.0
accelerate==1.6.0
aiohappyeyeballs==2.3.5
aiohttp==3.10.2
aiosignal==1.3.1
aniso8601==9.0.1
annotated-types==0.7.0
anyio==4.4.0
async-timeout==4.0.3
attrs==24.2.0
blinker==1.8.2
certifi==2024.7.4
charset-normalizer==3.3.2
chinesebert==0.2.1
click==8.1.7
confluent-kafka==2.5.0
datasets==1.18.3
dill==0.3.8
elastic-transport==8.15.0
elasticsearch==8.14.0
exceptiongroup==1.2.2
fastapi==0.112.0
fastcore==1.3.29
filelock==3.15.4
Flask==3.0.3
Flask-Cors==4.0.1
Flask-RESTful==0.3.10
frozenlist==1.4.1
fsspec==2024.6.1
gevent==24.10.3
greenlet==3.1.1
grpcio==1.65.4
gunicorn==23.0.0
h11==0.14.0
huggingface-hub==0.24.5
idna==3.7
importlib_metadata==8.2.0
iocextract==1.16.1
itsdangerous==2.2.0
Jinja2==3.1.4
joblib==1.4.2
kazoo==2.5.0
Markdown==3.6
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
mpmath==1.3.0
multidict==6.0.5
multiprocess==0.70.16
networkx==3.2.1
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==9.1.0.70
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.20.5
nvidia-nvjitlink-cu12==12.6.20
nvidia-nvtx-cu12==12.1.105
packaging==24.1
pandas==2.2.2
protobuf==4.25.4
psutil==7.0.0
pyarrow==17.0.0
pydantic==2.8.2
pydantic_core==2.20.1
Pygments==2.18.0
pykafka==2.8.0
PyMySQL==1.1.1
pypinyin==0.38.1
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.2
regex==2024.7.24
requests==2.32.3
requests-file==2.1.0
rich==13.7.1
sacremoses==0.1.1
safetensors==0.5.3
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
starlette==0.37.2
sympy==1.13.1
tabulate==0.9.0
tensorboard==2.17.0
tensorboard-data-server==0.7.2
tldextract==5.1.2
tokenizers==0.19.1
torch==2.4.0
tqdm==4.66.5
transformers==4.42.0
triton==3.0.0
typer==0.12.3
typing_extensions==4.12.2
tzdata==2024.1
urllib3==2.2.2
uvicorn==0.30.5
Werkzeug==3.0.3
xxhash==3.4.1
yarl==1.9.4
zipp==3.19.2
zope.event==5.0
zope.interface==7.1.1
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
---
**Bug Report: Unexpected Keyword Argument 'padding_side' in PreTrainedTokenizerFast**
**Description:**
I encountered a `TypeError` when using the `AutoTokenizer` with `tokenizer_name` after upgrading to Transformers version 4.42.0 and tokenizers version 0.19.1. The error message is as follows:
```
TypeError: PreTrainedTokenizerFast._batch_encode_plus() got an unexpected keyword argument 'padding_side'
```
**Details:**
- **Code Snippet:**
```python
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)
def tokenize_and_align_train_labels(examples):
tokenized_inputs = tokenizer(
examples[text_column_name],
max_length=args.cutoff_len,
padding=False,
truncation=True,
return_token_type_ids=False,
)
```
- **Observations:**
- Before upgrading to Transformers version 4.42.0, this error did not occur.
- The issue arises with `tokenizers` version 0.19.1 and later.
- Setting `use_fast=False` when initializing the tokenizer resolves the error, indicating the issue is specific to the fast tokenizer implementation.
**Request:**
Please investigate this issue, as it seems to be a regression related to the handling of the `padding_side` argument in the fast tokenizer. Any guidance or fix would be appreciated.
---
### Expected behavior
The AutoTokenizer should correctly handle the padding_side argument without raising a TypeError when using the fast tokenizer implementation. Specifically, when calling the tokenizer with parameters such as padding, truncation, and return_token_type_ids, it should process the input text as expected, regardless of the version of the tokenizers library being used. This behavior should be consistent across versions, ensuring backward compatibility and seamless upgrades. | {
"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/37989/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/37989/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/37988 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37988/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37988/comments | https://api.github.com/repos/huggingface/transformers/issues/37988/events | https://github.com/huggingface/transformers/pull/37988 | 3,044,722,105 | PR_kwDOCUB6oc6VNQMe | 37,988 | [bug] fix llava processor to calculate unpadding size correctly | {
"login": "cyr0930",
"id": 14088169,
"node_id": "MDQ6VXNlcjE0MDg4MTY5",
"avatar_url": "https://avatars.githubusercontent.com/u/14088169?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyr0930",
"html_url": "https://github.com/cyr0930",
"followers_url": "https://api.github.com/users/cyr0930/followers",
"following_url": "https://api.github.com/users/cyr0930/following{/other_user}",
"gists_url": "https://api.github.com/users/cyr0930/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyr0930/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyr0930/subscriptions",
"organizations_url": "https://api.github.com/users/cyr0930/orgs",
"repos_url": "https://api.github.com/users/cyr0930/repos",
"events_url": "https://api.github.com/users/cyr0930/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyr0930/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-07T05:20:23 | 2025-05-13T13:49:44 | 2025-05-13T13:49:09 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37988",
"html_url": "https://github.com/huggingface/transformers/pull/37988",
"diff_url": "https://github.com/huggingface/transformers/pull/37988.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37988.patch",
"merged_at": "2025-05-13T13:49:09"
} | # What does this PR do?
Additional fix for https://github.com/huggingface/transformers/pull/37819.
I didn't fix _get_unpadded_features methods in llava family processor.
## 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?
@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/37988/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/37988/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37987 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37987/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37987/comments | https://api.github.com/repos/huggingface/transformers/issues/37987/events | https://github.com/huggingface/transformers/pull/37987 | 3,044,225,192 | PR_kwDOCUB6oc6VLnni | 37,987 | Add BLIP and GIT model support to image-to-text pipeline | {
"login": "mayankdhingra02",
"id": 21103842,
"node_id": "MDQ6VXNlcjIxMTAzODQy",
"avatar_url": "https://avatars.githubusercontent.com/u/21103842?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mayankdhingra02",
"html_url": "https://github.com/mayankdhingra02",
"followers_url": "https://api.github.com/users/mayankdhingra02/followers",
"following_url": "https://api.github.com/users/mayankdhingra02/following{/other_user}",
"gists_url": "https://api.github.com/users/mayankdhingra02/gists{/gist_id}",
"starred_url": "https://api.github.com/users/mayankdhingra02/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mayankdhingra02/subscriptions",
"organizations_url": "https://api.github.com/users/mayankdhingra02/orgs",
"repos_url": "https://api.github.com/users/mayankdhingra02/repos",
"events_url": "https://api.github.com/users/mayankdhingra02/events{/privacy}",
"received_events_url": "https://api.github.com/users/mayankdhingra02/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T23:04:29 | 2025-05-07T19:01:28 | 2025-05-07T19:01:28 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37987",
"html_url": "https://github.com/huggingface/transformers/pull/37987",
"diff_url": "https://github.com/huggingface/transformers/pull/37987.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37987.patch",
"merged_at": null
} | # What does this PR do?
This PR adds support for using BLIP and GIT models with the `image-to-text` pipeline.
Both model types already had underlying compatibility in `ImageToTextPipeline`, but they were not formally registered in `SUPPORTED_TASKS`, which prevented `pipeline(..., model="Salesforce/blip-image-captioning-base")` from working directly.
### Changes:
- Updated `SUPPORTED_TASKS["image-to-text"]["pt"]` to include `"blip"` and `"git"` model types.
### Motivation:
This enables easier access to popular models like BLIP and GIT via the pipeline interface, improving usability for multimodal captioning tasks.
---
Fixes: #21110
## Before submitting
- [x] I’ve tested the change locally with BLIP models and it works correctly.
- [x] I’ve read the [contributor guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request).
## Who can review?
@Rocketknight1 @zucchini-nlp (for visual-language model pipelines)
| {
"login": "mayankdhingra02",
"id": 21103842,
"node_id": "MDQ6VXNlcjIxMTAzODQy",
"avatar_url": "https://avatars.githubusercontent.com/u/21103842?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mayankdhingra02",
"html_url": "https://github.com/mayankdhingra02",
"followers_url": "https://api.github.com/users/mayankdhingra02/followers",
"following_url": "https://api.github.com/users/mayankdhingra02/following{/other_user}",
"gists_url": "https://api.github.com/users/mayankdhingra02/gists{/gist_id}",
"starred_url": "https://api.github.com/users/mayankdhingra02/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mayankdhingra02/subscriptions",
"organizations_url": "https://api.github.com/users/mayankdhingra02/orgs",
"repos_url": "https://api.github.com/users/mayankdhingra02/repos",
"events_url": "https://api.github.com/users/mayankdhingra02/events{/privacy}",
"received_events_url": "https://api.github.com/users/mayankdhingra02/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37987/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/37987/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37986 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37986/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37986/comments | https://api.github.com/repos/huggingface/transformers/issues/37986/events | https://github.com/huggingface/transformers/pull/37986 | 3,044,030,972 | PR_kwDOCUB6oc6VLAob | 37,986 | Do not erase a cache_position passed explicitly to generate(), if there is one | {
"login": "FremyCompany",
"id": 364405,
"node_id": "MDQ6VXNlcjM2NDQwNQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/364405?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/FremyCompany",
"html_url": "https://github.com/FremyCompany",
"followers_url": "https://api.github.com/users/FremyCompany/followers",
"following_url": "https://api.github.com/users/FremyCompany/following{/other_user}",
"gists_url": "https://api.github.com/users/FremyCompany/gists{/gist_id}",
"starred_url": "https://api.github.com/users/FremyCompany/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FremyCompany/subscriptions",
"organizations_url": "https://api.github.com/users/FremyCompany/orgs",
"repos_url": "https://api.github.com/users/FremyCompany/repos",
"events_url": "https://api.github.com/users/FremyCompany/events{/privacy}",
"received_events_url": "https://api.github.com/users/FremyCompany/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T21:18:40 | 2025-05-09T10:57:19 | 2025-05-09T10:56:21 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37986",
"html_url": "https://github.com/huggingface/transformers/pull/37986",
"diff_url": "https://github.com/huggingface/transformers/pull/37986.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37986.patch",
"merged_at": "2025-05-09T10:56:21"
} | # What does this PR do?
Currently, any `cache_position` passed to `model.generate()` is silently replaced by the initial initialization. This seems wrong, since there is no need to reinitialize an argument that has already been passed. In some models, being able to pass custom cache_positions which are not 0-initialized is required for proper behavior.
This PR adds a check to the initialization code of model_kwargs['cache_position'] to return early if that argument was already provided.
There is no linked issue because I fixed the bug before filing an issue. PR is thus easier.
## 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?
I don't think that this warrants any documentation change, the current behavior is not described anywhere. I could add a test, but it would be very artificial. I think merging as-is is fine, but I welcome feedback.
## 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 @zucchini-nlp @gante | {
"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/37986/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/37986/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37985 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37985/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37985/comments | https://api.github.com/repos/huggingface/transformers/issues/37985/events | https://github.com/huggingface/transformers/pull/37985 | 3,043,760,546 | PR_kwDOCUB6oc6VKFGo | 37,985 | Fix Qwen models export with torch 2.7 | {
"login": "guangy10",
"id": 42389959,
"node_id": "MDQ6VXNlcjQyMzg5OTU5",
"avatar_url": "https://avatars.githubusercontent.com/u/42389959?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/guangy10",
"html_url": "https://github.com/guangy10",
"followers_url": "https://api.github.com/users/guangy10/followers",
"following_url": "https://api.github.com/users/guangy10/following{/other_user}",
"gists_url": "https://api.github.com/users/guangy10/gists{/gist_id}",
"starred_url": "https://api.github.com/users/guangy10/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/guangy10/subscriptions",
"organizations_url": "https://api.github.com/users/guangy10/orgs",
"repos_url": "https://api.github.com/users/guangy10/repos",
"events_url": "https://api.github.com/users/guangy10/events{/privacy}",
"received_events_url": "https://api.github.com/users/guangy10/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T19:08:50 | 2025-05-07T17:40:00 | 2025-05-07T07:13:08 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37985",
"html_url": "https://github.com/huggingface/transformers/pull/37985",
"diff_url": "https://github.com/huggingface/transformers/pull/37985.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37985.patch",
"merged_at": "2025-05-07T07:13:08"
} | # What does this PR do?
Due the regression in `torch 2.7` reported in https://github.com/pytorch/pytorch/issues/150994, export with `strict=True` will fail. The workaround is to toggle the `strict=False` on 2.7.
Fixes #37876
## Before submitting
- [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. #37876
- [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 @gante @ydshieh | {
"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/37985/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/37985/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37984 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37984/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37984/comments | https://api.github.com/repos/huggingface/transformers/issues/37984/events | https://github.com/huggingface/transformers/pull/37984 | 3,043,479,154 | PR_kwDOCUB6oc6VJHnC | 37,984 | Adds use_repr to model_addition_debugger_context | {
"login": "RyanMullins",
"id": 868555,
"node_id": "MDQ6VXNlcjg2ODU1NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/868555?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RyanMullins",
"html_url": "https://github.com/RyanMullins",
"followers_url": "https://api.github.com/users/RyanMullins/followers",
"following_url": "https://api.github.com/users/RyanMullins/following{/other_user}",
"gists_url": "https://api.github.com/users/RyanMullins/gists{/gist_id}",
"starred_url": "https://api.github.com/users/RyanMullins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RyanMullins/subscriptions",
"organizations_url": "https://api.github.com/users/RyanMullins/orgs",
"repos_url": "https://api.github.com/users/RyanMullins/repos",
"events_url": "https://api.github.com/users/RyanMullins/events{/privacy}",
"received_events_url": "https://api.github.com/users/RyanMullins/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T17:05:26 | 2025-05-23T09:35:43 | 2025-05-23T09:35:14 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37984",
"html_url": "https://github.com/huggingface/transformers/pull/37984",
"diff_url": "https://github.com/huggingface/transformers/pull/37984.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37984.patch",
"merged_at": "2025-05-23T09:35:14"
} | # What does this PR do?
Adds a `use_repr: bool` option to `model_addition_debugger_context` to support saving full tensors to disk instead of `repr()`-ized versions in the JSON file.
Fixes #37983
## 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.
@molbap @ArthurZucker
| {
"login": "molbap",
"id": 39954772,
"node_id": "MDQ6VXNlcjM5OTU0Nzcy",
"avatar_url": "https://avatars.githubusercontent.com/u/39954772?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/molbap",
"html_url": "https://github.com/molbap",
"followers_url": "https://api.github.com/users/molbap/followers",
"following_url": "https://api.github.com/users/molbap/following{/other_user}",
"gists_url": "https://api.github.com/users/molbap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/molbap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/molbap/subscriptions",
"organizations_url": "https://api.github.com/users/molbap/orgs",
"repos_url": "https://api.github.com/users/molbap/repos",
"events_url": "https://api.github.com/users/molbap/events{/privacy}",
"received_events_url": "https://api.github.com/users/molbap/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37984/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/37984/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37983 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37983/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37983/comments | https://api.github.com/repos/huggingface/transformers/issues/37983/events | https://github.com/huggingface/transformers/issues/37983 | 3,043,464,530 | I_kwDOCUB6oc61Z5VS | 37,983 | Support saving tensors to a file in Model addition debuggers | {
"login": "RyanMullins",
"id": 868555,
"node_id": "MDQ6VXNlcjg2ODU1NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/868555?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RyanMullins",
"html_url": "https://github.com/RyanMullins",
"followers_url": "https://api.github.com/users/RyanMullins/followers",
"following_url": "https://api.github.com/users/RyanMullins/following{/other_user}",
"gists_url": "https://api.github.com/users/RyanMullins/gists{/gist_id}",
"starred_url": "https://api.github.com/users/RyanMullins/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RyanMullins/subscriptions",
"organizations_url": "https://api.github.com/users/RyanMullins/orgs",
"repos_url": "https://api.github.com/users/RyanMullins/repos",
"events_url": "https://api.github.com/users/RyanMullins/events{/privacy}",
"received_events_url": "https://api.github.com/users/RyanMullins/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"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-05-06T16:59:02 | 2025-05-23T09:35:15 | 2025-05-23T09:35:15 | CONTRIBUTOR | null | null | null | null | ### Feature request
Current state: [`model_addition_debugger_context` context manager](https://huggingface.co/docs/transformers/v4.51.3/en/internal/model_debugging_utils#model-addition-debuggers) write out a `FULL_TENSORS.json` file containing `repr()`-ized version of the relevant tensors.
Request: Add a `use_repr: bool` option to `model_addition_debugger_context` that works exactly as above when `True` but saves the full tensors to disk using SafeTensors when set to `False`.
### Motivation
Some model adders, including me in my role as the Hugging Face lead for Gemma, release models on many platforms and need to perform numerical validations of logits across those implementations to ensure consistency and quality. The `repr()`-ized version in the current version of `model_addition_debugger_context` is insufficient to support these sorts of validations. Dumping the tensors to the JSON file will induce _a lot_ of bloat, so the best and most flexible option is to save the tensors to discrete files and reference those files from the `FULL_TENSORS.json` file.
### Your contribution
I am working on an implementation of this feature. | {
"login": "molbap",
"id": 39954772,
"node_id": "MDQ6VXNlcjM5OTU0Nzcy",
"avatar_url": "https://avatars.githubusercontent.com/u/39954772?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/molbap",
"html_url": "https://github.com/molbap",
"followers_url": "https://api.github.com/users/molbap/followers",
"following_url": "https://api.github.com/users/molbap/following{/other_user}",
"gists_url": "https://api.github.com/users/molbap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/molbap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/molbap/subscriptions",
"organizations_url": "https://api.github.com/users/molbap/orgs",
"repos_url": "https://api.github.com/users/molbap/repos",
"events_url": "https://api.github.com/users/molbap/events{/privacy}",
"received_events_url": "https://api.github.com/users/molbap/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37983/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/37983/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/37982 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37982/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37982/comments | https://api.github.com/repos/huggingface/transformers/issues/37982/events | https://github.com/huggingface/transformers/pull/37982 | 3,043,450,233 | PR_kwDOCUB6oc6VJBQU | 37,982 | [offload] respect `max_memory` argument when factoring in unused reserved memory | {
"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-05-06T16:52:06 | 2025-05-07T08:49:34 | 2025-05-07T08:49:31 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37982",
"html_url": "https://github.com/huggingface/transformers/pull/37982",
"diff_url": "https://github.com/huggingface/transformers/pull/37982.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37982.patch",
"merged_at": "2025-05-07T08:49:31"
} | # What does this PR do?
Our daily CI had >1000 new failures since #37920, on tests that use the `max_memory` argument in `from_pretrained`. This is because we now recapture unused reserved GPU memory, which caused us to go beyond the user-defined `max_memory`. This PR fixes it.
Affected tests, which set `max_memory`:
- `test_cpu_offload`
- `test_disk_offload_bin`
- `test_model_parallelism` | {
"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/37982/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/37982/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37981 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37981/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37981/comments | https://api.github.com/repos/huggingface/transformers/issues/37981/events | https://github.com/huggingface/transformers/pull/37981 | 3,043,385,519 | PR_kwDOCUB6oc6VIy2H | 37,981 | Updated BERTweet model card. | {
"login": "RogerSinghChugh",
"id": 35698080,
"node_id": "MDQ6VXNlcjM1Njk4MDgw",
"avatar_url": "https://avatars.githubusercontent.com/u/35698080?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RogerSinghChugh",
"html_url": "https://github.com/RogerSinghChugh",
"followers_url": "https://api.github.com/users/RogerSinghChugh/followers",
"following_url": "https://api.github.com/users/RogerSinghChugh/following{/other_user}",
"gists_url": "https://api.github.com/users/RogerSinghChugh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/RogerSinghChugh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RogerSinghChugh/subscriptions",
"organizations_url": "https://api.github.com/users/RogerSinghChugh/orgs",
"repos_url": "https://api.github.com/users/RogerSinghChugh/repos",
"events_url": "https://api.github.com/users/RogerSinghChugh/events{/privacy}",
"received_events_url": "https://api.github.com/users/RogerSinghChugh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T16:26:35 | 2025-05-27T18:51:23 | 2025-05-27T18:51:22 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37981",
"html_url": "https://github.com/huggingface/transformers/pull/37981",
"diff_url": "https://github.com/huggingface/transformers/pull/37981.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37981.patch",
"merged_at": "2025-05-27T18:51:22"
} | # What does this PR do?
As mentioned in the issue https://github.com/huggingface/transformers/issues/36979 this PR updates the documentation of the BigBird model, which will now be aligned with the standardized format for all the docs.
<!--
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).
- [ ] 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?
@stevhliu
<!-- 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 and @SunMarc
- 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/37981/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/37981/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37980 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37980/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37980/comments | https://api.github.com/repos/huggingface/transformers/issues/37980/events | https://github.com/huggingface/transformers/pull/37980 | 3,043,322,958 | PR_kwDOCUB6oc6VIky0 | 37,980 | update seed_worker to set seed based on worker_id and rank | {
"login": "gathierry",
"id": 4011873,
"node_id": "MDQ6VXNlcjQwMTE4NzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4011873?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gathierry",
"html_url": "https://github.com/gathierry",
"followers_url": "https://api.github.com/users/gathierry/followers",
"following_url": "https://api.github.com/users/gathierry/following{/other_user}",
"gists_url": "https://api.github.com/users/gathierry/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gathierry/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gathierry/subscriptions",
"organizations_url": "https://api.github.com/users/gathierry/orgs",
"repos_url": "https://api.github.com/users/gathierry/repos",
"events_url": "https://api.github.com/users/gathierry/events{/privacy}",
"received_events_url": "https://api.github.com/users/gathierry/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T16:06:49 | 2025-05-12T23:55:18 | 2025-05-12T15:59:17 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37980",
"html_url": "https://github.com/huggingface/transformers/pull/37980",
"diff_url": "https://github.com/huggingface/transformers/pull/37980.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37980.patch",
"merged_at": "2025-05-12T15:59:17"
} | # 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 #37932
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?
## Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
<!-- 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 and @SunMarc
- 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/37980/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/37980/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37979 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37979/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37979/comments | https://api.github.com/repos/huggingface/transformers/issues/37979/events | https://github.com/huggingface/transformers/issues/37979 | 3,043,093,376 | I_kwDOCUB6oc61YeuA | 37,979 | model.generate() leads to poor generation quality when providing a batch of sample with various length with some translation models | {
"login": "MaxLSB",
"id": 156920921,
"node_id": "U_kgDOCVpsWQ",
"avatar_url": "https://avatars.githubusercontent.com/u/156920921?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MaxLSB",
"html_url": "https://github.com/MaxLSB",
"followers_url": "https://api.github.com/users/MaxLSB/followers",
"following_url": "https://api.github.com/users/MaxLSB/following{/other_user}",
"gists_url": "https://api.github.com/users/MaxLSB/gists{/gist_id}",
"starred_url": "https://api.github.com/users/MaxLSB/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MaxLSB/subscriptions",
"organizations_url": "https://api.github.com/users/MaxLSB/orgs",
"repos_url": "https://api.github.com/users/MaxLSB/repos",
"events_url": "https://api.github.com/users/MaxLSB/events{/privacy}",
"received_events_url": "https://api.github.com/users/MaxLSB/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-05-06T14:44:54 | 2025-05-06T15:07:56 | 2025-05-06T15:07:55 | NONE | null | null | null | null | ## System Info
Name: transformers
Version: 4.49.0
Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow
Home-page: https://github.com/huggingface/transformers
Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)
Author-email: transformers@huggingface.co
License: Apache 2.0 License
Location: c:\users\mlasb\anaconda3\envs\triton_env\lib\site-packages
Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm
Required-by: peft
## Who can help?
@ArthurZucker @gante
## 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
`from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, BitsAndBytesConfig
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(f"> Using device: {device}")
model_name = "facebook/nllb-200-1.3B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
tokenizer.src_lang = "eng_Latn"
tokenizer.tgt_lang = "fra_Latn"
tokenizer.padding_side = "right"
print("> Tokenizer loaded.")
bnb_config = BitsAndBytesConfig(
load_in_8bit=True,
llm_int8_enable_fp32_cpu_offload=True,
)
model = AutoModelForSeq2SeqLM.from_pretrained(
model_name,
device_map="auto",
torch_dtype=torch.float16,
quantization_config=bnb_config,
)
model.eval()
print("> Model loaded.")
texts = [
"""Once upon a time, in a big forest, there lived a rhinoceros named Roxy. Roxy loved to climb. She climbed trees, rocks, and hills. One day, Roxy found an icy hill. She had never seen anything like it before. It was shiny and cold, and she wanted to climb it. Roxy tried to climb the icy hill, but it was very slippery. She tried again and again, but she kept falling down. Roxy was sad. She wanted to climb the icy hill so much. Then, she saw a little bird named Billy. Billy saw that Roxy was sad and asked, "Why are you sad, Roxy?" Roxy told Billy about the icy hill and how she couldn't climb it. Billy said, "I have an idea! Let's find some big leaves to put under your feet. They will help you climb the icy hill." Roxy and Billy looked for big leaves and found some. Roxy put the leaves under her feet and tried to climb the icy hill again.""",
"""Spot. Spot saw the shiny car and said, "Wow, Kitty, your car is so bright and clean!" Kitty smiled and replied, "Thank you, Spot. I polish it every day." After playing with the car, Kitty and Spot felt thirsty. They found a small pond with clear water. They drank the water and felt very happy. They played together all day and became best friends.""",
"""Hello how are you doing? I am doing well. I am learning how to code in Python. It is a lot of fun! I hope you are having a great day too!""",
]
inputs = tokenizer(
texts,
return_tensors="pt",
truncation=True,
padding=True,
max_length=256,
)
inputs = inputs.to(device)
target_lang_token = tokenizer.convert_tokens_to_ids(tokenizer.tgt_lang)
outputs = model.generate(
input_ids=inputs["input_ids"],
attention_mask=inputs["attention_mask"],
forced_bos_token_id=target_lang_token,
max_length=256,
)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
`
## Expected behavior
Hello,
When using the "facebook/nllb-200-1.3B" or "facebook/nllb-200-distilled-1.3B" translation models (and possibly other models as well), I noticed that providing a batch of inputs with highly varying lengths leads to poor translations (when translating from english to french at least), especially for the shorter samples. However, when I translate these short samples individually, the results are accurate. So I think something is not working correctly...
Basically it work properly with a single sample. And it doesn't work properly when given a batch of samples of various length (for the shorter ones).
Is there a known way to address this issue? Could it be related to padding, to the models themselves or how model.generate() handles batches?
## Examples
- The 2nd and 3rd translations are the problem in the example:
['Il était une fois, dans une grande forêt, un rhinocéros nommé Roxy. Roxy aimait grimper. Elle grimpait des arbres, des rochers et des collines. Un jour, Roxy trouva une colline glacée. Elle n\'avait jamais rien vu de tel auparavant. C\'était brillant et froid, et elle voulait y grimper. Roxy essaya de grimper la colline glacée, mais elle était très glissante. Elle essaya encore et encore, mais elle continuait à tomber. Roxy était triste. Elle voulait tellement grimper la colline glacée. Puis, elle a vu un petit oiseau nommé Billy. Billy a vu que Roxy était triste et a demandé: "Pourquoi es-tu triste, Roxy?" Roxy a parlé à Billy de la colline glacée et de la façon dont elle ne pouvait pas l\'escalader. Billy a dit: "J\'ai une idée! Allons trouver des grandes feuilles à mettre sous tes pieds. Ils vont t\'aider à grimper la colline glacée". Billy a cherché de nouveau et Roxy a essayé de',
'On peut aussi lui demander de lui donner un coup de main. " Et si vous aviez un coup de main, vous auriez pu le faire. " On pourrait lui demander de lui donner un coup de main. " Et si vous aviez un coup de main, vous auriez pu le faire. "', 'Wiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwiwi']
- Here are the correct translations obtained when giving only these samples as input (batch of size 1):
Second sample: ['Spot a vu la voiture brillante et a dit: " Wow, Kitty, ta voiture est si brillante et propre ! " Kitty a souri et a répondu: " Merci, Spot. Je la polisse tous les jours. " Après avoir joué avec la voiture, Kitty et Spot ont eu soif. Ils ont trouvé un petit étang avec de l\'eau claire. Ils ont bu l\'eau et se sont sentis très heureux. Ils ont joué ensemble toute la journée et sont devenus les meilleurs amis.']
Third sample: ["Bonjour, comment allez-vous ? Je vais bien. J'apprends à coder en Python. C'est très amusant ! J'espère que vous passez une bonne journée aussi !"]
| {
"login": "MaxLSB",
"id": 156920921,
"node_id": "U_kgDOCVpsWQ",
"avatar_url": "https://avatars.githubusercontent.com/u/156920921?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MaxLSB",
"html_url": "https://github.com/MaxLSB",
"followers_url": "https://api.github.com/users/MaxLSB/followers",
"following_url": "https://api.github.com/users/MaxLSB/following{/other_user}",
"gists_url": "https://api.github.com/users/MaxLSB/gists{/gist_id}",
"starred_url": "https://api.github.com/users/MaxLSB/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MaxLSB/subscriptions",
"organizations_url": "https://api.github.com/users/MaxLSB/orgs",
"repos_url": "https://api.github.com/users/MaxLSB/repos",
"events_url": "https://api.github.com/users/MaxLSB/events{/privacy}",
"received_events_url": "https://api.github.com/users/MaxLSB/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37979/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/37979/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/37978 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37978/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37978/comments | https://api.github.com/repos/huggingface/transformers/issues/37978/events | https://github.com/huggingface/transformers/pull/37978 | 3,042,566,999 | PR_kwDOCUB6oc6VF-2b | 37,978 | Fix typos | {
"login": "omahs",
"id": 73983677,
"node_id": "MDQ6VXNlcjczOTgzNjc3",
"avatar_url": "https://avatars.githubusercontent.com/u/73983677?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/omahs",
"html_url": "https://github.com/omahs",
"followers_url": "https://api.github.com/users/omahs/followers",
"following_url": "https://api.github.com/users/omahs/following{/other_user}",
"gists_url": "https://api.github.com/users/omahs/gists{/gist_id}",
"starred_url": "https://api.github.com/users/omahs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/omahs/subscriptions",
"organizations_url": "https://api.github.com/users/omahs/orgs",
"repos_url": "https://api.github.com/users/omahs/repos",
"events_url": "https://api.github.com/users/omahs/events{/privacy}",
"received_events_url": "https://api.github.com/users/omahs/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T11:49:24 | 2025-05-06T13:45:50 | 2025-05-06T13:45:20 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37978",
"html_url": "https://github.com/huggingface/transformers/pull/37978",
"diff_url": "https://github.com/huggingface/transformers/pull/37978.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37978.patch",
"merged_at": "2025-05-06T13:45:20"
} | Fix 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/37978/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/37978/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37977 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37977/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37977/comments | https://api.github.com/repos/huggingface/transformers/issues/37977/events | https://github.com/huggingface/transformers/issues/37977 | 3,042,552,727 | I_kwDOCUB6oc61WauX | 37,977 | ValueError: Tokenizer class LlamaTokenizerFast does not exist or is not currently imported. | {
"login": "hkqiu",
"id": 73220956,
"node_id": "MDQ6VXNlcjczMjIwOTU2",
"avatar_url": "https://avatars.githubusercontent.com/u/73220956?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hkqiu",
"html_url": "https://github.com/hkqiu",
"followers_url": "https://api.github.com/users/hkqiu/followers",
"following_url": "https://api.github.com/users/hkqiu/following{/other_user}",
"gists_url": "https://api.github.com/users/hkqiu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hkqiu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hkqiu/subscriptions",
"organizations_url": "https://api.github.com/users/hkqiu/orgs",
"repos_url": "https://api.github.com/users/hkqiu/repos",
"events_url": "https://api.github.com/users/hkqiu/events{/privacy}",
"received_events_url": "https://api.github.com/users/hkqiu/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-05-06T11:44:24 | 2025-05-06T12:38:22 | 2025-05-06T12:38:22 | NONE | null | null | null | null | ### System Info
transformers 4.26.1 pypi_0 pypi
### Who can help?
_No response_
### 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
tokenizer = AutoTokenizer.from_pretrained(model_path)
ValueError: Tokenizer class LlamaTokenizerFast does not exist or is not currently imported.
### Expected behavior
I use the base model and its config from https://huggingface.co/deepseek-ai/deepseek-llm-7b-chat/blob/main/tokenizer_config.json.
This bug is suddenly out today, while I have used this version for model traning and deploying.
I tried to update to 4.27.0 but still got this bug. Latest version like 4.51.X is not compatible with others needed requirement so maybe I need use 4.2X.X.
Hope someone can help! Thanks!!! | {
"login": "hkqiu",
"id": 73220956,
"node_id": "MDQ6VXNlcjczMjIwOTU2",
"avatar_url": "https://avatars.githubusercontent.com/u/73220956?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hkqiu",
"html_url": "https://github.com/hkqiu",
"followers_url": "https://api.github.com/users/hkqiu/followers",
"following_url": "https://api.github.com/users/hkqiu/following{/other_user}",
"gists_url": "https://api.github.com/users/hkqiu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hkqiu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hkqiu/subscriptions",
"organizations_url": "https://api.github.com/users/hkqiu/orgs",
"repos_url": "https://api.github.com/users/hkqiu/repos",
"events_url": "https://api.github.com/users/hkqiu/events{/privacy}",
"received_events_url": "https://api.github.com/users/hkqiu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37977/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/37977/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/37976 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37976/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37976/comments | https://api.github.com/repos/huggingface/transformers/issues/37976/events | https://github.com/huggingface/transformers/pull/37976 | 3,042,547,054 | PR_kwDOCUB6oc6VF6bs | 37,976 | CI result inspector util | {
"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-05-06T11:42:08 | 2025-10-16T22:45:28 | 2025-10-16T22:45:28 | MEMBER | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37976",
"html_url": "https://github.com/huggingface/transformers/pull/37976",
"diff_url": "https://github.com/huggingface/transformers/pull/37976.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37976.patch",
"merged_at": null
} | This util lets us compare different CI run results. Can be used to find tests that are failing on one specific architecture, or find tests that are failing on multiple/all architectures (in which case perhaps the test isn't working at all).
Example usage:
`python3 utils/ci_results_inspector.py -a 14837567374 -b 14850580148 --output_dir ~/transformers-ci --token <...>`
This will print all the tests that are failing in `14837567374` that are not failing in `14837567374`.
You can also specify the `operator` used, where you can either use `|` for OR, or `&` for AND operations.
`python3 utils/ci_results_inspector.py -op '&' -a 14837567374 -b 14850580148 --output_dir ~/transformers-ci --token <...>`
This will print all tests that are failing in both runs.
Bring your own token 🫡 | {
"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/37976/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/37976/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37975 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37975/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37975/comments | https://api.github.com/repos/huggingface/transformers/issues/37975/events | https://github.com/huggingface/transformers/pull/37975 | 3,042,492,741 | PR_kwDOCUB6oc6VFudG | 37,975 | [vLLM] GPT2 with transformers backend | {
"login": "ariG23498",
"id": 36856589,
"node_id": "MDQ6VXNlcjM2ODU2NTg5",
"avatar_url": "https://avatars.githubusercontent.com/u/36856589?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ariG23498",
"html_url": "https://github.com/ariG23498",
"followers_url": "https://api.github.com/users/ariG23498/followers",
"following_url": "https://api.github.com/users/ariG23498/following{/other_user}",
"gists_url": "https://api.github.com/users/ariG23498/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ariG23498/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ariG23498/subscriptions",
"organizations_url": "https://api.github.com/users/ariG23498/orgs",
"repos_url": "https://api.github.com/users/ariG23498/repos",
"events_url": "https://api.github.com/users/ariG23498/events{/privacy}",
"received_events_url": "https://api.github.com/users/ariG23498/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-05-06T11:21:02 | 2025-05-07T07:18:30 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37975",
"html_url": "https://github.com/huggingface/transformers/pull/37975",
"diff_url": "https://github.com/huggingface/transformers/pull/37975.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37975.patch",
"merged_at": null
} | I am pretty sure the merge resolution (#36943) removed the current changes.
You can run the following with `vLLM` to check the current changes.
```
python examples/offline_inference/basic/generate.py --model gpt2 --model-impl transformers --enforce-eager
``` | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37975/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/37975/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37974 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37974/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37974/comments | https://api.github.com/repos/huggingface/transformers/issues/37974/events | https://github.com/huggingface/transformers/pull/37974 | 3,042,392,709 | PR_kwDOCUB6oc6VFYdS | 37,974 | [caches] Raise exception on offloaded static caches + multi device | {
"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-05-06T10:41:48 | 2025-05-09T13:57:14 | 2025-05-08T13:37:36 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37974",
"html_url": "https://github.com/huggingface/transformers/pull/37974",
"diff_url": "https://github.com/huggingface/transformers/pull/37974.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37974.patch",
"merged_at": "2025-05-08T13:37:36"
} | # What does this PR do?
Follow-up to this comment: https://github.com/huggingface/transformers/pull/37922#issuecomment-2854023534
Tests for offloaded static caches are failing on multiple devices because the implementation of these caches doesn't work with multiple devices. This PR raises an informative exception and skips the tests when this happens.
Although I think it is fixable (see added TODO), I don't think it's worth the effort for now. | {
"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/37974/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/37974/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37973 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37973/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37973/comments | https://api.github.com/repos/huggingface/transformers/issues/37973/events | https://github.com/huggingface/transformers/pull/37973 | 3,042,263,867 | PR_kwDOCUB6oc6VE7-f | 37,973 | add job links to new model failure report | {
"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-05-06T10:02:55 | 2025-05-06T13:10:31 | 2025-05-06T13:10:30 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37973",
"html_url": "https://github.com/huggingface/transformers/pull/37973",
"diff_url": "https://github.com/huggingface/transformers/pull/37973.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37973.patch",
"merged_at": "2025-05-06T13:10:30"
} | # What does this PR do?
Make it is easier to go to the job run page when checking new model failures.
Previous, it looks like
```json
{
"ydshieh": {
"vit": {
"single-gpu": [
{
"test": "tests/models/vit/test_modeling_vit.py::ViTModelTest::test_config",
"commit": "e93eb60c536481c646c34d8991fb4fdd78f44d5d",
"pr_number": null,
"author": "ydshieh",
"merged_by": null,
}
]
}
}
}
```
Now it has `"job_link": ...` (see the last attribute) like below
```json
{
"ydshieh": {
"vit": {
"single-gpu": [
{
"test": "tests/models/vit/test_modeling_vit.py::ViTModelTest::test_config",
"commit": "e93eb60c536481c646c34d8991fb4fdd78f44d5d",
"pr_number": null,
"author": "ydshieh",
"merged_by": null,
"job_link": "https://github.com/huggingface/transformers/actions/runs/14856110212/job/41710279591"
}
]
}
}
}
``` | {
"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/37973/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/37973/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37972 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37972/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37972/comments | https://api.github.com/repos/huggingface/transformers/issues/37972/events | https://github.com/huggingface/transformers/pull/37972 | 3,042,251,305 | PR_kwDOCUB6oc6VE5J5 | 37,972 | New cache tests and modular Hybrid Cache | {
"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-05-06T09:59:39 | 2025-05-20T10:46:13 | 2025-05-20T10:46:13 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37972",
"html_url": "https://github.com/huggingface/transformers/pull/37972",
"diff_url": "https://github.com/huggingface/transformers/pull/37972.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37972.patch",
"merged_at": "2025-05-20T10:46:13"
} | ## What does this PR do?
1. Refactor out the cache update logic for static and sliding window attention mechanisms.
Extracts the core update logic into two new utility functions: `_static_cache_update_logic` and `_sliding_cache_update_logic`. This way, there is only one implementation for StaticCache, SlidingWindowCache, and HybridCache.
@ArthurZucker @gante this is a first step towards per-layer modular cache definitions.
2. Added new synthetic tests for caches. Fixes #37574 and should catch similar bugs.
This is preliminary work for #38077 | {
"login": "manueldeprada",
"id": 6536835,
"node_id": "MDQ6VXNlcjY1MzY4MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/manueldeprada",
"html_url": "https://github.com/manueldeprada",
"followers_url": "https://api.github.com/users/manueldeprada/followers",
"following_url": "https://api.github.com/users/manueldeprada/following{/other_user}",
"gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions",
"organizations_url": "https://api.github.com/users/manueldeprada/orgs",
"repos_url": "https://api.github.com/users/manueldeprada/repos",
"events_url": "https://api.github.com/users/manueldeprada/events{/privacy}",
"received_events_url": "https://api.github.com/users/manueldeprada/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37972/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 1,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37972/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37971 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37971/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37971/comments | https://api.github.com/repos/huggingface/transformers/issues/37971/events | https://github.com/huggingface/transformers/issues/37971 | 3,042,223,760 | I_kwDOCUB6oc61VKaQ | 37,971 | Add `pruna` integration for loading model through `transformers.from_pretrained` / `pipeline`. | {
"login": "davidberenstein1957",
"id": 25269220,
"node_id": "MDQ6VXNlcjI1MjY5MjIw",
"avatar_url": "https://avatars.githubusercontent.com/u/25269220?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidberenstein1957",
"html_url": "https://github.com/davidberenstein1957",
"followers_url": "https://api.github.com/users/davidberenstein1957/followers",
"following_url": "https://api.github.com/users/davidberenstein1957/following{/other_user}",
"gists_url": "https://api.github.com/users/davidberenstein1957/gists{/gist_id}",
"starred_url": "https://api.github.com/users/davidberenstein1957/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidberenstein1957/subscriptions",
"organizations_url": "https://api.github.com/users/davidberenstein1957/orgs",
"repos_url": "https://api.github.com/users/davidberenstein1957/repos",
"events_url": "https://api.github.com/users/davidberenstein1957/events{/privacy}",
"received_events_url": "https://api.github.com/users/davidberenstein1957/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-05-06T09:51:57 | 2025-07-17T09:58:22 | null | NONE | null | null | null | null | ### Feature request
[Pruna](https://github.com/PrunaAI/pruna) is an open source AI model Optimization framework.
As discussed with @SunMarc, it would be nice to load Pruna optimized models through the `transformers.from_pretrained` interface as an alternative to the [PrunaModel](https://docs.pruna.ai/en/stable/docs_pruna/user_manual/save_load.html#saving-and-loading-models) interface.
Currently, the code looks as follows.
```python
from pruna import PrunaModel
loaded_model = PrunaModel.from_hub("PrunaAI/opt-125m-smashed")
```
We could go for something like.
```python
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="PrunaAI/opt-125m-smashed")
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("PrunaAI/opt-125m-smashed")
model = AutoModelForCausalLM.from_pretrained("PrunaAI/opt-125m-smashed")
```
### Motivation
It would be a nice integration.
### Your contribution
We can submit a PR from our side.
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37971/reactions",
"total_count": 2,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 1,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37971/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/37970 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37970/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37970/comments | https://api.github.com/repos/huggingface/transformers/issues/37970/events | https://github.com/huggingface/transformers/pull/37970 | 3,042,183,139 | PR_kwDOCUB6oc6VEqCX | 37,970 | [CI] remove duplicated message on GH comment to run slow tests | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T09:38:04 | 2025-05-08T13:35:58 | 2025-05-08T13:35:55 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37970",
"html_url": "https://github.com/huggingface/transformers/pull/37970",
"diff_url": "https://github.com/huggingface/transformers/pull/37970.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37970.patch",
"merged_at": "2025-05-08T13:35:55"
} | # What does this PR do?
`This comment contains run-slow, running the specified jobs:` appears twice on the GH comment to trigger slow tests ([example](https://github.com/huggingface/transformers/pull/37922#issuecomment-2853876256)).
This PR removes one of the copies 🤗 | {
"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/37970/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/37970/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37969 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37969/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37969/comments | https://api.github.com/repos/huggingface/transformers/issues/37969/events | https://github.com/huggingface/transformers/pull/37969 | 3,041,902,175 | PR_kwDOCUB6oc6VDsTq | 37,969 | add xpu memory check | {
"login": "faaany",
"id": 24477841,
"node_id": "MDQ6VXNlcjI0NDc3ODQx",
"avatar_url": "https://avatars.githubusercontent.com/u/24477841?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/faaany",
"html_url": "https://github.com/faaany",
"followers_url": "https://api.github.com/users/faaany/followers",
"following_url": "https://api.github.com/users/faaany/following{/other_user}",
"gists_url": "https://api.github.com/users/faaany/gists{/gist_id}",
"starred_url": "https://api.github.com/users/faaany/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/faaany/subscriptions",
"organizations_url": "https://api.github.com/users/faaany/orgs",
"repos_url": "https://api.github.com/users/faaany/repos",
"events_url": "https://api.github.com/users/faaany/events{/privacy}",
"received_events_url": "https://api.github.com/users/faaany/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T08:00:33 | 2025-05-06T09:57:50 | 2025-05-06T09:57:50 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37969",
"html_url": "https://github.com/huggingface/transformers/pull/37969",
"diff_url": "https://github.com/huggingface/transformers/pull/37969.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37969.patch",
"merged_at": "2025-05-06T09:57:50"
} | ## What does this PR do?
The issue addressed in this PR https://github.com/huggingface/transformers/pull/37920 also applies to other GPUs. Otherwise, the device index in `device_map` on Intel GPU and NV GPU doesn't align with each other. On CUDA, this is {"": 0}, but on XPU this is {"": 1}, which leads to following test fails:
```bash
tests/peft_integration/test_peft_integration.py::PeftIntegrationTester::test_peft_from_pretrained_kwargs
```
cc @gante and @Rocketknight1
| {
"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/37969/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/37969/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37968 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37968/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37968/comments | https://api.github.com/repos/huggingface/transformers/issues/37968/events | https://github.com/huggingface/transformers/pull/37968 | 3,041,642,217 | PR_kwDOCUB6oc6VCyU5 | 37,968 | [docs] add uv installation instructions for source builds | {
"login": "arjunaskykok",
"id": 32124593,
"node_id": "MDQ6VXNlcjMyMTI0NTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/32124593?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arjunaskykok",
"html_url": "https://github.com/arjunaskykok",
"followers_url": "https://api.github.com/users/arjunaskykok/followers",
"following_url": "https://api.github.com/users/arjunaskykok/following{/other_user}",
"gists_url": "https://api.github.com/users/arjunaskykok/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arjunaskykok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arjunaskykok/subscriptions",
"organizations_url": "https://api.github.com/users/arjunaskykok/orgs",
"repos_url": "https://api.github.com/users/arjunaskykok/repos",
"events_url": "https://api.github.com/users/arjunaskykok/events{/privacy}",
"received_events_url": "https://api.github.com/users/arjunaskykok/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-06T06:23:16 | 2025-05-14T13:11:52 | 2025-05-14T13:09:41 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37968",
"html_url": "https://github.com/huggingface/transformers/pull/37968",
"diff_url": "https://github.com/huggingface/transformers/pull/37968.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37968.patch",
"merged_at": "2025-05-14T13:09:41"
} | # What does this PR do?
Fixes #37956
## Who can review?
@vasqu | {
"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/37968/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/37968/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37967 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37967/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37967/comments | https://api.github.com/repos/huggingface/transformers/issues/37967/events | https://github.com/huggingface/transformers/pull/37967 | 3,041,044,606 | PR_kwDOCUB6oc6VAvko | 37,967 | feat: Add encode, patch_token to RagTokenizer (fixes #35532) | {
"login": "demoncoder-crypto",
"id": 174311533,
"node_id": "U_kgDOCmPIbQ",
"avatar_url": "https://avatars.githubusercontent.com/u/174311533?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/demoncoder-crypto",
"html_url": "https://github.com/demoncoder-crypto",
"followers_url": "https://api.github.com/users/demoncoder-crypto/followers",
"following_url": "https://api.github.com/users/demoncoder-crypto/following{/other_user}",
"gists_url": "https://api.github.com/users/demoncoder-crypto/gists{/gist_id}",
"starred_url": "https://api.github.com/users/demoncoder-crypto/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/demoncoder-crypto/subscriptions",
"organizations_url": "https://api.github.com/users/demoncoder-crypto/orgs",
"repos_url": "https://api.github.com/users/demoncoder-crypto/repos",
"events_url": "https://api.github.com/users/demoncoder-crypto/events{/privacy}",
"received_events_url": "https://api.github.com/users/demoncoder-crypto/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-05-05T23:11:26 | 2025-05-07T10:12:33 | null | NONE | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37967",
"html_url": "https://github.com/huggingface/transformers/pull/37967",
"diff_url": "https://github.com/huggingface/transformers/pull/37967.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37967.patch",
"merged_at": null
} | Addresses #35532. Please do let me know if the implementation is correct | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37967/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/37967/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37966 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37966/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37966/comments | https://api.github.com/repos/huggingface/transformers/issues/37966/events | https://github.com/huggingface/transformers/pull/37966 | 3,041,034,185 | PR_kwDOCUB6oc6VAtRm | 37,966 | Autodoc refactor update | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-05-05T23:04:59 | 2025-05-05T23:06:00 | 2025-05-05T23:06:00 | MEMBER | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37966",
"html_url": "https://github.com/huggingface/transformers/pull/37966",
"diff_url": "https://github.com/huggingface/transformers/pull/37966.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37966.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 and @SunMarc
- 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": "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/37966/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/37966/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37965 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37965/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37965/comments | https://api.github.com/repos/huggingface/transformers/issues/37965/events | https://github.com/huggingface/transformers/pull/37965 | 3,041,016,589 | PR_kwDOCUB6oc6VApZc | 37,965 | Autodoc refactor update | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-05-05T22:51:41 | 2025-05-05T23:03:14 | 2025-05-05T23:03:14 | MEMBER | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37965",
"html_url": "https://github.com/huggingface/transformers/pull/37965",
"diff_url": "https://github.com/huggingface/transformers/pull/37965.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37965.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 and @SunMarc
- 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": "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/37965/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/37965/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37964 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37964/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37964/comments | https://api.github.com/repos/huggingface/transformers/issues/37964/events | https://github.com/huggingface/transformers/pull/37964 | 3,040,294,640 | PR_kwDOCUB6oc6U-JVc | 37,964 | Fix typo | {
"login": "lkm2835",
"id": 30465912,
"node_id": "MDQ6VXNlcjMwNDY1OTEy",
"avatar_url": "https://avatars.githubusercontent.com/u/30465912?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lkm2835",
"html_url": "https://github.com/lkm2835",
"followers_url": "https://api.github.com/users/lkm2835/followers",
"following_url": "https://api.github.com/users/lkm2835/following{/other_user}",
"gists_url": "https://api.github.com/users/lkm2835/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lkm2835/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lkm2835/subscriptions",
"organizations_url": "https://api.github.com/users/lkm2835/orgs",
"repos_url": "https://api.github.com/users/lkm2835/repos",
"events_url": "https://api.github.com/users/lkm2835/events{/privacy}",
"received_events_url": "https://api.github.com/users/lkm2835/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T17:17:10 | 2025-05-06T13:59:01 | 2025-05-06T13:59:01 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37964",
"html_url": "https://github.com/huggingface/transformers/pull/37964",
"diff_url": "https://github.com/huggingface/transformers/pull/37964.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37964.patch",
"merged_at": "2025-05-06T13:59:01"
} | # 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 minor typo
## 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?
| {
"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/37964/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/37964/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37963 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37963/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37963/comments | https://api.github.com/repos/huggingface/transformers/issues/37963/events | https://github.com/huggingface/transformers/pull/37963 | 3,039,778,997 | PR_kwDOCUB6oc6U8YYm | 37,963 | Object detection experiment | {
"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-05-05T14:01:52 | 2025-05-05T14:02:05 | null | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37963",
"html_url": "https://github.com/huggingface/transformers/pull/37963",
"diff_url": "https://github.com/huggingface/transformers/pull/37963.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37963.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 -->
I will generate the standard metric for
**how well the transformers object detection model finetune in diverse domain of data?**
In this step I will focus on
batch_size | learning rate | model | dataset | AP | training time | required memory
-- | -- | -- | -- | -- | -- | --
on different domain of dataset.
https://www.notion.so/sangbumchoi/HuggingFace-OD-train-1afb8ded2e1680daa2dcfdc3e11aa15d?pvs=4
This is initial experiment of four models that you have suggested.

cc. @qubvel
## 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 and @SunMarc
- 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/37963/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/37963/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37962 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37962/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37962/comments | https://api.github.com/repos/huggingface/transformers/issues/37962/events | https://github.com/huggingface/transformers/pull/37962 | 3,039,763,380 | PR_kwDOCUB6oc6U8U8m | 37,962 | enable d_fine finetuning properly | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-05-05T13:56:26 | 2025-05-14T15:53:04 | 2025-05-14T15:53:04 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37962",
"html_url": "https://github.com/huggingface/transformers/pull/37962",
"diff_url": "https://github.com/huggingface/transformers/pull/37962.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37962.patch",
"merged_at": "2025-05-14T15:53:04"
} | # 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 -->
@qubvel as you suggested I have changed with very minimal code. Also seperated PR!
https://github.com/huggingface/transformers/pull/37952
## 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 and @SunMarc
- 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/37962/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/37962/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37961 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37961/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37961/comments | https://api.github.com/repos/huggingface/transformers/issues/37961/events | https://github.com/huggingface/transformers/pull/37961 | 3,039,758,952 | PR_kwDOCUB6oc6U8T9w | 37,961 | Use T4 single GPU runner with more CPU RAM | {
"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-05-05T13:54:50 | 2025-05-05T14:17:47 | 2025-05-05T14:17:45 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37961",
"html_url": "https://github.com/huggingface/transformers/pull/37961",
"diff_url": "https://github.com/huggingface/transformers/pull/37961.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37961.patch",
"merged_at": "2025-05-05T14:17:45"
} | # What does this PR do?
Currently this runner type has only 32G CPU RAM, and the new one has 64G RAM. | {
"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/37961/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/37961/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37960 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37960/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37960/comments | https://api.github.com/repos/huggingface/transformers/issues/37960/events | https://github.com/huggingface/transformers/pull/37960 | 3,039,726,664 | PR_kwDOCUB6oc6U8M7U | 37,960 | Add ALL_ATTENTION_FUNCTIONS compatibility for Pixtral model | {
"login": "uminaty",
"id": 56725662,
"node_id": "MDQ6VXNlcjU2NzI1NjYy",
"avatar_url": "https://avatars.githubusercontent.com/u/56725662?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/uminaty",
"html_url": "https://github.com/uminaty",
"followers_url": "https://api.github.com/users/uminaty/followers",
"following_url": "https://api.github.com/users/uminaty/following{/other_user}",
"gists_url": "https://api.github.com/users/uminaty/gists{/gist_id}",
"starred_url": "https://api.github.com/users/uminaty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/uminaty/subscriptions",
"organizations_url": "https://api.github.com/users/uminaty/orgs",
"repos_url": "https://api.github.com/users/uminaty/repos",
"events_url": "https://api.github.com/users/uminaty/events{/privacy}",
"received_events_url": "https://api.github.com/users/uminaty/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T13:42:58 | 2025-05-08T20:47:07 | 2025-05-08T10:13:14 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37960",
"html_url": "https://github.com/huggingface/transformers/pull/37960",
"diff_url": "https://github.com/huggingface/transformers/pull/37960.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37960.patch",
"merged_at": "2025-05-08T10:13:14"
} | ### What does this PR do?
This PR adds support for `ALL_ATTENTION_FUNCTIONS` to the Pixtral model’s attention mechanism. I added and verified compatibility with `sdpa`, `flash_attention_2`, and `flex_attention`. Since Pixtral also serves as the vision tower in `Mistral 3.1`, users can now set the entire model to use `flash_attention_2`.
I tried to follow the implementation pattern of other models using this interface. For `flash_attention_2`, I reused `position_ids` because the existing attention mask shape isn’t supported. Since Pixtral uses sequence packing and already generates `position_ids`, we leverage [`prepare_fa2_from_position_ids`](https://github.com/huggingface/transformers/blob/afbc293e2b8523bfc92232d8a8d50e29bdce9f41/src/transformers/modeling_flash_attention_utils.py#L184) instead of a mask.
I tested these changes in training and inference: losses match very closely and we observe a 10–25 % throughput improvement depending on the setup.
### Who can review?
- @amyeroberts
- @qubvel
- @ArthurZucker
| {
"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/37960/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/37960/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37959 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37959/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37959/comments | https://api.github.com/repos/huggingface/transformers/issues/37959/events | https://github.com/huggingface/transformers/pull/37959 | 3,039,501,228 | PR_kwDOCUB6oc6U7b8q | 37,959 | Updated BigBird Model card as per #36979. | {
"login": "RogerSinghChugh",
"id": 35698080,
"node_id": "MDQ6VXNlcjM1Njk4MDgw",
"avatar_url": "https://avatars.githubusercontent.com/u/35698080?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RogerSinghChugh",
"html_url": "https://github.com/RogerSinghChugh",
"followers_url": "https://api.github.com/users/RogerSinghChugh/followers",
"following_url": "https://api.github.com/users/RogerSinghChugh/following{/other_user}",
"gists_url": "https://api.github.com/users/RogerSinghChugh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/RogerSinghChugh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RogerSinghChugh/subscriptions",
"organizations_url": "https://api.github.com/users/RogerSinghChugh/orgs",
"repos_url": "https://api.github.com/users/RogerSinghChugh/repos",
"events_url": "https://api.github.com/users/RogerSinghChugh/events{/privacy}",
"received_events_url": "https://api.github.com/users/RogerSinghChugh/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T12:22:24 | 2025-05-27T18:24:28 | 2025-05-27T18:24:28 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37959",
"html_url": "https://github.com/huggingface/transformers/pull/37959",
"diff_url": "https://github.com/huggingface/transformers/pull/37959.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37959.patch",
"merged_at": "2025-05-27T18:24:28"
} | # 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 -->
As mentioned in the issue https://github.com/huggingface/transformers/issues/36979 this PR updates the documentation of the BigBird model, which will now be aligned with the standardized format for all the docs.
## 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?
@stevhliu
<!-- 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 and @SunMarc
- 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/37959/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/37959/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37958 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37958/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37958/comments | https://api.github.com/repos/huggingface/transformers/issues/37958/events | https://github.com/huggingface/transformers/pull/37958 | 3,039,389,458 | PR_kwDOCUB6oc6U7Dt3 | 37,958 | Fix torch.compile issues with past_key_value vs past_key_value | {
"login": "ved1beta",
"id": 146507396,
"node_id": "U_kgDOCLuGhA",
"avatar_url": "https://avatars.githubusercontent.com/u/146507396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ved1beta",
"html_url": "https://github.com/ved1beta",
"followers_url": "https://api.github.com/users/ved1beta/followers",
"following_url": "https://api.github.com/users/ved1beta/following{/other_user}",
"gists_url": "https://api.github.com/users/ved1beta/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ved1beta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ved1beta/subscriptions",
"organizations_url": "https://api.github.com/users/ved1beta/orgs",
"repos_url": "https://api.github.com/users/ved1beta/repos",
"events_url": "https://api.github.com/users/ved1beta/events{/privacy}",
"received_events_url": "https://api.github.com/users/ved1beta/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T11:34:56 | 2025-05-31T16:56:31 | 2025-05-31T16:56:31 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37958",
"html_url": "https://github.com/huggingface/transformers/pull/37958",
"diff_url": "https://github.com/huggingface/transformers/pull/37958.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37958.patch",
"merged_at": null
} | # What does this PR do?
replaced past_key_value with past_key_value also checked for backward compatibility
Fixes #36290
## 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.
@ArthurZucker @Rocketknight1
| {
"login": "ved1beta",
"id": 146507396,
"node_id": "U_kgDOCLuGhA",
"avatar_url": "https://avatars.githubusercontent.com/u/146507396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ved1beta",
"html_url": "https://github.com/ved1beta",
"followers_url": "https://api.github.com/users/ved1beta/followers",
"following_url": "https://api.github.com/users/ved1beta/following{/other_user}",
"gists_url": "https://api.github.com/users/ved1beta/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ved1beta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ved1beta/subscriptions",
"organizations_url": "https://api.github.com/users/ved1beta/orgs",
"repos_url": "https://api.github.com/users/ved1beta/repos",
"events_url": "https://api.github.com/users/ved1beta/events{/privacy}",
"received_events_url": "https://api.github.com/users/ved1beta/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37958/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/37958/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37957 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37957/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37957/comments | https://api.github.com/repos/huggingface/transformers/issues/37957/events | https://github.com/huggingface/transformers/pull/37957 | 3,039,389,101 | PR_kwDOCUB6oc6U7Dox | 37,957 | [D-FINE] Update names | {
"login": "NielsRogge",
"id": 48327001,
"node_id": "MDQ6VXNlcjQ4MzI3MDAx",
"avatar_url": "https://avatars.githubusercontent.com/u/48327001?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NielsRogge",
"html_url": "https://github.com/NielsRogge",
"followers_url": "https://api.github.com/users/NielsRogge/followers",
"following_url": "https://api.github.com/users/NielsRogge/following{/other_user}",
"gists_url": "https://api.github.com/users/NielsRogge/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NielsRogge/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NielsRogge/subscriptions",
"organizations_url": "https://api.github.com/users/NielsRogge/orgs",
"repos_url": "https://api.github.com/users/NielsRogge/repos",
"events_url": "https://api.github.com/users/NielsRogge/events{/privacy}",
"received_events_url": "https://api.github.com/users/NielsRogge/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T11:34:47 | 2025-05-05T12:06:04 | 2025-05-05T12:05:46 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37957",
"html_url": "https://github.com/huggingface/transformers/pull/37957",
"diff_url": "https://github.com/huggingface/transformers/pull/37957.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37957.patch",
"merged_at": "2025-05-05T12:05:46"
} | # What does this PR do?
As [all D-FINE models](https://huggingface.co/collections/ustc-community/d-fine-68109b427cbe6ee36b4e7352) were renamed on the hub, this PR updates the Transformers docs accordingly. | {
"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/37957/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/37957/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37956 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37956/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37956/comments | https://api.github.com/repos/huggingface/transformers/issues/37956/events | https://github.com/huggingface/transformers/issues/37956 | 3,039,364,356 | I_kwDOCUB6oc61KQUE | 37,956 | Inconsistency in installation instructions for `venv` and `uv` | {
"login": "arjunaskykok",
"id": 32124593,
"node_id": "MDQ6VXNlcjMyMTI0NTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/32124593?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arjunaskykok",
"html_url": "https://github.com/arjunaskykok",
"followers_url": "https://api.github.com/users/arjunaskykok/followers",
"following_url": "https://api.github.com/users/arjunaskykok/following{/other_user}",
"gists_url": "https://api.github.com/users/arjunaskykok/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arjunaskykok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arjunaskykok/subscriptions",
"organizations_url": "https://api.github.com/users/arjunaskykok/orgs",
"repos_url": "https://api.github.com/users/arjunaskykok/repos",
"events_url": "https://api.github.com/users/arjunaskykok/events{/privacy}",
"received_events_url": "https://api.github.com/users/arjunaskykok/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T11:23:01 | 2025-05-14T13:09:42 | 2025-05-14T13:09:42 | CONTRIBUTOR | null | null | null | null | In the README, we have installation instructions for both `venv` and `uv`.

The last step should be:
```
# venv
pip install .
```
and
```
# uv
uv pip install .
```
No?
It's a minor issue (so if you close this issue, that's fine), but the inconsistency annoys me. | {
"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/37956/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/37956/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/37955 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37955/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37955/comments | https://api.github.com/repos/huggingface/transformers/issues/37955/events | https://github.com/huggingface/transformers/pull/37955 | 3,039,299,064 | PR_kwDOCUB6oc6U6wCG | 37,955 | Fix incorrect type annotation in get_auxiliary_logits | {
"login": "tanuj-rai",
"id": 84439872,
"node_id": "MDQ6VXNlcjg0NDM5ODcy",
"avatar_url": "https://avatars.githubusercontent.com/u/84439872?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tanuj-rai",
"html_url": "https://github.com/tanuj-rai",
"followers_url": "https://api.github.com/users/tanuj-rai/followers",
"following_url": "https://api.github.com/users/tanuj-rai/following{/other_user}",
"gists_url": "https://api.github.com/users/tanuj-rai/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tanuj-rai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tanuj-rai/subscriptions",
"organizations_url": "https://api.github.com/users/tanuj-rai/orgs",
"repos_url": "https://api.github.com/users/tanuj-rai/repos",
"events_url": "https://api.github.com/users/tanuj-rai/events{/privacy}",
"received_events_url": "https://api.github.com/users/tanuj-rai/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T10:53:50 | 2025-05-06T02:18:31 | 2025-05-05T18:00:50 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37955",
"html_url": "https://github.com/huggingface/transformers/pull/37955",
"diff_url": "https://github.com/huggingface/transformers/pull/37955.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37955.patch",
"merged_at": "2025-05-05T18:00:50"
} | # What does this PR do?
Fixes #37909,
This PR fix invalid type hint syntax in get_auxiliary_logits (Dict[str, Tensor])
## 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?
@amyeroberts @qubvel
| {
"login": "qubvel",
"id": 31920396,
"node_id": "MDQ6VXNlcjMxOTIwMzk2",
"avatar_url": "https://avatars.githubusercontent.com/u/31920396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qubvel",
"html_url": "https://github.com/qubvel",
"followers_url": "https://api.github.com/users/qubvel/followers",
"following_url": "https://api.github.com/users/qubvel/following{/other_user}",
"gists_url": "https://api.github.com/users/qubvel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/qubvel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qubvel/subscriptions",
"organizations_url": "https://api.github.com/users/qubvel/orgs",
"repos_url": "https://api.github.com/users/qubvel/repos",
"events_url": "https://api.github.com/users/qubvel/events{/privacy}",
"received_events_url": "https://api.github.com/users/qubvel/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37955/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/37955/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37954 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37954/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37954/comments | https://api.github.com/repos/huggingface/transformers/issues/37954/events | https://github.com/huggingface/transformers/issues/37954 | 3,039,266,040 | I_kwDOCUB6oc61J4T4 | 37,954 | jinja2.exceptions.UndefinedError: 'list object' has no attribute 'startswith' | {
"login": "lucasjinreal",
"id": 21303438,
"node_id": "MDQ6VXNlcjIxMzAzNDM4",
"avatar_url": "https://avatars.githubusercontent.com/u/21303438?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lucasjinreal",
"html_url": "https://github.com/lucasjinreal",
"followers_url": "https://api.github.com/users/lucasjinreal/followers",
"following_url": "https://api.github.com/users/lucasjinreal/following{/other_user}",
"gists_url": "https://api.github.com/users/lucasjinreal/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lucasjinreal/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucasjinreal/subscriptions",
"organizations_url": "https://api.github.com/users/lucasjinreal/orgs",
"repos_url": "https://api.github.com/users/lucasjinreal/repos",
"events_url": "https://api.github.com/users/lucasjinreal/events{/privacy}",
"received_events_url": "https://api.github.com/users/lucasjinreal/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-05-05T10:38:37 | 2025-06-13T08:03:00 | 2025-06-13T08:03:00 | NONE | null | null | null | null | ### System Info
linux transforemres 4.52.dev9
### Who can help?
text = self.processor.apply_chat_template(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/transformers/processing_utils.py", line 1534, in apply_chat_template
prompt = self.tokenizer.apply_chat_template(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/transformers/tokenization_utils_base.py", line 1700, in apply_chat_template
rendered_chat = compiled_template.render(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 20, in top-level template code
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/sandbox.py", line 391, in call
if not __self.is_safe_callable(__obj):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/sandbox.py", line 275, in is_safe_callable
getattr(obj, "unsafe_callable", False) or getattr(obj, "alters_data", False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'list object' has no attribute 'startswith'
### 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, ...)
- [x] My own task or dataset (give details below)
### Reproduction
text = self.processor.apply_chat_template(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/transformers/processing_utils.py", line 1534, in apply_chat_template
prompt = self.tokenizer.apply_chat_template(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/transformers/tokenization_utils_base.py", line 1700, in apply_chat_template
rendered_chat = compiled_template.render(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 20, in top-level template code
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/sandbox.py", line 391, in call
if not __self.is_safe_callable(__obj):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/sandbox.py", line 275, in is_safe_callable
getattr(obj, "unsafe_callable", False) or getattr(obj, "alters_data", False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'list object' has no attribute 'startswith'
### Expected behavior
text = self.processor.apply_chat_template(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/transformers/processing_utils.py", line 1534, in apply_chat_template
prompt = self.tokenizer.apply_chat_template(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/transformers/tokenization_utils_base.py", line 1700, in apply_chat_template
rendered_chat = compiled_template.render(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 20, in top-level template code
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/sandbox.py", line 391, in call
if not __self.is_safe_callable(__obj):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/jinja2/sandbox.py", line 275, in is_safe_callable
getattr(obj, "unsafe_callable", False) or getattr(obj, "alters_data", False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'list object' has no attribute 'startswith'
## How to reveal
Happend when inference a finetune Qwen3 model
The default Qwen3 has not `checkpoint-1000/chat_template.jinja`
But this jinja applied fail.
Copy original json works fine. | {
"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/37954/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/37954/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/37953 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37953/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37953/comments | https://api.github.com/repos/huggingface/transformers/issues/37953/events | https://github.com/huggingface/transformers/pull/37953 | 3,038,694,227 | PR_kwDOCUB6oc6U4sq0 | 37,953 | Fix `past_key_values` type hint in model output types | {
"login": "ChengLyu",
"id": 5308679,
"node_id": "MDQ6VXNlcjUzMDg2Nzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/5308679?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ChengLyu",
"html_url": "https://github.com/ChengLyu",
"followers_url": "https://api.github.com/users/ChengLyu/followers",
"following_url": "https://api.github.com/users/ChengLyu/following{/other_user}",
"gists_url": "https://api.github.com/users/ChengLyu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ChengLyu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ChengLyu/subscriptions",
"organizations_url": "https://api.github.com/users/ChengLyu/orgs",
"repos_url": "https://api.github.com/users/ChengLyu/repos",
"events_url": "https://api.github.com/users/ChengLyu/events{/privacy}",
"received_events_url": "https://api.github.com/users/ChengLyu/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-05T06:12:10 | 2025-05-13T13:36:50 | 2025-05-13T13:36:50 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37953",
"html_url": "https://github.com/huggingface/transformers/pull/37953",
"diff_url": "https://github.com/huggingface/transformers/pull/37953.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37953.patch",
"merged_at": "2025-05-13T13:36:49"
} | # What does this PR do?
This PR fixes the `past_key_values` type hint in model output types to adopt the new `Cache` type.
## 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?
@patrickvonplaten @sgugger @tanreinama
| {
"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/37953/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/37953/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37952 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37952/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37952/comments | https://api.github.com/repos/huggingface/transformers/issues/37952/events | https://github.com/huggingface/transformers/pull/37952 | 3,038,668,626 | PR_kwDOCUB6oc6U4nLw | 37,952 | Object detection experiment for transformers | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-05-05T05:55:32 | 2025-05-05T13:19:58 | 2025-05-05T13:19:58 | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37952",
"html_url": "https://github.com/huggingface/transformers/pull/37952",
"diff_url": "https://github.com/huggingface/transformers/pull/37952.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37952.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 -->
@qubvel As we discussed, I will generate the standard metric for
**how well the transformers object detection model finetune in diverse domain of data?**
In this step I will focus on
batch_size | learning rate | model | dataset | AP | training time | required memory
-- | -- | -- | -- | -- | -- | --
on different domain of dataset.
https://www.notion.so/sangbumchoi/HuggingFace-OD-train-1afb8ded2e1680daa2dcfdc3e11aa15d?pvs=4
For the part that changed is
In this step D-Fine was not perfectly finished for the finetune feature. You can see the https://github.com/Peterande/D-FINE/blob/4a1f73a8bcfac736a88abde9596d87f116d780a7/src/zoo/dfine/dfine_criterion.py#L357. This is `pre_output` related auxiliary layer which is related to first layer to use `pre_bbox_head` .https://github.com/huggingface/transformers/blob/2932f318a20d9e54cc7aea052e040164d85de7d6/src/transformers/models/d_fine/modeling_d_fine.py#L1195
This is initial experiment of four models that you have suggested.

## 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 and @SunMarc
- 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": "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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37952/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/37952/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37951 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37951/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37951/comments | https://api.github.com/repos/huggingface/transformers/issues/37951/events | https://github.com/huggingface/transformers/pull/37951 | 3,038,142,649 | PR_kwDOCUB6oc6U259b | 37,951 | Update Model Card for Mamba-2 | {
"login": "ParagEkbote",
"id": 69567729,
"node_id": "MDQ6VXNlcjY5NTY3NzI5",
"avatar_url": "https://avatars.githubusercontent.com/u/69567729?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ParagEkbote",
"html_url": "https://github.com/ParagEkbote",
"followers_url": "https://api.github.com/users/ParagEkbote/followers",
"following_url": "https://api.github.com/users/ParagEkbote/following{/other_user}",
"gists_url": "https://api.github.com/users/ParagEkbote/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ParagEkbote/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ParagEkbote/subscriptions",
"organizations_url": "https://api.github.com/users/ParagEkbote/orgs",
"repos_url": "https://api.github.com/users/ParagEkbote/repos",
"events_url": "https://api.github.com/users/ParagEkbote/events{/privacy}",
"received_events_url": "https://api.github.com/users/ParagEkbote/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-04T17:42:49 | 2025-05-27T18:01:11 | 2025-05-27T17:06:39 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37951",
"html_url": "https://github.com/huggingface/transformers/pull/37951",
"diff_url": "https://github.com/huggingface/transformers/pull/37951.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37951.patch",
"merged_at": "2025-05-27T17:06:39"
} | # What does this PR do?
As described in the issue, this PR updates the model card for Mamba. Please let me know if any modifications are required and I will make the necessary changes.
Refs #36979
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
## Who can review?
@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/37951/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/37951/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37950 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37950/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37950/comments | https://api.github.com/repos/huggingface/transformers/issues/37950/events | https://github.com/huggingface/transformers/pull/37950 | 3,038,112,122 | PR_kwDOCUB6oc6U20Ka | 37,950 | add character-bert from cli | {
"login": "helboukkouri",
"id": 36409068,
"node_id": "MDQ6VXNlcjM2NDA5MDY4",
"avatar_url": "https://avatars.githubusercontent.com/u/36409068?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/helboukkouri",
"html_url": "https://github.com/helboukkouri",
"followers_url": "https://api.github.com/users/helboukkouri/followers",
"following_url": "https://api.github.com/users/helboukkouri/following{/other_user}",
"gists_url": "https://api.github.com/users/helboukkouri/gists{/gist_id}",
"starred_url": "https://api.github.com/users/helboukkouri/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/helboukkouri/subscriptions",
"organizations_url": "https://api.github.com/users/helboukkouri/orgs",
"repos_url": "https://api.github.com/users/helboukkouri/repos",
"events_url": "https://api.github.com/users/helboukkouri/events{/privacy}",
"received_events_url": "https://api.github.com/users/helboukkouri/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-05-04T16:44:11 | 2025-05-04T16:44:11 | null | NONE | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37950",
"html_url": "https://github.com/huggingface/transformers/pull/37950",
"diff_url": "https://github.com/huggingface/transformers/pull/37950.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37950.patch",
"merged_at": null
} | > NOTE: I'll take care of all the details when I'm done with the code part.
# 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 and @SunMarc
- 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/37950/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/37950/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37949 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37949/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37949/comments | https://api.github.com/repos/huggingface/transformers/issues/37949/events | https://github.com/huggingface/transformers/issues/37949 | 3,038,109,681 | I_kwDOCUB6oc61Fd_x | 37,949 | Qwen3 Chat Template `enable_thinking` tag reversed? | {
"login": "jeromeku",
"id": 2455711,
"node_id": "MDQ6VXNlcjI0NTU3MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/2455711?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jeromeku",
"html_url": "https://github.com/jeromeku",
"followers_url": "https://api.github.com/users/jeromeku/followers",
"following_url": "https://api.github.com/users/jeromeku/following{/other_user}",
"gists_url": "https://api.github.com/users/jeromeku/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jeromeku/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeromeku/subscriptions",
"organizations_url": "https://api.github.com/users/jeromeku/orgs",
"repos_url": "https://api.github.com/users/jeromeku/repos",
"events_url": "https://api.github.com/users/jeromeku/events{/privacy}",
"received_events_url": "https://api.github.com/users/jeromeku/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-05-04T16:39:08 | 2025-05-05T09:39:47 | 2025-05-05T09:39:47 | NONE | null | null | null | null | ### System Info
`transformers version: 4.52.0.dev0`
### Who can help?
@ArthurZucker
### 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
Confused by `enable_thinking` when applying chat template for Qwen3 models.
Specifically
```python
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-30B-A3B")
messages = [
{"role": "user", "content": "What is the capital of France?"}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True
)
print("With thinking mode enabled:")
print(text)
"""
With thinking mode enabled:
<|im_start|>user
What is the capital of France?<|im_end|>
<|im_start|>assistant
"""
text_no_thinking = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False
)
print("\nWith thinking mode disabled:")
print(text_no_thinking)
"""
With thinking mode disabled:
<|im_start|>user
What is the capital of France?<|im_end|>
<|im_start|>assistant
<think>
</think>
"""
```
Running the above, it seems `enable_thinking` is reversed -- it adds the `think` tags when `enable_thinking` is `False`.
Printing the chat template confirms this:
```python
print(tokenizer.chat_template)
"""
...
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- if enable_thinking is defined and enable_thinking is false %}
{{- '<think>\n\n</think>\n\n' }}
{%- endif %}
{%- endif %}
"""
```
### Expected behavior
`enable_thinking` should insert `think` tags when set to `True`, i.e., the conditional in the template should be:
```
{%- if enable_thinking is defined and enable_thinking is true %}
``` | {
"login": "jeromeku",
"id": 2455711,
"node_id": "MDQ6VXNlcjI0NTU3MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/2455711?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jeromeku",
"html_url": "https://github.com/jeromeku",
"followers_url": "https://api.github.com/users/jeromeku/followers",
"following_url": "https://api.github.com/users/jeromeku/following{/other_user}",
"gists_url": "https://api.github.com/users/jeromeku/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jeromeku/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeromeku/subscriptions",
"organizations_url": "https://api.github.com/users/jeromeku/orgs",
"repos_url": "https://api.github.com/users/jeromeku/repos",
"events_url": "https://api.github.com/users/jeromeku/events{/privacy}",
"received_events_url": "https://api.github.com/users/jeromeku/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37949/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/37949/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/37948 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37948/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37948/comments | https://api.github.com/repos/huggingface/transformers/issues/37948/events | https://github.com/huggingface/transformers/pull/37948 | 3,037,819,403 | PR_kwDOCUB6oc6U1791 | 37,948 | Model card for mobilenet v1 and v2 | {
"login": "yuanjua",
"id": 80858000,
"node_id": "MDQ6VXNlcjgwODU4MDAw",
"avatar_url": "https://avatars.githubusercontent.com/u/80858000?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yuanjua",
"html_url": "https://github.com/yuanjua",
"followers_url": "https://api.github.com/users/yuanjua/followers",
"following_url": "https://api.github.com/users/yuanjua/following{/other_user}",
"gists_url": "https://api.github.com/users/yuanjua/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yuanjua/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yuanjua/subscriptions",
"organizations_url": "https://api.github.com/users/yuanjua/orgs",
"repos_url": "https://api.github.com/users/yuanjua/repos",
"events_url": "https://api.github.com/users/yuanjua/events{/privacy}",
"received_events_url": "https://api.github.com/users/yuanjua/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-04T06:57:10 | 2025-05-29T05:47:43 | 2025-05-28T16:20:19 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37948",
"html_url": "https://github.com/huggingface/transformers/pull/37948",
"diff_url": "https://github.com/huggingface/transformers/pull/37948.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37948.patch",
"merged_at": "2025-05-28T16:20:19"
} | # What does this PR do?
As suggested in this issue - https://github.com/huggingface/transformers/issues/36979 - this PR updates the documentation of the MobilenetV1 and V2 model, which will now be aligned with the standardized format for all the docs.
<!--
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).
- [ ] 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?
@stevhliu
<!-- 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 and @SunMarc
- 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/37948/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/37948/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37947 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37947/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37947/comments | https://api.github.com/repos/huggingface/transformers/issues/37947/events | https://github.com/huggingface/transformers/issues/37947 | 3,037,761,210 | I_kwDOCUB6oc61EI66 | 37,947 | Add examples that showcase the use of Hyperparameter search with Transformers | {
"login": "ParagEkbote",
"id": 69567729,
"node_id": "MDQ6VXNlcjY5NTY3NzI5",
"avatar_url": "https://avatars.githubusercontent.com/u/69567729?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ParagEkbote",
"html_url": "https://github.com/ParagEkbote",
"followers_url": "https://api.github.com/users/ParagEkbote/followers",
"following_url": "https://api.github.com/users/ParagEkbote/following{/other_user}",
"gists_url": "https://api.github.com/users/ParagEkbote/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ParagEkbote/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ParagEkbote/subscriptions",
"organizations_url": "https://api.github.com/users/ParagEkbote/orgs",
"repos_url": "https://api.github.com/users/ParagEkbote/repos",
"events_url": "https://api.github.com/users/ParagEkbote/events{/privacy}",
"received_events_url": "https://api.github.com/users/ParagEkbote/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-04T04:03:11 | 2025-06-11T08:02:39 | 2025-06-11T08:02:39 | CONTRIBUTOR | null | null | null | null | Hyperparameter search can result in a well-trained model as well as saving time and computational resources. I think we can add notebooks which can showcase the use of this feature to the [huggingface/notebooks](https://github.com/huggingface/notebooks) repo and link it to the [docs](https://huggingface.co/docs/transformers/en/hpo_train).
Could you please let me know?
cc: @stevhliu | {
"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/37947/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/37947/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/37946 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37946/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37946/comments | https://api.github.com/repos/huggingface/transformers/issues/37946/events | https://github.com/huggingface/transformers/pull/37946 | 3,037,698,009 | PR_kwDOCUB6oc6U1lat | 37,946 | [docs]: update roformer.md model card | {
"login": "KsuParkhamchuk",
"id": 43078183,
"node_id": "MDQ6VXNlcjQzMDc4MTgz",
"avatar_url": "https://avatars.githubusercontent.com/u/43078183?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/KsuParkhamchuk",
"html_url": "https://github.com/KsuParkhamchuk",
"followers_url": "https://api.github.com/users/KsuParkhamchuk/followers",
"following_url": "https://api.github.com/users/KsuParkhamchuk/following{/other_user}",
"gists_url": "https://api.github.com/users/KsuParkhamchuk/gists{/gist_id}",
"starred_url": "https://api.github.com/users/KsuParkhamchuk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KsuParkhamchuk/subscriptions",
"organizations_url": "https://api.github.com/users/KsuParkhamchuk/orgs",
"repos_url": "https://api.github.com/users/KsuParkhamchuk/repos",
"events_url": "https://api.github.com/users/KsuParkhamchuk/events{/privacy}",
"received_events_url": "https://api.github.com/users/KsuParkhamchuk/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-04T00:54:57 | 2025-05-23T23:27:56 | 2025-05-23T23:27:56 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37946",
"html_url": "https://github.com/huggingface/transformers/pull/37946",
"diff_url": "https://github.com/huggingface/transformers/pull/37946.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37946.patch",
"merged_at": "2025-05-23T23:27:56"
} | # What does this PR do?
Updates the RoFormer card according to the description in #https://github.com/huggingface/transformers/issues/36979 to standardize all model cards' look.
The pr includes:
- Model description
- Examples for Pipeline, AutoModel, and command line usage
Note: Quantization is not applied because of the model's small size
Note: AttentionMaskVisualizer is not applicable either, as RoFormer is currently not supported
- [x] This PR improves the docs
## Who can review?
@stevhliu Please have a look and let me know if any further work is needed. thank you
| {
"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/37946/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/37946/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37945 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37945/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37945/comments | https://api.github.com/repos/huggingface/transformers/issues/37945/events | https://github.com/huggingface/transformers/issues/37945 | 3,037,688,008 | I_kwDOCUB6oc61D3DI | 37,945 | Alternative to trainer.hyperparameter_search for models used with custom optimizer / lrscheduler etc. | {
"login": "ieshaan12",
"id": 31623825,
"node_id": "MDQ6VXNlcjMxNjIzODI1",
"avatar_url": "https://avatars.githubusercontent.com/u/31623825?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ieshaan12",
"html_url": "https://github.com/ieshaan12",
"followers_url": "https://api.github.com/users/ieshaan12/followers",
"following_url": "https://api.github.com/users/ieshaan12/following{/other_user}",
"gists_url": "https://api.github.com/users/ieshaan12/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ieshaan12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ieshaan12/subscriptions",
"organizations_url": "https://api.github.com/users/ieshaan12/orgs",
"repos_url": "https://api.github.com/users/ieshaan12/repos",
"events_url": "https://api.github.com/users/ieshaan12/events{/privacy}",
"received_events_url": "https://api.github.com/users/ieshaan12/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-04T00:26:04 | 2025-06-11T08:02:41 | 2025-06-11T08:02:41 | NONE | null | null | null | null |
roberta_config = RobertaConfig(
hidden_size=HIDDEN_SIZE,
num_attention_heads=NUM_ATTENTION_HEADS,
num_hidden_layers=NUM_HIDDEN_LAYERS,
intermediate_size=INTERMEDIATE_SIZE,
hidden_dropout_prob=HIDDEN_DROPOUT_PROB,
max_position_embeddings=MAX_POSITION_EMBEDDINGS,
type_vocab_size=TYPE_VOCAB_SIZE,
initializer_range=INITIALIZER_RANGE,
num_labels=NUM_LABELS
)
# Initialize Model from Scratch
model = RobertaForSequenceClassification(roberta_config)
logger.info(model.config)
# Define Optimizer with Weight Decay
optimizer = torch.optim.AdamW(
[
{"params": [p for n, p in model.named_parameters() if "bias" not in n and "LayerNorm" not in n], "weight_decay": WEIGHT_DECAY},
{"params": [p for n, p in model.named_parameters() if "bias" in n or "LayerNorm" in n], "weight_decay": 0.0}
],
lr=LEARNING_RATE,
eps=ADAM_EPS
)
# Alter this as needed for class weights.
class_weights = torch.tensor([1.0, 12.0], dtype=torch.float)
loss_fn = torch.nn.CrossEntropyLoss(weight=class_weights)
# Prepare with Accelerator
model, optimizer, train_dl, eval_dl, loss_fn = accelerator.prepare(
model, optimizer, train_dl, eval_dl, loss_fn
)
# Learning Rate Scheduler
total_training_steps = math.ceil(len(train_dl) * EPOCHS / GRADIENT_ACCUMULATION_STEPS)
lr_scheduler = CosineAnnealingWarmRestarts(
optimizer,
T_0=1,
T_mult=2,
eta_min=1e-6, # Minimum learning rate
)
model.train()
completed_steps = 0
for epoch in range(EPOCHS):
for step, batch in enumerate(train_dl):
# Forward pass
outputs = model(**batch)
# loss = outputs.loss
loss = loss_fn(outputs.logits, batch['labels'])
# Normalize loss
loss = loss / GRADIENT_ACCUMULATION_STEPS
# Backward pass
accelerator.backward(loss)
if (step + 1) % GRADIENT_ACCUMULATION_STEPS == 0 or step == len(train_dl) - 1:
accelerator.clip_grad_norm_(model.parameters(), max_norm=MAX_NORM)
optimizer.step()
lr_scheduler.step()
optimizer.zero_grad()
completed_steps += 1
if completed_steps % LOG_STEPS == 0:
progress = f"Epoch: {epoch}, Step: {completed_steps}/{total_training_steps}, Loss: {loss.item() * GRADIENT_ACCUMULATION_STEPS}"
accelerator.print(progress)
I have some code like above, which mostly allows me to configure different parameters with custom loss functions (shown here with a CrossEntropyLoss) along with Adam and torch's LRScheduler. I was wondering if there was something similar to `Trainer.hyperparameter_search` for custom components like this?
Of course, I understand its a bit tricky to identify with custom components, but just wanted to know if its even possible, or would I need to manually configure several runs to arrive at the ideal values instead?
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/37945/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/37945/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/37944 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37944/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37944/comments | https://api.github.com/repos/huggingface/transformers/issues/37944/events | https://github.com/huggingface/transformers/pull/37944 | 3,037,641,953 | PR_kwDOCUB6oc6U1cRU | 37,944 | fix graph break for torch.compile in attention mask check | {
"login": "winglian",
"id": 381258,
"node_id": "MDQ6VXNlcjM4MTI1OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/381258?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/winglian",
"html_url": "https://github.com/winglian",
"followers_url": "https://api.github.com/users/winglian/followers",
"following_url": "https://api.github.com/users/winglian/following{/other_user}",
"gists_url": "https://api.github.com/users/winglian/gists{/gist_id}",
"starred_url": "https://api.github.com/users/winglian/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/winglian/subscriptions",
"organizations_url": "https://api.github.com/users/winglian/orgs",
"repos_url": "https://api.github.com/users/winglian/repos",
"events_url": "https://api.github.com/users/winglian/events{/privacy}",
"received_events_url": "https://api.github.com/users/winglian/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-05-03T22:18:24 | 2025-05-03T23:29:54 | null | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37944",
"html_url": "https://github.com/huggingface/transformers/pull/37944",
"diff_url": "https://github.com/huggingface/transformers/pull/37944.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37944.patch",
"merged_at": null
} | # What does this PR do?
`torch.compile` gives a graph break:
```
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] Graph break from Tensor.item(), consider setting:
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] torch._dynamo.config.capture_scalar_outputs = True
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] or:
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] env TORCHDYNAMO_CAPTURE_SCALAR_OUTPUTS=1
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] to include these operations in the captured graph.
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0]
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] Graph break: from user code at:
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] File "/root/miniconda3/envs/py3.11/lib/python3.11/site-packages/transformers/models/qwen3/modeling_qwen3.py", line 540, in torch_dynamo_resume_in_forward_at_526
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] causal_mask = self._update_causal_mask(
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] File "/root/miniconda3/envs/py3.11/lib/python3.11/site-packages/transformers/models/qwen3/modeling_qwen3.py", line 617, in updatecausal_mask
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0] if attention_mask is not None and 0.0 in attention_mask:
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0]
W0503 22:06:01.020000 30493 site-packages/torch/_dynamo/variables/tensor.py:869] [12/0]
```
<!--
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 and @SunMarc
- 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/37944/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/37944/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37943 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37943/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37943/comments | https://api.github.com/repos/huggingface/transformers/issues/37943/events | https://github.com/huggingface/transformers/issues/37943 | 3,037,622,317 | I_kwDOCUB6oc61DnAt | 37,943 | [Bug] Gemma3Processor.apply_chat_template returns Tensor instead of dict with long multimodal few-shot inputs | {
"login": "Canticle929",
"id": 188613939,
"node_id": "U_kgDOCz4FMw",
"avatar_url": "https://avatars.githubusercontent.com/u/188613939?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Canticle929",
"html_url": "https://github.com/Canticle929",
"followers_url": "https://api.github.com/users/Canticle929/followers",
"following_url": "https://api.github.com/users/Canticle929/following{/other_user}",
"gists_url": "https://api.github.com/users/Canticle929/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Canticle929/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Canticle929/subscriptions",
"organizations_url": "https://api.github.com/users/Canticle929/orgs",
"repos_url": "https://api.github.com/users/Canticle929/repos",
"events_url": "https://api.github.com/users/Canticle929/events{/privacy}",
"received_events_url": "https://api.github.com/users/Canticle929/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-05-03T21:29:26 | 2025-06-11T08:02:43 | 2025-06-11T08:02:42 | NONE | null | null | null | null | ### System Info
transformers version: 4.50.0.dev0
tokenizers version: 0.21.1
torch version: 2.6.0
Python version: 3.10.16
Model: google/gemma-3-27b-it
### Who can help?
@ArthurZucker @itazap
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
1. Load the Gemma 3 processor: processor = AutoProcessor.from_pretrained("google/gemma-3-27b-it")
2. Create a PIL Image object.
3. Construct a messages list containing a user role. Its content should be a list containing first an image dictionary ({"type": "image", "image": pil_image}) and then a text dictionary ({"type": "text", "text": long_complex_prompt}). The long_complex_prompt must be a very long string containing structured few-shot examples.
4. Call raw_inputs = processor.apply_chat_template(messages, tokenize=True, return_tensors="pt", add_generation_prompt=True).
5. Check type(raw_inputs).
6. (Optional) Attempting model.generate(**raw_inputs) will trigger the TypeError.
Code and error messages are include in attachments
[Minimal Reproducible Example (MRE).zip](https://github.com/user-attachments/files/20025093/Minimal.Reproducible.Example.MRE.zip)
### Expected behavior
**Describe the bug**
When using Gemma3Processor loaded via AutoProcessor.from_pretrained("google/gemma-3-27b-it"), calling the apply_chat_template method with a messages list containing both an image ({"type": "image", ...}) and a very long and structured text (e.g., few-shot examples constructed via loops), and setting tokenize=True and return_tensors='pt', the method unexpectedly returns a torch.Tensor object instead of the expected dict.
**Expected behavior**
apply_chat_template(..., tokenize=True, return_tensors='pt') is expected to return a BatchEncoding object (which behaves like a dictionary) containing keys like input_ids and attention_mask, with values of type torch.Tensor.
Actual behavior
The method actually returns a single torch.Tensor, which appears to contain only the input_ids.
**Consequence**
Because the return type is not as expected, subsequent attempts to pass this result to model.generate (e.g., model.generate(**result)) raise a TypeError: argument after ** must be a mapping, not Tensor, as the ** operator expects a dictionary (mapping). | {
"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/37943/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/37943/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/37942 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37942/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37942/comments | https://api.github.com/repos/huggingface/transformers/issues/37942/events | https://github.com/huggingface/transformers/pull/37942 | 3,037,596,525 | PR_kwDOCUB6oc6U1UM6 | 37,942 | docs(swinv2): Update SwinV2 model card to new standard format | {
"login": "BryanBradfo",
"id": 101939095,
"node_id": "U_kgDOBhN3lw",
"avatar_url": "https://avatars.githubusercontent.com/u/101939095?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BryanBradfo",
"html_url": "https://github.com/BryanBradfo",
"followers_url": "https://api.github.com/users/BryanBradfo/followers",
"following_url": "https://api.github.com/users/BryanBradfo/following{/other_user}",
"gists_url": "https://api.github.com/users/BryanBradfo/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BryanBradfo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BryanBradfo/subscriptions",
"organizations_url": "https://api.github.com/users/BryanBradfo/orgs",
"repos_url": "https://api.github.com/users/BryanBradfo/repos",
"events_url": "https://api.github.com/users/BryanBradfo/events{/privacy}",
"received_events_url": "https://api.github.com/users/BryanBradfo/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-03T20:21:49 | 2025-07-08T19:44:54 | 2025-05-23T20:04:14 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37942",
"html_url": "https://github.com/huggingface/transformers/pull/37942",
"diff_url": "https://github.com/huggingface/transformers/pull/37942.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37942.patch",
"merged_at": "2025-05-23T20:04:13"
} | # What does this PR do?
This PR updates the Swin Transformer V2 model card (`swin_transformer_v2.md`) to align with the new standardized format.
- Follows the template provided in [Community contributions] Model cards #36979.
- Includes working Pipeline and AutoModel examples (tested locally).
- Removed the transformers-cli example (consistent with other recent model card updates).
Relates to #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).
- [ ] Did you write any new necessary tests?
## Who can review?
@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/37942/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/37942/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37941 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37941/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37941/comments | https://api.github.com/repos/huggingface/transformers/issues/37941/events | https://github.com/huggingface/transformers/pull/37941 | 3,037,527,431 | PR_kwDOCUB6oc6U1HQ1 | 37,941 | Add dia | {
"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-05-03T17:39:57 | 2025-07-11T11:16:34 | 2025-06-27T10:16:17 | COLLABORATOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37941",
"html_url": "https://github.com/huggingface/transformers/pull/37941",
"diff_url": "https://github.com/huggingface/transformers/pull/37941.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37941.patch",
"merged_at": null
} | # What does this PR do?
Superseeds #37832 as it was on the main branch did not want to push to it!
Todos:
- cleanup cache, attention masks and cache positions.
- cleanup generation, might be a way to make it `generate` compatible? if you always sample the top_k *num_channel tokens, you are getting the correct number of tokens. | {
"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/37941/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/37941/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37940 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37940/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37940/comments | https://api.github.com/repos/huggingface/transformers/issues/37940/events | https://github.com/huggingface/transformers/issues/37940 | 3,037,447,904 | I_kwDOCUB6oc61C8bg | 37,940 | The default value for the `size` argument of `DepthProImageProcessor` is not synced with the documentation | {
"login": "arjunaskykok",
"id": 32124593,
"node_id": "MDQ6VXNlcjMyMTI0NTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/32124593?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arjunaskykok",
"html_url": "https://github.com/arjunaskykok",
"followers_url": "https://api.github.com/users/arjunaskykok/followers",
"following_url": "https://api.github.com/users/arjunaskykok/following{/other_user}",
"gists_url": "https://api.github.com/users/arjunaskykok/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arjunaskykok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arjunaskykok/subscriptions",
"organizations_url": "https://api.github.com/users/arjunaskykok/orgs",
"repos_url": "https://api.github.com/users/arjunaskykok/repos",
"events_url": "https://api.github.com/users/arjunaskykok/events{/privacy}",
"received_events_url": "https://api.github.com/users/arjunaskykok/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-03T14:47:11 | 2025-05-05T11:05:03 | 2025-05-05T11:05:02 | CONTRIBUTOR | null | null | null | null | At the the [`DepthProImageProcessor`](https://github.com/huggingface/transformers/blob/main/src/transformers/models/depth_pro/image_processing_depth_pro.py) class, the default value for the `size` argument is `None`, but the documentation says `{"height": 1536, "width": 1536}`, as can be seen in the following code:
```python
class DepthProImageProcessor(BaseImageProcessor):
r"""
Constructs a DepthPro image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `(size["height"],
size["width"])`. Can be overridden by the `do_resize` parameter in the `preprocess` method.
size (`dict`, *optional*, defaults to `{"height": 1536, "width": 1536}`):
Size of the output image after resizing. Can be overridden by the `size` parameter in the `preprocess`
method.
resample (`PILImageResampling`, *optional*, defaults to `Resampling.BILINEAR`):
Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in the
`preprocess` method.
do_rescale (`bool`, *optional*, defaults to `True`):
Whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the `do_rescale`
parameter in the `preprocess` method.
rescale_factor (`int` or `float`, *optional*, defaults to `1/255`):
Scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter in the
`preprocess` method.
do_normalize (`bool`, *optional*, defaults to `True`):
Whether to normalize the image. Can be overridden by the `do_normalize` parameter in the `preprocess`
method.
image_mean (`float` or `List[float]`, *optional*, defaults to `IMAGENET_STANDARD_MEAN`):
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the `image_mean` parameter in the `preprocess` method.
image_std (`float` or `List[float]`, *optional*, defaults to `IMAGENET_STANDARD_STD`):
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the `image_std` parameter in the `preprocess` method.
"""
model_input_names = ["pixel_values"]
def __init__(
self,
do_resize: bool = True,
size: Optional[Dict[str, int]] = None,
resample: PILImageResampling = PILImageResampling.BILINEAR,
do_rescale: bool = True,
rescale_factor: Union[int, float] = 1 / 255,
do_normalize: bool = True,
image_mean: Optional[Union[float, List[float]]] = None,
image_std: Optional[Union[float, List[float]]] = None,
**kwargs,
):
```
Look at this:
```python
size (`dict`, *optional*, defaults to `{"height": 1536, "width": 1536}`):
Size of the output image after resizing. Can be overridden by the `size` parameter in the `preprocess`
method.
...
size: Optional[Dict[str, int]] = None,
```
So, should we correct the default value for the `size` argument or fix the documentation?
cc: @qubvel | {
"login": "arjunaskykok",
"id": 32124593,
"node_id": "MDQ6VXNlcjMyMTI0NTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/32124593?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arjunaskykok",
"html_url": "https://github.com/arjunaskykok",
"followers_url": "https://api.github.com/users/arjunaskykok/followers",
"following_url": "https://api.github.com/users/arjunaskykok/following{/other_user}",
"gists_url": "https://api.github.com/users/arjunaskykok/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arjunaskykok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arjunaskykok/subscriptions",
"organizations_url": "https://api.github.com/users/arjunaskykok/orgs",
"repos_url": "https://api.github.com/users/arjunaskykok/repos",
"events_url": "https://api.github.com/users/arjunaskykok/events{/privacy}",
"received_events_url": "https://api.github.com/users/arjunaskykok/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37940/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/37940/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/37939 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37939/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37939/comments | https://api.github.com/repos/huggingface/transformers/issues/37939/events | https://github.com/huggingface/transformers/issues/37939 | 3,037,433,179 | I_kwDOCUB6oc61C41b | 37,939 | `ConditionalDetrImageProcessor` still accepts the deprecated parameter `max_size` | {
"login": "arjunaskykok",
"id": 32124593,
"node_id": "MDQ6VXNlcjMyMTI0NTkz",
"avatar_url": "https://avatars.githubusercontent.com/u/32124593?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arjunaskykok",
"html_url": "https://github.com/arjunaskykok",
"followers_url": "https://api.github.com/users/arjunaskykok/followers",
"following_url": "https://api.github.com/users/arjunaskykok/following{/other_user}",
"gists_url": "https://api.github.com/users/arjunaskykok/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arjunaskykok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arjunaskykok/subscriptions",
"organizations_url": "https://api.github.com/users/arjunaskykok/orgs",
"repos_url": "https://api.github.com/users/arjunaskykok/repos",
"events_url": "https://api.github.com/users/arjunaskykok/events{/privacy}",
"received_events_url": "https://api.github.com/users/arjunaskykok/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": 5769473378,
"node_id": "LA_kwDOCUB6oc8AAAABV-MtYg",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Vision",
"name": "Vision",
"color": "C079EF",
"default": false,
"description": ""
}
] | closed | false | null | [] | null | [] | 2025-05-03T14:15:32 | 2025-10-06T14:15:57 | 2025-10-06T14:15:57 | CONTRIBUTOR | null | null | null | null | At the `__init__` method of [ConditionalDetrImageProcessor](https://github.com/huggingface/transformers/blob/main/src/transformers/models/conditional_detr/image_processing_conditional_detr.py) file, we still accept the deprecated parameter, `max_size`:
```python
if "max_size" in kwargs:
logger.warning_once(
"The `max_size` parameter is deprecated and will be removed in v4.26. "
"Please specify in `size['longest_edge'] instead`.",
)
max_size = kwargs.pop("max_size")
else:
max_size = None if size is None else 1333
```
But the version of `transformers` is already `4.52.0.dev0` (from `src/transformers/__init__.py`).
`ConditionalDetrImageProcessorFast` also suffers the same issue.
We should remove the parameter, no?
cc: @amyeroberts, @qubvel | {
"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/37939/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/37939/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/37938 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37938/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37938/comments | https://api.github.com/repos/huggingface/transformers/issues/37938/events | https://github.com/huggingface/transformers/pull/37938 | 3,037,421,903 | PR_kwDOCUB6oc6U0zkH | 37,938 | Small typo lines 47 and 199 perf_infer_gpu_one.md | {
"login": "nlhmnlhmnlhm",
"id": 61977480,
"node_id": "MDQ6VXNlcjYxOTc3NDgw",
"avatar_url": "https://avatars.githubusercontent.com/u/61977480?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nlhmnlhmnlhm",
"html_url": "https://github.com/nlhmnlhmnlhm",
"followers_url": "https://api.github.com/users/nlhmnlhmnlhm/followers",
"following_url": "https://api.github.com/users/nlhmnlhmnlhm/following{/other_user}",
"gists_url": "https://api.github.com/users/nlhmnlhmnlhm/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nlhmnlhmnlhm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nlhmnlhmnlhm/subscriptions",
"organizations_url": "https://api.github.com/users/nlhmnlhmnlhm/orgs",
"repos_url": "https://api.github.com/users/nlhmnlhmnlhm/repos",
"events_url": "https://api.github.com/users/nlhmnlhmnlhm/events{/privacy}",
"received_events_url": "https://api.github.com/users/nlhmnlhmnlhm/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-03T13:50:56 | 2025-05-06T13:33:24 | 2025-05-06T13:32:55 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37938",
"html_url": "https://github.com/huggingface/transformers/pull/37938",
"diff_url": "https://github.com/huggingface/transformers/pull/37938.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37938.patch",
"merged_at": "2025-05-06T13:32:55"
} | # What does this PR do?
Fix a small typo.
## 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?
| {
"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/37938/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/37938/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37937 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37937/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37937/comments | https://api.github.com/repos/huggingface/transformers/issues/37937/events | https://github.com/huggingface/transformers/pull/37937 | 3,037,351,014 | PR_kwDOCUB6oc6U0mNt | 37,937 | [generate] Fix `vocab_size` access for multimodal models | {
"login": "kurzdev",
"id": 29333826,
"node_id": "MDQ6VXNlcjI5MzMzODI2",
"avatar_url": "https://avatars.githubusercontent.com/u/29333826?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kurzdev",
"html_url": "https://github.com/kurzdev",
"followers_url": "https://api.github.com/users/kurzdev/followers",
"following_url": "https://api.github.com/users/kurzdev/following{/other_user}",
"gists_url": "https://api.github.com/users/kurzdev/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kurzdev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kurzdev/subscriptions",
"organizations_url": "https://api.github.com/users/kurzdev/orgs",
"repos_url": "https://api.github.com/users/kurzdev/repos",
"events_url": "https://api.github.com/users/kurzdev/events{/privacy}",
"received_events_url": "https://api.github.com/users/kurzdev/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-03T11:22:26 | 2025-05-05T14:56:57 | 2025-05-05T14:56:56 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37937",
"html_url": "https://github.com/huggingface/transformers/pull/37937",
"diff_url": "https://github.com/huggingface/transformers/pull/37937.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37937.patch",
"merged_at": "2025-05-05T14:56:56"
} | # What does this PR do?
Fixes #37930
Prior to this PR, `compute_transition_scores`, `_get_candidate_generator` and `_get_logits_processor` still used `config.vocab_size` to access a model's vocab size. This caused issues with multimodal models, as the vocab_size is stored within their `text_config`.
This PR addresses this issue by migrating these remaining accesses to `vocab_size` to `config.get_text_config().vocab_size`.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?
## Who can review?
@zucchini-nlp @gante | {
"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/37937/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/37937/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37936 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37936/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37936/comments | https://api.github.com/repos/huggingface/transformers/issues/37936/events | https://github.com/huggingface/transformers/pull/37936 | 3,037,244,247 | PR_kwDOCUB6oc6U0R-X | 37,936 | fix docs serving typos. | {
"login": "zhanluxianshen",
"id": 161462588,
"node_id": "U_kgDOCZ-5PA",
"avatar_url": "https://avatars.githubusercontent.com/u/161462588?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zhanluxianshen",
"html_url": "https://github.com/zhanluxianshen",
"followers_url": "https://api.github.com/users/zhanluxianshen/followers",
"following_url": "https://api.github.com/users/zhanluxianshen/following{/other_user}",
"gists_url": "https://api.github.com/users/zhanluxianshen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zhanluxianshen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zhanluxianshen/subscriptions",
"organizations_url": "https://api.github.com/users/zhanluxianshen/orgs",
"repos_url": "https://api.github.com/users/zhanluxianshen/repos",
"events_url": "https://api.github.com/users/zhanluxianshen/events{/privacy}",
"received_events_url": "https://api.github.com/users/zhanluxianshen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-03T07:57:55 | 2025-05-06T21:28:35 | 2025-05-06T13:32:44 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37936",
"html_url": "https://github.com/huggingface/transformers/pull/37936",
"diff_url": "https://github.com/huggingface/transformers/pull/37936.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37936.patch",
"merged_at": "2025-05-06T13:32:44"
} | null | {
"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/37936/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/37936/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37935 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37935/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37935/comments | https://api.github.com/repos/huggingface/transformers/issues/37935/events | https://github.com/huggingface/transformers/pull/37935 | 3,036,989,564 | PR_kwDOCUB6oc6UzfF5 | 37,935 | Include output embedding as well with `include_embedding` flag | {
"login": "jerryzh168",
"id": 4958441,
"node_id": "MDQ6VXNlcjQ5NTg0NDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/4958441?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jerryzh168",
"html_url": "https://github.com/jerryzh168",
"followers_url": "https://api.github.com/users/jerryzh168/followers",
"following_url": "https://api.github.com/users/jerryzh168/following{/other_user}",
"gists_url": "https://api.github.com/users/jerryzh168/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jerryzh168/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jerryzh168/subscriptions",
"organizations_url": "https://api.github.com/users/jerryzh168/orgs",
"repos_url": "https://api.github.com/users/jerryzh168/repos",
"events_url": "https://api.github.com/users/jerryzh168/events{/privacy}",
"received_events_url": "https://api.github.com/users/jerryzh168/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-02T23:46:04 | 2025-05-16T10:07:04 | 2025-05-16T10:06:12 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37935",
"html_url": "https://github.com/huggingface/transformers/pull/37935",
"diff_url": "https://github.com/huggingface/transformers/pull/37935.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37935.patch",
"merged_at": "2025-05-16T10:06:12"
} | Summary:
att
Test Plan:
python tests/quantization/torchao_integration/test_torchao.py -k test_include_input_output_embeddings
Reviewers:
Subscribers:
Tasks:
Tags:
| {
"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/37935/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/37935/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37934 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37934/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37934/comments | https://api.github.com/repos/huggingface/transformers/issues/37934/events | https://github.com/huggingface/transformers/issues/37934 | 3,036,862,351 | I_kwDOCUB6oc61AteP | 37,934 | Is Llama4TextL2Norm meant to be RMS norm? | {
"login": "0x6b64",
"id": 105229704,
"node_id": "U_kgDOBkWtiA",
"avatar_url": "https://avatars.githubusercontent.com/u/105229704?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/0x6b64",
"html_url": "https://github.com/0x6b64",
"followers_url": "https://api.github.com/users/0x6b64/followers",
"following_url": "https://api.github.com/users/0x6b64/following{/other_user}",
"gists_url": "https://api.github.com/users/0x6b64/gists{/gist_id}",
"starred_url": "https://api.github.com/users/0x6b64/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/0x6b64/subscriptions",
"organizations_url": "https://api.github.com/users/0x6b64/orgs",
"repos_url": "https://api.github.com/users/0x6b64/repos",
"events_url": "https://api.github.com/users/0x6b64/events{/privacy}",
"received_events_url": "https://api.github.com/users/0x6b64/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-02T21:28:05 | 2025-06-11T08:02:45 | 2025-06-11T08:02:45 | NONE | null | null | null | null | https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama4/modeling_llama4.py#L118
```
x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps)
```
This is just the rms norm? | {
"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/37934/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/37934/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/37933 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37933/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37933/comments | https://api.github.com/repos/huggingface/transformers/issues/37933/events | https://github.com/huggingface/transformers/pull/37933 | 3,036,610,103 | PR_kwDOCUB6oc6UyPAe | 37,933 | Feat: Add ddp_param_to_hook_all_reduce option | {
"login": "demoncoder-crypto",
"id": 174311533,
"node_id": "U_kgDOCmPIbQ",
"avatar_url": "https://avatars.githubusercontent.com/u/174311533?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/demoncoder-crypto",
"html_url": "https://github.com/demoncoder-crypto",
"followers_url": "https://api.github.com/users/demoncoder-crypto/followers",
"following_url": "https://api.github.com/users/demoncoder-crypto/following{/other_user}",
"gists_url": "https://api.github.com/users/demoncoder-crypto/gists{/gist_id}",
"starred_url": "https://api.github.com/users/demoncoder-crypto/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/demoncoder-crypto/subscriptions",
"organizations_url": "https://api.github.com/users/demoncoder-crypto/orgs",
"repos_url": "https://api.github.com/users/demoncoder-crypto/repos",
"events_url": "https://api.github.com/users/demoncoder-crypto/events{/privacy}",
"received_events_url": "https://api.github.com/users/demoncoder-crypto/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-05-02T18:37:39 | 2025-05-06T23:13:27 | null | NONE | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37933",
"html_url": "https://github.com/huggingface/transformers/pull/37933",
"diff_url": "https://github.com/huggingface/transformers/pull/37933.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37933.patch",
"merged_at": null
} | Addresses #36941, Tried to implement please let me know if its anything useful | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37933/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/37933/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37932 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37932/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37932/comments | https://api.github.com/repos/huggingface/transformers/issues/37932/events | https://github.com/huggingface/transformers/issues/37932 | 3,036,367,267 | I_kwDOCUB6oc60-0mj | 37,932 | Different DataLoader worker share the same seed and lost randomness | {
"login": "gathierry",
"id": 4011873,
"node_id": "MDQ6VXNlcjQwMTE4NzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/4011873?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gathierry",
"html_url": "https://github.com/gathierry",
"followers_url": "https://api.github.com/users/gathierry/followers",
"following_url": "https://api.github.com/users/gathierry/following{/other_user}",
"gists_url": "https://api.github.com/users/gathierry/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gathierry/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gathierry/subscriptions",
"organizations_url": "https://api.github.com/users/gathierry/orgs",
"repos_url": "https://api.github.com/users/gathierry/repos",
"events_url": "https://api.github.com/users/gathierry/events{/privacy}",
"received_events_url": "https://api.github.com/users/gathierry/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-05-02T16:09:48 | 2025-05-12T15:59:18 | 2025-05-12T15:59:18 | CONTRIBUTOR | null | null | null | null | ### System Info
train_dataloader use `seed_worker` to set the seed on different workers. But when working with distributed training, e.g. DDP, deep speed, etc, different ranks will shared the same seed. If there are random data augmentation, they will be the same across different ranks.
https://github.com/huggingface/transformers/blob/2932f318a20d9e54cc7aea052e040164d85de7d6/src/transformers/trainer.py#L1031
### Who can help?
@zach-huggingface @SunMarc
### 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
print(os.environ["LOCAL_RANK"], torch.randint(low=0, high=len(self), size=()).item())
in the `__getitem__ ` function of dataset, and find same random value across different rank
### Expected behavior
expect different value across different ranks | {
"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/37932/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/37932/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/37931 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37931/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37931/comments | https://api.github.com/repos/huggingface/transformers/issues/37931/events | https://github.com/huggingface/transformers/pull/37931 | 3,036,274,725 | PR_kwDOCUB6oc6UxHKm | 37,931 | [speech2text] fix init of sinusoidal embeddings | {
"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-05-02T15:19:38 | 2025-05-06T13:49:03 | 2025-05-06T13:49:00 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37931",
"html_url": "https://github.com/huggingface/transformers/pull/37931",
"diff_url": "https://github.com/huggingface/transformers/pull/37931.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37931.patch",
"merged_at": "2025-05-06T13:49:00"
} | # What does this PR do?
Fixes #37874
Problem:
`nn.Parameter()` defined in `__init__` -> we initialize in the `meta` device -> whatever is stored in this parameter at init time gets shredded
Solution:
Don't init the sinusoidal embeddings in `nn.Parameter`, e.g. use a non-persistent buffer. The buffer solution is used in other models with sinusoidal embeddings, e.g. [here](https://github.com/huggingface/transformers/blob/fa3c3f9cab1c45b449bd57e238c511c79637e314/src/transformers/models/kosmos2/modeling_kosmos2.py#L810) | {
"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/37931/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/37931/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37930 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37930/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37930/comments | https://api.github.com/repos/huggingface/transformers/issues/37930/events | https://github.com/huggingface/transformers/issues/37930 | 3,036,114,729 | I_kwDOCUB6oc60928p | 37,930 | `compute_transition_scores` fails for vision-language models | {
"login": "kurzdev",
"id": 29333826,
"node_id": "MDQ6VXNlcjI5MzMzODI2",
"avatar_url": "https://avatars.githubusercontent.com/u/29333826?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kurzdev",
"html_url": "https://github.com/kurzdev",
"followers_url": "https://api.github.com/users/kurzdev/followers",
"following_url": "https://api.github.com/users/kurzdev/following{/other_user}",
"gists_url": "https://api.github.com/users/kurzdev/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kurzdev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kurzdev/subscriptions",
"organizations_url": "https://api.github.com/users/kurzdev/orgs",
"repos_url": "https://api.github.com/users/kurzdev/repos",
"events_url": "https://api.github.com/users/kurzdev/events{/privacy}",
"received_events_url": "https://api.github.com/users/kurzdev/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-05-02T14:06:07 | 2025-05-05T14:56:57 | 2025-05-05T14:56:57 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.48.3
- Platform: Linux-4.18.0-513.5.1.el8_9.x86_64-x86_64-with-glibc2.35
- Python version: 3.11.11
- Huggingface_hub version: 0.30.2
- Safetensors version: 0.5.3
- Accelerate version: 1.6.0
- Accelerate config: not found
- PyTorch version (GPU?): 2.6.0+cu124 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: yes, across 4 GPUs with `accelerate launch --multi-gpu`
- Using GPU in script?: yes
- GPU type: NVIDIA A100-SXM4-80GB
### Who can help?
@zucchini-nlp @gante
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
```py
import torch
from torch.utils.data import DataLoader
from transformers import AutoProcessor, LlavaNextForConditionalGeneration
BATCH_SIZE = 4
NUM_BEAMS = 5
model = LlavaNextForConditionalGeneration.from_pretrained(
"llava-hf/llama3-llava-next-8b-hf",
torch_dtype=torch.bfloat16,
low_cpu_mem_usage=True,
attn_implementation="flash_attention_2",
)
processor = AutoProcessor.from_pretrained(
"llava-hf/llama3-llava-next-8b-hf",
model_max_length=4096, # https://llava-vl.github.io/blog/2024-04-30-llava-next-video/
)
dataset = ... # Some custom VQAv2 dataset
loader = DataLoader(
dataset,
batch_size=BATCH_SIZE,
num_workers=2,
pin_memory=True,
shuffle=False,
)
for batch in loader:
features = processor(
images=batch["image"],
text=batch["prompt"],
return_tensors="pt",
padding="max_length",
truncation=True
)
outputs = model.generate(
max_new_tokens=128,
num_beams=NUM_BEAMS,
length_penalty=0,
input_ids=features["input_ids"],
attention_mask=features["attention_mask"],
pixel_values=features["pixel_values"],
image_sizes=features["image_sizes"]
pad_token_id=processor.tokenizer.eos_token_id,
return_dict_in_generate=True,
output_logits=True,
output_scores=True
)
transition_scores = model.compute_transition_scores(
outputs.sequences,
outputs.scores,
outputs.beam_scores,
normalize_logits=True,
)
```
The above code will fail because the config for vision-language models has no attribute named `vocab_size` (accessed [here](https://github.com/huggingface/transformers/blob/main/src/transformers/generation/utils.py#L1415) and [here](https://github.com/huggingface/transformers/blob/main/src/transformers/generation/utils.py#L1429)):
```py
...
File "/pfss/mlde/workspaces/mlde_wsp_Rohrbach/users/pk65sity/kavqa/.venv/lib/python3.11/site-packages/transformers/generation/utils.py", line 1254, in compute_transition_scores
scores = scores.reshape(-1, self.config.vocab_size, scores.shape[-1])
^^^^^^^^^^^^^^^^^^^^^^
File "/pfss/mlde/workspaces/mlde_wsp_Rohrbach/users/pk65sity/kavqa/.venv/lib/python3.11/site-packages/transformers/configuration_utils.py", line 211, in __getattribute__
return super().__getattribute__(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'LlavaNextConfig' object has no attribute 'vocab_size'
```
### Expected behavior
I'd expect the function to recognise the presence of a vision-language model and choose the right config entry.
I'd assume that this can probably be fixed with a simple `vocab_size = self.text_config.vocab_size if hasattr(self, "text_config") else self.config.vocab_size`?
Let me know if I'm missing anything, otherwise I can also draft a PR. 😊 | {
"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/37930/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/37930/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/37929 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37929/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37929/comments | https://api.github.com/repos/huggingface/transformers/issues/37929/events | https://github.com/huggingface/transformers/pull/37929 | 3,036,059,759 | PR_kwDOCUB6oc6UwYiA | 37,929 | [docs] logits docstring | {
"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-05-02T13:38:54 | 2025-05-02T15:38:35 | 2025-05-02T15:38:35 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37929",
"html_url": "https://github.com/huggingface/transformers/pull/37929",
"diff_url": "https://github.com/huggingface/transformers/pull/37929.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37929.patch",
"merged_at": "2025-05-02T15:38:35"
} | # What does this PR do?
Fixes #37918
this one was copied pasted across classes, and not corrected in the case with beam search -- we output the logits for all beams | {
"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/37929/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/37929/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37928 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37928/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37928/comments | https://api.github.com/repos/huggingface/transformers/issues/37928/events | https://github.com/huggingface/transformers/issues/37928 | 3,036,016,664 | I_kwDOCUB6oc609fAY | 37,928 | Updates in type-checking specifications have broken transformers' types | {
"login": "thfrkielikone",
"id": 125542386,
"node_id": "U_kgDOB3uf8g",
"avatar_url": "https://avatars.githubusercontent.com/u/125542386?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/thfrkielikone",
"html_url": "https://github.com/thfrkielikone",
"followers_url": "https://api.github.com/users/thfrkielikone/followers",
"following_url": "https://api.github.com/users/thfrkielikone/following{/other_user}",
"gists_url": "https://api.github.com/users/thfrkielikone/gists{/gist_id}",
"starred_url": "https://api.github.com/users/thfrkielikone/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thfrkielikone/subscriptions",
"organizations_url": "https://api.github.com/users/thfrkielikone/orgs",
"repos_url": "https://api.github.com/users/thfrkielikone/repos",
"events_url": "https://api.github.com/users/thfrkielikone/events{/privacy}",
"received_events_url": "https://api.github.com/users/thfrkielikone/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-05-02T13:23:11 | 2025-06-11T08:02:47 | 2025-06-11T08:02:47 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.52.0.dev0 (commit fa3c3f9cab1c45b449bd57e238c511c79637e314; head of main branch as of writing)
- Platform: macOS-15.4.1-arm64-arm-64bit-Mach-O
- Python version: 3.13.2
- Huggingface_hub version: 0.30.2
- Safetensors version: 0.5.3
- Accelerate version: not installed
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (GPU?): 2.7.0 (False)
- 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?: <not relevant; type checking issue>
### Who can help?
_No response_
### 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, ...)
- [x] My own task or dataset (give details below)
### Reproduction
The following code runs correctly in the above environment (empty venv), ie. quits without producing output:
```python
from transformers import PreTrainedTokenizer, GenerationMixin, StoppingCriteriaList, StoppingCriteria, pipeline, Pipeline
```
Upon type checking with the newest pyright (1.1.400 installed from npm), it produces the following error:
```
<snip>/repro.py
<snip>/repro.py:1:58 - error: "PreTrainedTokenizer" is not exported from module "transformers"
Import from "transformers.tokenization_utils" instead (reportPrivateImportUsage)
<snip>/repro.py:1:79 - error: "GenerationMixin" is not exported from module "transformers"
Import from "transformers.generation.utils" instead (reportPrivateImportUsage)
<snip>/repro.py:1:96 - error: "StoppingCriteriaList" is not exported from module "transformers"
Import from "transformers.generation.stopping_criteria" instead (reportPrivateImportUsage)
<snip>/repro.py:1:118 - error: "StoppingCriteria" is not exported from module "transformers"
Import from "transformers.generation.stopping_criteria" instead (reportPrivateImportUsage)
<snip>/repro.py:1:136 - error: "pipeline" is not exported from module "transformers"
Import from "transformers.pipelines" instead (reportPrivateImportUsage)
<snip>/repro.py:1:146 - error: "Pipeline" is not exported from module "transformers"
Import from "transformers.pipelines.base" instead (reportPrivateImportUsage)
6 errors, 0 warnings, 0 informations
```
This is due to pyright updating its definition of what is a publicly re-exported symbol; see page https://docs.basedpyright.com/dev/benefits-over-pyright/new-diagnostic-rules/ section reportPrivateLocalImportUsage. It also links to the relevant PEP (https://peps.python.org/pep-0484/#stub-files) that specifies this. To quote the PEP:
> Modules and variables imported into the stub are not considered exported from the stub unless the import uses the import ... as ... form or the equivalent from ... import ... as ... form. (UPDATE: To clarify, the intention here is that only names imported using the form X as X will be exported, i.e. the name before and after as must be the same.)
If looking at the documentation for eg. the pipeline objects (https://huggingface.co/docs/transformers/v4.51.3/en/main_classes/pipelines#transformers.pipeline), we find this example code, which does the same `from transformers import pipeline`; I conclude that this is the expected usage:
```python
import datasets
from transformers import pipeline
from transformers.pipelines.pt_utils import KeyDataset
from tqdm.auto import tqdm
pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h", device=0)
dataset = datasets.load_dataset("superb", name="asr", split="test")
# KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item
# as we're not interested in the *target* part of the dataset. For sentence pair use KeyPairDataset
for out in tqdm(pipe(KeyDataset(dataset, "file"))):
print(out)
# {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"}
# {"text": ....}
# ....
```
In my environment I get the same kind of error (+ I don't have datasets installed)
```
<snip>/pipeline.py
<snip>/pipeline.py:1:8 - error: Import "datasets" could not be resolved (reportMissingImports)
<snip>/pipeline.py:2:26 - error: "pipeline" is not exported from module "transformers"
Import from "transformers.pipelines" instead (reportPrivateImportUsage)
2 errors, 0 warnings, 0 informations
```
Fixing this issue needs an intervention upon the imports in `src/transformers/__init__.py`. It looks like something tedious that could be mostly automated. For the pipeline error to get resolved, the minimal change was sth like this:
```patch
diff --git a/src/transformers/__init__.py b/src/transformers/__init__.py
index 691f8aad00..2cea8c0078 100644
--- a/src/transformers/__init__.py
+++ b/src/transformers/__init__.py
@@ -668,8 +668,8 @@ if TYPE_CHECKING:
ZeroShotClassificationPipeline,
ZeroShotImageClassificationPipeline,
ZeroShotObjectDetectionPipeline,
- pipeline,
)
+ from .pipelines import pipeline as pipeline
from .processing_utils import ProcessorMixin
# Tokenization
```
### Expected behavior
The above code which runs correctly should also type check cleanly. | {
"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/37928/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/37928/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/37927 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37927/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37927/comments | https://api.github.com/repos/huggingface/transformers/issues/37927/events | https://github.com/huggingface/transformers/issues/37927 | 3,035,993,878 | I_kwDOCUB6oc609ZcW | 37,927 | request the support for training support for QuantizationMethod.FP8 | {
"login": "edoproch",
"id": 64469582,
"node_id": "MDQ6VXNlcjY0NDY5NTgy",
"avatar_url": "https://avatars.githubusercontent.com/u/64469582?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/edoproch",
"html_url": "https://github.com/edoproch",
"followers_url": "https://api.github.com/users/edoproch/followers",
"following_url": "https://api.github.com/users/edoproch/following{/other_user}",
"gists_url": "https://api.github.com/users/edoproch/gists{/gist_id}",
"starred_url": "https://api.github.com/users/edoproch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/edoproch/subscriptions",
"organizations_url": "https://api.github.com/users/edoproch/orgs",
"repos_url": "https://api.github.com/users/edoproch/repos",
"events_url": "https://api.github.com/users/edoproch/events{/privacy}",
"received_events_url": "https://api.github.com/users/edoproch/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-05-02T13:11:33 | 2025-06-11T08:02:49 | 2025-06-11T08:02:49 | NONE | null | null | null | null | ### System Info
I was trying to fine tune unsloth/Qwen3-4B-FP8 with unsloth ad I have the following error
# code
```
from trl import SFTTrainer
from transformers import TrainingArguments
from unsloth import is_bfloat16_supported
trainer = SFTTrainer(
model = model,
tokenizer = tokenizer,
train_dataset = dataset,
eval_dataset = dataset_val,
dataset_text_field = "text",
max_seq_length = max_seq_length,
dataset_num_proc = 2,
args = TrainingArguments(
per_device_train_batch_size = 2,
gradient_accumulation_steps = 4,
eval_on_start=True,
eval_steps=1,
num_train_epochs = 4,
warmup_ratio=0.1,
#max_steps = 60,
learning_rate = 2e-4,
fp16 = not is_bfloat16_supported(),
bf16 = is_bfloat16_supported(),
logging_steps = 1,
optim = "adamw_8bit",
weight_decay = 0.01,
lr_scheduler_type = "linear",
seed = 3407,
output_dir = "outputs",
report_to = "none", # Use this for WandB etc
),
)
```
# Error
ValueError: The model you are trying to fine-tune is quantized with QuantizationMethod.FP8 but that quantization method do not support training. Please open an issue on GitHub: https://github.com/huggingface/transformers to request the support for training support for QuantizationMethod.FP8
### 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
Go on unsloth's colab notebook about fine tuning Qwen3 and change the default model with unsloth/Qwen3-4B-FP8
### Expected behavior
The training should work | {
"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/37927/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/37927/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/37926 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37926/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37926/comments | https://api.github.com/repos/huggingface/transformers/issues/37926/events | https://github.com/huggingface/transformers/pull/37926 | 3,035,979,901 | PR_kwDOCUB6oc6UwG7- | 37,926 | refactor: background thread for CB | {
"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-05-02T13:04:42 | 2025-05-12T14:58:49 | 2025-05-12T14:58:49 | MEMBER | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37926",
"html_url": "https://github.com/huggingface/transformers/pull/37926",
"diff_url": "https://github.com/huggingface/transformers/pull/37926.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37926.patch",
"merged_at": null
} | Building up on Arthur's work, adding a background thread for efficient processing of incoming inputs in an asynchronous manner. | {
"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/37926/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/37926/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37925 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37925/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37925/comments | https://api.github.com/repos/huggingface/transformers/issues/37925/events | https://github.com/huggingface/transformers/pull/37925 | 3,035,961,975 | PR_kwDOCUB6oc6UwDCz | 37,925 | [WIP] Add MM Grounding DINO | {
"login": "rziga",
"id": 102856773,
"node_id": "U_kgDOBiF4RQ",
"avatar_url": "https://avatars.githubusercontent.com/u/102856773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rziga",
"html_url": "https://github.com/rziga",
"followers_url": "https://api.github.com/users/rziga/followers",
"following_url": "https://api.github.com/users/rziga/following{/other_user}",
"gists_url": "https://api.github.com/users/rziga/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rziga/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rziga/subscriptions",
"organizations_url": "https://api.github.com/users/rziga/orgs",
"repos_url": "https://api.github.com/users/rziga/repos",
"events_url": "https://api.github.com/users/rziga/events{/privacy}",
"received_events_url": "https://api.github.com/users/rziga/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": 5769473378,
"node_id": "LA_kwDOCUB6oc8AAAABV-MtYg",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Vision",
"name": "Vision",
"color": "C079EF",
"default": false,
"description": ""
}
] | closed | false | null | [] | null | [] | 2025-05-02T12:55:27 | 2025-08-07T16:38:24 | 2025-08-01T14:43:23 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37925",
"html_url": "https://github.com/huggingface/transformers/pull/37925",
"diff_url": "https://github.com/huggingface/transformers/pull/37925.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37925.patch",
"merged_at": "2025-08-01T14:43:23"
} | # What does this PR do?
Fixes #37744.
It adds support for MM Grounding DINO and LLMDet (inference only).
* I've added a weight conversion script and a modular transformers implementation.
* The forward pass works with 1e-3 tolerance compared to the original (checked tiny and large checkpoints).
* The tests are copied and modified from Grounding DINO, but two integration tests fail currently (batched consistency and CPU-GPU consistency).
# TODO
[ ] fix failing tests
Tagging @qubvel
| {
"login": "qubvel",
"id": 31920396,
"node_id": "MDQ6VXNlcjMxOTIwMzk2",
"avatar_url": "https://avatars.githubusercontent.com/u/31920396?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/qubvel",
"html_url": "https://github.com/qubvel",
"followers_url": "https://api.github.com/users/qubvel/followers",
"following_url": "https://api.github.com/users/qubvel/following{/other_user}",
"gists_url": "https://api.github.com/users/qubvel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/qubvel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qubvel/subscriptions",
"organizations_url": "https://api.github.com/users/qubvel/orgs",
"repos_url": "https://api.github.com/users/qubvel/repos",
"events_url": "https://api.github.com/users/qubvel/events{/privacy}",
"received_events_url": "https://api.github.com/users/qubvel/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37925/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/37925/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37924 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37924/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37924/comments | https://api.github.com/repos/huggingface/transformers/issues/37924/events | https://github.com/huggingface/transformers/pull/37924 | 3,035,904,202 | PR_kwDOCUB6oc6Uv2lo | 37,924 | More fault tolerant notification service | {
"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-05-02T12:23:05 | 2025-05-05T13:19:50 | 2025-05-05T13:19:48 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37924",
"html_url": "https://github.com/huggingface/transformers/pull/37924",
"diff_url": "https://github.com/huggingface/transformers/pull/37924.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37924.patch",
"merged_at": "2025-05-05T13:19:48"
} | Recently I noticed my beloved CI updates weren't showing up in slack.
Turns out notification service was failing in two places. I think the root issue stems from the github API, but regardless I think it makes sense to let the notification service report as much as it can.
One where there was a mismatch between the available artifacts downloaded and the reported jobs on github ([here](https://github.com/huggingface/transformers/actions/runs/14745603051/job/41450810919#step:5:208))
And one where we ran out of `stacktraces` when processing artifact stats ([here](https://github.com/huggingface/transformers/actions/runs/14768732794/job/41518505314#step:5:65)). Preferrably this would be fixed by ensuring the result from `handle_stacktraces` always had the amount of results as `artifact["summary_short"].split("\n")` where `line.startswith("FAILED ")`, but I was hoping we could fix that later.
I also added some variables because the nested dictionary accesses was a bit much for my eyes, but that is optional. | {
"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/37924/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/37924/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37923 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37923/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37923/comments | https://api.github.com/repos/huggingface/transformers/issues/37923/events | https://github.com/huggingface/transformers/pull/37923 | 3,035,802,952 | PR_kwDOCUB6oc6Uvgcy | 37,923 | Fix tot update in trainer | {
"login": "efsotr",
"id": 104755879,
"node_id": "U_kgDOBj5ypw",
"avatar_url": "https://avatars.githubusercontent.com/u/104755879?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/efsotr",
"html_url": "https://github.com/efsotr",
"followers_url": "https://api.github.com/users/efsotr/followers",
"following_url": "https://api.github.com/users/efsotr/following{/other_user}",
"gists_url": "https://api.github.com/users/efsotr/gists{/gist_id}",
"starred_url": "https://api.github.com/users/efsotr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/efsotr/subscriptions",
"organizations_url": "https://api.github.com/users/efsotr/orgs",
"repos_url": "https://api.github.com/users/efsotr/repos",
"events_url": "https://api.github.com/users/efsotr/events{/privacy}",
"received_events_url": "https://api.github.com/users/efsotr/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-05-02T11:28:49 | 2025-05-12T15:45:25 | 2025-05-12T15:45:25 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37923",
"html_url": "https://github.com/huggingface/transformers/pull/37923",
"diff_url": "https://github.com/huggingface/transformers/pull/37923.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37923.patch",
"merged_at": "2025-05-12T15:45:24"
} | # What does this PR do?
Fixed incorrect calculation of update steps per epoch and micro steps in the last step of an epoch when gradient_accumulation > 1, which was introduced by #34198.
Added tests to ensure that the number of micro batches during training matches the number of micro batches provided by the dataloader.
Fixes #37777
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?
## Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@ArthurZucker @muellerzr @SunMarc @Rocketknight1
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface and @SunMarc
- 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/37923/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/37923/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.