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/37822 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37822/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37822/comments | https://api.github.com/repos/huggingface/transformers/issues/37822/events | https://github.com/huggingface/transformers/pull/37822 | 3,023,989,709 | PR_kwDOCUB6oc6UHf9Z | 37,822 | Added False case implementation for config.do_stable_layer_norm in FlaxWav2vec2Models | {
"login": "ctr-pmuruganTT",
"id": 202670962,
"node_id": "U_kgDODBSDcg",
"avatar_url": "https://avatars.githubusercontent.com/u/202670962?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ctr-pmuruganTT",
"html_url": "https://github.com/ctr-pmuruganTT",
"followers_url": "https://api.github.com/users/ctr-pmuruganTT/followers",
"following_url": "https://api.github.com/users/ctr-pmuruganTT/following{/other_user}",
"gists_url": "https://api.github.com/users/ctr-pmuruganTT/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ctr-pmuruganTT/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ctr-pmuruganTT/subscriptions",
"organizations_url": "https://api.github.com/users/ctr-pmuruganTT/orgs",
"repos_url": "https://api.github.com/users/ctr-pmuruganTT/repos",
"events_url": "https://api.github.com/users/ctr-pmuruganTT/events{/privacy}",
"received_events_url": "https://api.github.com/users/ctr-pmuruganTT/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": ""
}
] | closed | false | null | [] | null | [] | 2025-04-28T07:33:00 | 2025-06-27T13:28:37 | 2025-06-27T13:28:36 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37822",
"html_url": "https://github.com/huggingface/transformers/pull/37822",
"diff_url": "https://github.com/huggingface/transformers/pull/37822.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37822.patch",
"merged_at": null
} | # What does this PR do?
In [FlaxWa2Vec2](https://github.com/huggingface/transformers/blob/397a5ede33863d6f7137c771a68d40036cac0396/src/transformers/models/wav2vec2/modeling_flax_wav2vec2.py#L953) there is no implementation when `config.do_stable_layer_norm` is false.
There are more chances that we will get this Not Implemented error frequently, since this value is false by default.
For this scenario, there is an implementation in [modeling_tf_wav2vec2.py](https://github.com/huggingface/transformers/blob/397a5ede33863d6f7137c771a68d40036cac0396/src/transformers/models/wav2vec2/modeling_tf_wav2vec2.py#L1195). I have recreated the same in flax version for `modeling_flax_wav2vec2.py`
I have added 4 functions which are the No Stable Layer version code for existing functions
* FlaxWav2Vec2LayerNormPostAttention -> FlaxWav2Vec2StableLayerNormEncoder
* FlaxWav2Vec2LayerNormPostAttentionCollection -> FlaxWav2Vec2EncoderLayerStableLayerNormCollection
* FlaxWav2Vec2EncoderStableLayerNormPostAttention -> FlaxWav2Vec2EncoderLayerStableLayerNorm
* FlaxWav2Vec2NoLayerNormConvLayer -> FlaxWav2Vec2LayerNormConvLayer
<!--
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 https://github.com/huggingface/transformers/issues/37731
## 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?
Attaching some Screenshots for reference :
### Before making this change, I am getting the error as stated in #37731

### After making this change, Model is loaded and I am able to print it

## 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
-->
@gante and @Rocketknight1 | {
"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/37822/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37822/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37821 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37821/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37821/comments | https://api.github.com/repos/huggingface/transformers/issues/37821/events | https://github.com/huggingface/transformers/pull/37821 | 3,023,954,003 | PR_kwDOCUB6oc6UHYTz | 37,821 | [config] revert #37603 | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-28T07:16:24 | 2025-04-28T14:28:30 | 2025-04-28T14:28:30 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37821",
"html_url": "https://github.com/huggingface/transformers/pull/37821",
"diff_url": "https://github.com/huggingface/transformers/pull/37821.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37821.patch",
"merged_at": "2025-04-28T14:28:30"
} | # What does this PR do?
#37603 introduced a regression by deleting a key from config which should not be deleted. This PR reverts the change
cc @BenjaminBossan to verify it works for PEFT
| {
"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/37821/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37821/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37820 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37820/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37820/comments | https://api.github.com/repos/huggingface/transformers/issues/37820/events | https://github.com/huggingface/transformers/issues/37820 | 3,023,911,559 | I_kwDOCUB6oc60PTqH | 37,820 | When will transformers==4.51.4 be released? | {
"login": "FightingZhen",
"id": 26176607,
"node_id": "MDQ6VXNlcjI2MTc2NjA3",
"avatar_url": "https://avatars.githubusercontent.com/u/26176607?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/FightingZhen",
"html_url": "https://github.com/FightingZhen",
"followers_url": "https://api.github.com/users/FightingZhen/followers",
"following_url": "https://api.github.com/users/FightingZhen/following{/other_user}",
"gists_url": "https://api.github.com/users/FightingZhen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/FightingZhen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FightingZhen/subscriptions",
"organizations_url": "https://api.github.com/users/FightingZhen/orgs",
"repos_url": "https://api.github.com/users/FightingZhen/repos",
"events_url": "https://api.github.com/users/FightingZhen/events{/privacy}",
"received_events_url": "https://api.github.com/users/FightingZhen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-28T06:57:27 | 2025-06-05T08:02:24 | 2025-06-05T08:02:24 | CONTRIBUTOR | null | null | null | null | As title, when will transformers==4.51.4 be released? A static version is required :) | {
"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/37820/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37820/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/37819 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37819/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37819/comments | https://api.github.com/repos/huggingface/transformers/issues/37819/events | https://github.com/huggingface/transformers/pull/37819 | 3,023,581,331 | PR_kwDOCUB6oc6UGIKD | 37,819 | [llava] one pixel is missing from padding when length is odd | {
"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-04-28T03:12:49 | 2025-05-06T11:11:27 | 2025-05-06T11:11:26 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37819",
"html_url": "https://github.com/huggingface/transformers/pull/37819",
"diff_url": "https://github.com/huggingface/transformers/pull/37819.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37819.patch",
"merged_at": "2025-05-06T11:11:26"
} | One pixel is missing from padding when length is odd in llava family and aria model which is different from the logic in LLaVA-NeXT repo. In LLaVA-NeXT, this is automatically done as its logic resize image first and paste (or overwrite) original image to it (https://github.com/LLaVA-VL/LLaVA-NeXT/blob/main/llava/mm_utils.py#L186).
Also add vision_aspect_ratio argument to LlavaOnevisionImageProcessor to regulate max_num_patches during unpadding. It was hard-coded to "9" before. (https://github.com/LLaVA-VL/LLaVA-NeXT/blob/main/llava/model/llava_arch.py#L387)
And fix typo "processinf" to "processing" in documents.
## 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?
@amyeroberts, @qubvel
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier
Library:
- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface 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": "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/37819/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37819/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37818 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37818/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37818/comments | https://api.github.com/repos/huggingface/transformers/issues/37818/events | https://github.com/huggingface/transformers/issues/37818 | 3,023,408,075 | I_kwDOCUB6oc60NYvL | 37,818 | Return type is not `List[...]`? | {
"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-04-28T00:11:06 | 2025-06-05T08:02:26 | 2025-06-05T08:02:26 | CONTRIBUTOR | null | null | null | null | Trying to understand this line: https://github.com/huggingface/transformers/blob/main/src/transformers/cache_utils.py#L385
The return type is a `Tuple`, which contradicts line 379 claiming the return type is a `List`? | {
"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/37818/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37818/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/37817 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37817/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37817/comments | https://api.github.com/repos/huggingface/transformers/issues/37817/events | https://github.com/huggingface/transformers/issues/37817 | 3,023,327,810 | I_kwDOCUB6oc60NFJC | 37,817 | Dinov2 With Registers includes register tokens in patch token mean for classifier input | {
"login": "psandovalsegura",
"id": 16195975,
"node_id": "MDQ6VXNlcjE2MTk1OTc1",
"avatar_url": "https://avatars.githubusercontent.com/u/16195975?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/psandovalsegura",
"html_url": "https://github.com/psandovalsegura",
"followers_url": "https://api.github.com/users/psandovalsegura/followers",
"following_url": "https://api.github.com/users/psandovalsegura/following{/other_user}",
"gists_url": "https://api.github.com/users/psandovalsegura/gists{/gist_id}",
"starred_url": "https://api.github.com/users/psandovalsegura/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/psandovalsegura/subscriptions",
"organizations_url": "https://api.github.com/users/psandovalsegura/orgs",
"repos_url": "https://api.github.com/users/psandovalsegura/repos",
"events_url": "https://api.github.com/users/psandovalsegura/events{/privacy}",
"received_events_url": "https://api.github.com/users/psandovalsegura/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-04-27T21:16:40 | 2025-05-06T09:55:54 | 2025-05-06T09:55:54 | CONTRIBUTOR | null | null | null | null | ### System Info
- `transformers` version: 4.48.2
- Platform: Linux-4.18.0-553.50.1.el8_10.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.21
- Huggingface_hub version: 0.28.1
- Safetensors version: 0.5.2
- Accelerate version: 1.3.0
- Accelerate config: not found
- PyTorch version (GPU?): 2.6.0+cu124 (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?: no
### Decription
In the `Dinov2WithRegistersForImageClassification` model, the classifier input is constructed by concatenating the [CLS] token with the mean of all image _patch_ tokens. But currently, this mean includes register tokens, which are intended to capture global information and are not representative of specific image patches.
**Current Implementation Reference**:
https://github.com/huggingface/transformers/blob/397a5ede33863d6f7137c771a68d40036cac0396/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L773-L778
**Expected Implementation**: The mean should be computed only over the patch tokens. We need to skip the register tokens which are located after the [CLS] token, as follows:
```
sequence_output = outputs[0] # batch_size, sequence_length, hidden_size
cls_token = sequence_output[:, 0]
patch_tokens = sequence_output[:, 1+self.config.num_register_tokens:] # change here!
linear_input = torch.cat([cls_token, patch_tokens.mean(dim=1)], dim=1)
```
This error is because we forgot to discard the registers at the end of the forward pass, as is done in the original paper implementation here:
https://github.com/facebookresearch/dinov2/blob/e1277af2ba9496fbadf7aec6eba56e8d882d1e35/dinov2/hub/classifiers.py#L61-L68
@NielsRogge @BernardZach @qubvel @ArthurZucker
### Reproduction
**Without registers**
Using `AutoModelForImageClassification.from_pretrained('facebook/dinov2-small-imagenet1k-1-layer')`: For an image with 256 image patches and with a breakpoint at line 773 of [transformers/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py](https://github.com/huggingface/transformers/blob/397a5ede33863d6f7137c771a68d40036cac0396/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L773-L778), we get the following shapes:
```
sequence_output.shape=torch.Size([128, 257, 384])
cls_token.shape=torch.Size([128, 384])
patch_tokens.shape=torch.Size([128, 256, 384])
```
which are all as expected.
**With registers**
Using `AutoModelForImageClassification.from_pretrained('facebook/dinov2-with-registers-small-imagenet1k-1-layer')`: For an image with 256 image patches and with a breakpoint at line 773 of [transformers/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py](https://github.com/huggingface/transformers/blob/397a5ede33863d6f7137c771a68d40036cac0396/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L773-L778), we get the following shapes:
```
sequence_output.shape=torch.Size([128, 261, 384]) # includes the 4 extra registers in sequence dim, as expected
cls_token.shape=torch.Size([128, 384]) # as expected
patch_tokens.shape=torch.Size([128, 260, 384]) # should be 256 along sequence dim, not 260
```
but here we see that `patch_tokens` still includes the registers.
### Expected behavior
**With registers**
Using `AutoModelForImageClassification.from_pretrained('facebook/dinov2-with-registers-small-imagenet1k-1-layer')`: For an image with 256 image patches and with a breakpoint at line 773 of [transformers/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py](https://github.com/huggingface/transformers/blob/397a5ede33863d6f7137c771a68d40036cac0396/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L773-L778), **should have** the following shapes:
```
sequence_output.shape=torch.Size([128, 261, 384])
cls_token.shape=torch.Size([128, 384])
patch_tokens.shape=torch.Size([128, 256, 384])
``` | {
"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/37817/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37817/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/37816 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37816/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37816/comments | https://api.github.com/repos/huggingface/transformers/issues/37816/events | https://github.com/huggingface/transformers/issues/37816 | 3,023,119,725 | I_kwDOCUB6oc60MSVt | 37,816 | Failed to load santacoder on multi-gpu with 4.51.3 | {
"login": "nv-guomingz",
"id": 137257613,
"node_id": "U_kgDOCC5ijQ",
"avatar_url": "https://avatars.githubusercontent.com/u/137257613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nv-guomingz",
"html_url": "https://github.com/nv-guomingz",
"followers_url": "https://api.github.com/users/nv-guomingz/followers",
"following_url": "https://api.github.com/users/nv-guomingz/following{/other_user}",
"gists_url": "https://api.github.com/users/nv-guomingz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nv-guomingz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nv-guomingz/subscriptions",
"organizations_url": "https://api.github.com/users/nv-guomingz/orgs",
"repos_url": "https://api.github.com/users/nv-guomingz/repos",
"events_url": "https://api.github.com/users/nv-guomingz/events{/privacy}",
"received_events_url": "https://api.github.com/users/nv-guomingz/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-04-27T14:33:33 | 2025-05-28T09:08:24 | 2025-05-28T09:08:24 | CONTRIBUTOR | null | null | null | null | ### System Info
Hi, I just met another issue for loading [santacoder](https://huggingface.co/bigcode/santacoder) on multi-gpus with transformer 4.51.3.
```python
import transformers
model = transformers.AutoModelForCausalLM.from_pretrained('bigcode/santacoder/',
device_map='auto',
trust_remote_code=True)
```
I got below error messages:
```bash
File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 564, in from_pretrained
return model_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 279, in _wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4399, in from_pretrained
) = cls._load_pretrained_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4833, in _load_pretrained_model
disk_offload_index, cpu_offload_index = _load_state_dict_into_meta_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 798, in _load_state_dict_into_meta_model
raise ValueError(f"{param_name} doesn't have any device set.")
ValueError: transformer.h.4.attn.bias doesn't have any device set.
```
It's weird that if I set the `export CUDA_VISIBLE_DEVICES=0`, I can run above code snippet succesfully (**with single gpu**).
Do you have insights on this weird error?
B.t.w, the transformer.h.4.attn.bias refer to this [tensor](https://huggingface.co/bigcode/santacoder/blob/main/modeling_gpt2_mq.py#L45-L50)
And I can run above code snippet with transformer 4.46.1
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
1. installt transformer 4.51.3
2.run below code on multi-gpus
```python
import transformers
model = transformers.AutoModelForCausalLM.from_pretrained('bigcode/santacoder/',
device_map='auto',
trust_remote_code=True)
```
### Expected behavior
Load model succesfully.
| {
"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/37816/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37816/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/37815 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37815/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37815/comments | https://api.github.com/repos/huggingface/transformers/issues/37815/events | https://github.com/huggingface/transformers/issues/37815 | 3,023,026,644 | I_kwDOCUB6oc60L7nU | 37,815 | Misleading comment at image_processing_base.py | {
"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-04-27T11:40:23 | 2025-04-30T13:31:30 | 2025-04-30T13:31:30 | CONTRIBUTOR | null | null | null | null | 
I think it should be "imported by both image_processing_utils and image_processing_utils_fast". | {
"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/37815/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37815/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/37814 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37814/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37814/comments | https://api.github.com/repos/huggingface/transformers/issues/37814/events | https://github.com/huggingface/transformers/pull/37814 | 3,022,980,885 | PR_kwDOCUB6oc6UEPoK | 37,814 | [RT-DETR] Improve docs | {
"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-04-27T10:11:51 | 2025-04-28T11:19:25 | 2025-04-28T11:19:25 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37814",
"html_url": "https://github.com/huggingface/transformers/pull/37814",
"diff_url": "https://github.com/huggingface/transformers/pull/37814.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37814.patch",
"merged_at": "2025-04-28T11:19:25"
} | # What does this PR do?
This PR fixes a "todo" in the docs of RT-DETR. cc @SangbumChoi
Fixes #37800 | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37814/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37814/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37813 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37813/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37813/comments | https://api.github.com/repos/huggingface/transformers/issues/37813/events | https://github.com/huggingface/transformers/issues/37813 | 3,022,945,589 | I_kwDOCUB6oc60Ln01 | 37,813 | qwen3-moe attention module is defined repeatedly. | {
"login": "Jintao-Huang",
"id": 45290347,
"node_id": "MDQ6VXNlcjQ1MjkwMzQ3",
"avatar_url": "https://avatars.githubusercontent.com/u/45290347?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Jintao-Huang",
"html_url": "https://github.com/Jintao-Huang",
"followers_url": "https://api.github.com/users/Jintao-Huang/followers",
"following_url": "https://api.github.com/users/Jintao-Huang/following{/other_user}",
"gists_url": "https://api.github.com/users/Jintao-Huang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Jintao-Huang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jintao-Huang/subscriptions",
"organizations_url": "https://api.github.com/users/Jintao-Huang/orgs",
"repos_url": "https://api.github.com/users/Jintao-Huang/repos",
"events_url": "https://api.github.com/users/Jintao-Huang/events{/privacy}",
"received_events_url": "https://api.github.com/users/Jintao-Huang/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-27T09:02:57 | 2025-05-09T06:33:38 | 2025-05-09T06:33:36 | CONTRIBUTOR | null | null | null | null | null | {
"login": "Jintao-Huang",
"id": 45290347,
"node_id": "MDQ6VXNlcjQ1MjkwMzQ3",
"avatar_url": "https://avatars.githubusercontent.com/u/45290347?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Jintao-Huang",
"html_url": "https://github.com/Jintao-Huang",
"followers_url": "https://api.github.com/users/Jintao-Huang/followers",
"following_url": "https://api.github.com/users/Jintao-Huang/following{/other_user}",
"gists_url": "https://api.github.com/users/Jintao-Huang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Jintao-Huang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jintao-Huang/subscriptions",
"organizations_url": "https://api.github.com/users/Jintao-Huang/orgs",
"repos_url": "https://api.github.com/users/Jintao-Huang/repos",
"events_url": "https://api.github.com/users/Jintao-Huang/events{/privacy}",
"received_events_url": "https://api.github.com/users/Jintao-Huang/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37813/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37813/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/37812 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37812/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37812/comments | https://api.github.com/repos/huggingface/transformers/issues/37812/events | https://github.com/huggingface/transformers/issues/37812 | 3,022,819,766 | I_kwDOCUB6oc60LJG2 | 37,812 | When will transformers 4.51.4 be released? | {
"login": "FightingZhen",
"id": 26176607,
"node_id": "MDQ6VXNlcjI2MTc2NjA3",
"avatar_url": "https://avatars.githubusercontent.com/u/26176607?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/FightingZhen",
"html_url": "https://github.com/FightingZhen",
"followers_url": "https://api.github.com/users/FightingZhen/followers",
"following_url": "https://api.github.com/users/FightingZhen/following{/other_user}",
"gists_url": "https://api.github.com/users/FightingZhen/gists{/gist_id}",
"starred_url": "https://api.github.com/users/FightingZhen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FightingZhen/subscriptions",
"organizations_url": "https://api.github.com/users/FightingZhen/orgs",
"repos_url": "https://api.github.com/users/FightingZhen/repos",
"events_url": "https://api.github.com/users/FightingZhen/events{/privacy}",
"received_events_url": "https://api.github.com/users/FightingZhen/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-27T06:21:48 | 2025-07-17T08:03:16 | 2025-07-17T08:03:16 | CONTRIBUTOR | null | null | null | null | As title, when will transformers 4.51.4 be released? Some new merged features are required for a specific release version :) | {
"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/37812/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37812/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/37811 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37811/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37811/comments | https://api.github.com/repos/huggingface/transformers/issues/37811/events | https://github.com/huggingface/transformers/issues/37811 | 3,022,802,708 | I_kwDOCUB6oc60LE8U | 37,811 | ValueError: size must contain 'shortest_edge' and 'longest_edge' keys. | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"repos_url": "https://api.github.com/users/ghost/repos",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"received_events_url": "https://api.github.com/users/ghost/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-04-27T05:58:08 | 2025-06-04T08:02:28 | 2025-06-04T08:02:28 | NONE | null | null | null | null | ### System Info
transformer 4.51.3
python 3.12
### Who can help?
@amyeroberts
### Information
- [x] The official example scripts
- [ ] My own modified scripts
### Tasks
- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
https://huggingface.co/Ertugrul/Qwen2-VL-7B-Captioner-Relaxed
code:
from PIL import Image
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
from transformers import BitsAndBytesConfig
import torch
model_id = "Ertugrul/Qwen2-VL-7B-Captioner-Relaxed"
model = Qwen2VLForConditionalGeneration.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)
conversation = [
{
"role": "user",
"content": [
{
"type": "image",
},
{"type": "text", "text": "Describe this image."},
],
}
]
image = Image.open(r"PATH_TO_YOUR_IMAGE")
# you can resize the image here if it's not fitting to vram, or set model max sizes.
# image = image.resize((1024, 1024)) # like this
text_prompt = processor.apply_chat_template(conversation, add_generation_prompt=True)
inputs = processor(
text=[text_prompt], images=[image], padding=True, return_tensors="pt"
)
inputs = inputs.to("cuda")
with torch.no_grad():
with torch.autocast(device_type="cuda", dtype=torch.bfloat16):
output_ids = model.generate(**inputs, max_new_tokens=384, do_sample=True, temperature=0.7, use_cache=True, top_k=50)
generated_ids = [
output_ids[len(input_ids) :]
for input_ids, output_ids in zip(inputs.input_ids, output_ids)
]
output_text = processor.batch_decode(
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=True
)[0]
print(output_text)
fail log:
File "/usr/local/lib/python3.12/dist-packages/transformers/models/qwen2_vl/image_processing_qwen2_vl.py", line 145, in __init__
raise ValueError("size must contain 'shortest_edge' and 'longest_edge' keys.")
ValueError: size must contain 'shortest_edge' and 'longest_edge' keys.
fail result:
There are compatibility issues in the changes of this piece of code in the latest version of the transformer. It fails to be compatible with the situation where the keys of "shortest_edge" and "longest_edge" do not exist in the configuration of the model like Qwen2-VL-7B-Captioner-Relaxed, and it directly reports an error. The specific error report is in this piece of code. I think it should be made compatible with the old version size first.
if size is not None and ("shortest_edge" not in size or "longest_edge" not in size):
raise ValueError("size must contain 'shortest_edge' and 'longest_edge' keys.")
else:
size = {"shortest_edge": 56 * 56, "longest_edge": 28 * 28 * 1280}
# backward compatibility: override size with min_pixels and max_pixels if they are provided
### Expected behavior
pass | {
"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/37811/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37811/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/37810 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37810/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37810/comments | https://api.github.com/repos/huggingface/transformers/issues/37810/events | https://github.com/huggingface/transformers/pull/37810 | 3,022,782,477 | PR_kwDOCUB6oc6UDlr0 | 37,810 | qwen null pointer check. | {
"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-04-27T05:28:40 | 2025-08-27T11:31:27 | 2025-08-27T11:31:27 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37810",
"html_url": "https://github.com/huggingface/transformers/pull/37810",
"diff_url": "https://github.com/huggingface/transformers/pull/37810.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37810.patch",
"merged_at": null
} | null | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37810/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37810/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37809 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37809/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37809/comments | https://api.github.com/repos/huggingface/transformers/issues/37809/events | https://github.com/huggingface/transformers/pull/37809 | 3,022,748,078 | PR_kwDOCUB6oc6UDd3l | 37,809 | Update ruff to 0.13.1 + target Python 3.10 + apply fixes | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-27T05:02:44 | 2025-09-24T07:07:43 | 2025-09-24T06:37:21 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37809",
"html_url": "https://github.com/huggingface/transformers/pull/37809",
"diff_url": "https://github.com/huggingface/transformers/pull/37809.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37809.patch",
"merged_at": "2025-09-24T06:37:21"
} | # What does this PR do?
Use ruff 0.13.0 and apply fixes. | {
"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/37809/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37809/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37808 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37808/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37808/comments | https://api.github.com/repos/huggingface/transformers/issues/37808/events | https://github.com/huggingface/transformers/pull/37808 | 3,022,733,840 | PR_kwDOCUB6oc6UDaqN | 37,808 | Add Optional to remaining types | {
"login": "cyyever",
"id": 17618148,
"node_id": "MDQ6VXNlcjE3NjE4MTQ4",
"avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cyyever",
"html_url": "https://github.com/cyyever",
"followers_url": "https://api.github.com/users/cyyever/followers",
"following_url": "https://api.github.com/users/cyyever/following{/other_user}",
"gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cyyever/subscriptions",
"organizations_url": "https://api.github.com/users/cyyever/orgs",
"repos_url": "https://api.github.com/users/cyyever/repos",
"events_url": "https://api.github.com/users/cyyever/events{/privacy}",
"received_events_url": "https://api.github.com/users/cyyever/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-27T04:50:36 | 2025-04-28T13:41:35 | 2025-04-28T13:20:45 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37808",
"html_url": "https://github.com/huggingface/transformers/pull/37808",
"diff_url": "https://github.com/huggingface/transformers/pull/37808.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37808.patch",
"merged_at": "2025-04-28T13:20:45"
} | # What does this PR do?
While there is debate about enabling the related RUFF rules, the changes can be applied first.
| {
"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/37808/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37808/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37807 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37807/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37807/comments | https://api.github.com/repos/huggingface/transformers/issues/37807/events | https://github.com/huggingface/transformers/issues/37807 | 3,022,489,658 | I_kwDOCUB6oc60J4g6 | 37,807 | Why does "is_causal = query.shape[2] > 1 and causal_mask is None"? | {
"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-04-27T00:09:50 | 2025-04-27T04:57:05 | 2025-04-27T04:57:04 | CONTRIBUTOR | null | null | null | null | Trying to understand this [line](https://github.com/huggingface/transformers/blob/main/src/transformers/integrations/sdpa_attention.py#L47):
Why does "is_causal = query.shape[2] > 1 and causal_mask is None"? Does it mean that `is_causal` `true` if there is no causal mask? I tend to think the opposite?
Thank you for the help. | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37807/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37807/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/37806 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37806/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37806/comments | https://api.github.com/repos/huggingface/transformers/issues/37806/events | https://github.com/huggingface/transformers/pull/37806 | 3,022,083,382 | PR_kwDOCUB6oc6UBSl9 | 37,806 | Translating model_doc/bert.md to Chinese | {
"login": "Nanji-Huaji",
"id": 63086636,
"node_id": "MDQ6VXNlcjYzMDg2NjM2",
"avatar_url": "https://avatars.githubusercontent.com/u/63086636?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Nanji-Huaji",
"html_url": "https://github.com/Nanji-Huaji",
"followers_url": "https://api.github.com/users/Nanji-Huaji/followers",
"following_url": "https://api.github.com/users/Nanji-Huaji/following{/other_user}",
"gists_url": "https://api.github.com/users/Nanji-Huaji/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Nanji-Huaji/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Nanji-Huaji/subscriptions",
"organizations_url": "https://api.github.com/users/Nanji-Huaji/orgs",
"repos_url": "https://api.github.com/users/Nanji-Huaji/repos",
"events_url": "https://api.github.com/users/Nanji-Huaji/events{/privacy}",
"received_events_url": "https://api.github.com/users/Nanji-Huaji/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-26T16:13:57 | 2025-05-19T17:14:58 | 2025-05-19T17:14:57 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37806",
"html_url": "https://github.com/huggingface/transformers/pull/37806",
"diff_url": "https://github.com/huggingface/transformers/pull/37806.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37806.patch",
"merged_at": "2025-05-19T17:14:57"
} | # 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 #(https://github.com/huggingface/transformers/issues/37705)
I have translated `model_doc/bert.md` to Chinese. Please let me know if there are any corrections. Thank you!
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?
## Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
<!-- 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/37806/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/37806/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37805 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37805/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37805/comments | https://api.github.com/repos/huggingface/transformers/issues/37805/events | https://github.com/huggingface/transformers/issues/37805 | 3,021,999,963 | I_kwDOCUB6oc60IA9b | 37,805 | AutomaticMaskGeneration does not work with batch_size greater than 1 | {
"login": "MSt-10",
"id": 46164444,
"node_id": "MDQ6VXNlcjQ2MTY0NDQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/46164444?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/MSt-10",
"html_url": "https://github.com/MSt-10",
"followers_url": "https://api.github.com/users/MSt-10/followers",
"following_url": "https://api.github.com/users/MSt-10/following{/other_user}",
"gists_url": "https://api.github.com/users/MSt-10/gists{/gist_id}",
"starred_url": "https://api.github.com/users/MSt-10/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MSt-10/subscriptions",
"organizations_url": "https://api.github.com/users/MSt-10/orgs",
"repos_url": "https://api.github.com/users/MSt-10/repos",
"events_url": "https://api.github.com/users/MSt-10/events{/privacy}",
"received_events_url": "https://api.github.com/users/MSt-10/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-04-26T14:59:38 | 2025-06-04T08:02:30 | 2025-06-04T08:02:30 | CONTRIBUTOR | null | null | null | null | ### System Info
- `transformers` version: 4.50.0.dev0
- Platform: Linux-5.8.0-63-generic-x86_64-with-glibc2.31
- Python version: 3.11.10
- Huggingface_hub version: 0.29.1
- Safetensors version: 0.5.3
- Accelerate version: 1.4.0
- Accelerate config: - compute_environment: LOCAL_MACHINE
- distributed_type: NO
- mixed_precision: bf16
- use_cpu: False
- debug: False
- num_processes: 1
- machine_rank: 0
- num_machines: 1
- gpu_ids: 0
- rdzv_backend: static
- same_network: True
- main_training_function: main
- enable_cpu_affinity: False
- downcast_bf16: no
- tpu_use_cluster: False
- tpu_use_sudo: False
- tpu_env: []
- DeepSpeed version: not installed
- 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?: no
- Using GPU in script?: yes
- GPU type: NVIDIA RTX 6000 Ada Generation
### Who can help?
@qubvel
### 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 trying to parallelize the MaskGenerationPipeline. First I want to perform the inference batched, then potentially using multiple GPUs.
Based on the official example of SAM (https://huggingface.co/facebook/sam-vit-huge) and the batched inference documentation (https://huggingface.co/docs/transformers/en/pipeline_tutorial#batch-inference), I created this test script:
```python
from transformers import pipeline
generator = pipeline("mask-generation", device=0, points_per_batch=256)
image_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png"
outputs = generator([image_url, image_url], points_per_batch=256, batch_size=2)
```
This results in the following exception:
```
Traceback (most recent call last):
File "parallel_inference.py", line 92, in <module>
work()
File "parallel_inference.py", line 17, in work
outputs = generator([image_url, image_url], points_per_batch=256, batch_size=2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/pipelines/mask_generation.py", line 166, in __call__
return super().__call__(image, *args, num_workers=num_workers, batch_size=batch_size, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/pipelines/base.py", line 1349, in __call__
outputs = list(final_iterator)
^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/pipelines/pt_utils.py", line 125, in __next__
processed = self.infer(item, **self.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/pipelines/mask_generation.py", line 271, in postprocess
output_masks, iou_scores, rle_mask, bounding_boxes = self.image_processor.post_process_for_mask_generation(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/models/sam/image_processing_sam.py", line 737, in post_process_for_mask_generation
return _postprocess_for_mg(all_masks, all_scores, all_boxes, crops_nms_thresh)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/models/sam/image_processing_sam.py", line 1458, in _postprocess_for_mg
masks = [_rle_to_mask(rle) for rle in rle_masks]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/models/sam/image_processing_sam.py", line 1458, in <listcomp>
masks = [_rle_to_mask(rle) for rle in rle_masks]
^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.11/site-packages/transformers/models/sam/image_processing_sam.py", line 1422, in _rle_to_mask
height, width = rle["size"]
~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'
```
I also tried to get parallel or distributed inference to work by using accelerate (https://huggingface.co/docs/diffusers/main/en/training/distributed_inference) but this also doesn't work with the MaskGenerationPipeline since no `.to(device)` method exists.
### Expected behavior
I expect the parameter `batch_size` to work and (hopefully) increased performance by performing batched interference. Furthermore, being able to use accelerate to distribute the interference on multiple devices would be advantageous. | {
"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/37805/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37805/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/37804 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37804/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37804/comments | https://api.github.com/repos/huggingface/transformers/issues/37804/events | https://github.com/huggingface/transformers/pull/37804 | 3,021,874,704 | PR_kwDOCUB6oc6UAogY | 37,804 | Superpoint fast image processor | {
"login": "arkhamHack",
"id": 72064090,
"node_id": "MDQ6VXNlcjcyMDY0MDkw",
"avatar_url": "https://avatars.githubusercontent.com/u/72064090?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arkhamHack",
"html_url": "https://github.com/arkhamHack",
"followers_url": "https://api.github.com/users/arkhamHack/followers",
"following_url": "https://api.github.com/users/arkhamHack/following{/other_user}",
"gists_url": "https://api.github.com/users/arkhamHack/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arkhamHack/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arkhamHack/subscriptions",
"organizations_url": "https://api.github.com/users/arkhamHack/orgs",
"repos_url": "https://api.github.com/users/arkhamHack/repos",
"events_url": "https://api.github.com/users/arkhamHack/events{/privacy}",
"received_events_url": "https://api.github.com/users/arkhamHack/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-26T13:30:21 | 2025-07-28T18:15:07 | 2025-07-28T18:15:07 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37804",
"html_url": "https://github.com/huggingface/transformers/pull/37804",
"diff_url": "https://github.com/huggingface/transformers/pull/37804.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37804.patch",
"merged_at": "2025-07-28T18:15:07"
} | # 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 #36978
## 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/37804/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/37804/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37803 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37803/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37803/comments | https://api.github.com/repos/huggingface/transformers/issues/37803/events | https://github.com/huggingface/transformers/pull/37803 | 3,021,548,981 | PR_kwDOCUB6oc6T_j7O | 37,803 | [doc] fix the code examples in qwen doc | {
"login": "jiangyukunok",
"id": 7341895,
"node_id": "MDQ6VXNlcjczNDE4OTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/7341895?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jiangyukunok",
"html_url": "https://github.com/jiangyukunok",
"followers_url": "https://api.github.com/users/jiangyukunok/followers",
"following_url": "https://api.github.com/users/jiangyukunok/following{/other_user}",
"gists_url": "https://api.github.com/users/jiangyukunok/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jiangyukunok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jiangyukunok/subscriptions",
"organizations_url": "https://api.github.com/users/jiangyukunok/orgs",
"repos_url": "https://api.github.com/users/jiangyukunok/repos",
"events_url": "https://api.github.com/users/jiangyukunok/events{/privacy}",
"received_events_url": "https://api.github.com/users/jiangyukunok/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-26T06:22:48 | 2025-04-28T10:56:32 | 2025-04-28T10:56:32 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37803",
"html_url": "https://github.com/huggingface/transformers/pull/37803",
"diff_url": "https://github.com/huggingface/transformers/pull/37803.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37803.patch",
"merged_at": "2025-04-28T10:56:32"
} | # What does this PR do?
This PR fixes the incorrect variable names of code examples in Qwen model's doc.
<!--
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.
-->
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?
## Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
<!-- 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/37803/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37803/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37802 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37802/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37802/comments | https://api.github.com/repos/huggingface/transformers/issues/37802/events | https://github.com/huggingface/transformers/pull/37802 | 3,021,505,278 | PR_kwDOCUB6oc6T_aw2 | 37,802 | Support `AOPerModuleConfig` and `include_embedding` | {
"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-04-26T05:18:26 | 2025-04-30T18:16:29 | 2025-04-30T18:16:29 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37802",
"html_url": "https://github.com/huggingface/transformers/pull/37802",
"diff_url": "https://github.com/huggingface/transformers/pull/37802.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37802.patch",
"merged_at": "2025-04-30T18:16:29"
} | Summary:
This PR adds support per module configuration for torchao Also added per module quantization examples:
1. Quantizing different layers with different quantization configs
2. Skip quantization for certain layers
Test Plan:
python tests/quantization/torchao_integration/test_torchao.py -k test_include_embedding python tests/quantization/torchao_integration/test_torchao.py -k test_per_module_config_skip
Reviewers:
Subscribers:
Tasks:
Tags:
| {
"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/37802/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37802/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37801 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37801/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37801/comments | https://api.github.com/repos/huggingface/transformers/issues/37801/events | https://github.com/huggingface/transformers/pull/37801 | 3,021,411,759 | PR_kwDOCUB6oc6T_HIR | 37,801 | Fix: Correct tensor shape comment in Mamba modeling | {
"login": "ShadyPi",
"id": 125235534,
"node_id": "U_kgDOB3bxTg",
"avatar_url": "https://avatars.githubusercontent.com/u/125235534?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ShadyPi",
"html_url": "https://github.com/ShadyPi",
"followers_url": "https://api.github.com/users/ShadyPi/followers",
"following_url": "https://api.github.com/users/ShadyPi/following{/other_user}",
"gists_url": "https://api.github.com/users/ShadyPi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ShadyPi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ShadyPi/subscriptions",
"organizations_url": "https://api.github.com/users/ShadyPi/orgs",
"repos_url": "https://api.github.com/users/ShadyPi/repos",
"events_url": "https://api.github.com/users/ShadyPi/events{/privacy}",
"received_events_url": "https://api.github.com/users/ShadyPi/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-26T02:58:04 | 2025-04-28T16:06:16 | 2025-04-28T10:56:42 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37801",
"html_url": "https://github.com/huggingface/transformers/pull/37801",
"diff_url": "https://github.com/huggingface/transformers/pull/37801.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37801.patch",
"merged_at": "2025-04-28T10:56:42"
} | # What does this PR do?
Correct a wrong tensor shape comment in Mamba modeling.
Fixes # (None, as no issue was explicitly mentioned)
The comment on line 307 of `src/transformers/models/mamba/modeling_mamba.py` incorrectly states the shape of the tensor `scan_output`. It should be `[batch, intermediade_size, seq_len]` instead of `[batch, seq_len, intermediade_size]`.
`scan_outputs` is a list of `seq_len` `[batch, intermediade_size]` tensors. When stack them on dimension `-1`, the correct shape should be `[batch, intermediade_size, seq_len]`.
## 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? (Not applicable for a comment correction)
## 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 @alxndrTL | {
"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/37801/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37801/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37800 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37800/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37800/comments | https://api.github.com/repos/huggingface/transformers/issues/37800/events | https://github.com/huggingface/transformers/issues/37800 | 3,021,407,812 | I_kwDOCUB6oc60FwZE | 37,800 | link is a 404 page | {
"login": "co63oc",
"id": 4617245,
"node_id": "MDQ6VXNlcjQ2MTcyNDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4617245?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/co63oc",
"html_url": "https://github.com/co63oc",
"followers_url": "https://api.github.com/users/co63oc/followers",
"following_url": "https://api.github.com/users/co63oc/following{/other_user}",
"gists_url": "https://api.github.com/users/co63oc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/co63oc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/co63oc/subscriptions",
"organizations_url": "https://api.github.com/users/co63oc/orgs",
"repos_url": "https://api.github.com/users/co63oc/repos",
"events_url": "https://api.github.com/users/co63oc/events{/privacy}",
"received_events_url": "https://api.github.com/users/co63oc/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-04-26T02:52:35 | 2025-04-28T11:19:26 | 2025-04-28T11:19:26 | CONTRIBUTOR | null | null | null | null | ### System Info
- `transformers` version: 4.52.0.dev0
- Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.0
- Huggingface_hub version: 0.30.2
- Safetensors version: 0.5.3
- Accelerate version: 1.5.2
### Who can help?
### 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
https://github.com/huggingface/transformers/blob/main/src/transformers/models/rt_detr/configuration_rt_detr.py
 The link is a 404 page.

### Expected behavior
none | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37800/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37800/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/37799 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37799/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37799/comments | https://api.github.com/repos/huggingface/transformers/issues/37799/events | https://github.com/huggingface/transformers/pull/37799 | 3,021,305,326 | PR_kwDOCUB6oc6T-v40 | 37,799 | Fix typos in strings and comments | {
"login": "co63oc",
"id": 4617245,
"node_id": "MDQ6VXNlcjQ2MTcyNDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4617245?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/co63oc",
"html_url": "https://github.com/co63oc",
"followers_url": "https://api.github.com/users/co63oc/followers",
"following_url": "https://api.github.com/users/co63oc/following{/other_user}",
"gists_url": "https://api.github.com/users/co63oc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/co63oc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/co63oc/subscriptions",
"organizations_url": "https://api.github.com/users/co63oc/orgs",
"repos_url": "https://api.github.com/users/co63oc/repos",
"events_url": "https://api.github.com/users/co63oc/events{/privacy}",
"received_events_url": "https://api.github.com/users/co63oc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-26T01:01:53 | 2025-04-30T00:53:16 | 2025-04-28T10:39:12 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37799",
"html_url": "https://github.com/huggingface/transformers/pull/37799",
"diff_url": "https://github.com/huggingface/transformers/pull/37799.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37799.patch",
"merged_at": "2025-04-28T10:39:12"
} | # What does this PR do?
Fix typos in strings and comments found by codespell.
<!--
Congratulations! You've made it this far! You're not quite done yet though.
Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.
Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.
Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] 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/37799/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37799/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37798 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37798/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37798/comments | https://api.github.com/repos/huggingface/transformers/issues/37798/events | https://github.com/huggingface/transformers/pull/37798 | 3,021,241,150 | PR_kwDOCUB6oc6T-iJI | 37,798 | Update configuration_rt_detr.py | {
"login": "co63oc",
"id": 4617245,
"node_id": "MDQ6VXNlcjQ2MTcyNDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4617245?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/co63oc",
"html_url": "https://github.com/co63oc",
"followers_url": "https://api.github.com/users/co63oc/followers",
"following_url": "https://api.github.com/users/co63oc/following{/other_user}",
"gists_url": "https://api.github.com/users/co63oc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/co63oc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/co63oc/subscriptions",
"organizations_url": "https://api.github.com/users/co63oc/orgs",
"repos_url": "https://api.github.com/users/co63oc/repos",
"events_url": "https://api.github.com/users/co63oc/events{/privacy}",
"received_events_url": "https://api.github.com/users/co63oc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T23:48:16 | 2025-04-30T00:53:17 | 2025-04-26T02:54:51 | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37798",
"html_url": "https://github.com/huggingface/transformers/pull/37798",
"diff_url": "https://github.com/huggingface/transformers/pull/37798.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37798.patch",
"merged_at": null
} | # What does this PR do?
https://huggingface.co/checkpoing/todo is a 404 page. I do not known how to change it, just remove the link. If also remove "[checkpoing/todo]", the CI will encounter errors.

<!--
Congratulations! You've made it this far! You're not quite done yet though.
Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.
Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.
Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] 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": "co63oc",
"id": 4617245,
"node_id": "MDQ6VXNlcjQ2MTcyNDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4617245?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/co63oc",
"html_url": "https://github.com/co63oc",
"followers_url": "https://api.github.com/users/co63oc/followers",
"following_url": "https://api.github.com/users/co63oc/following{/other_user}",
"gists_url": "https://api.github.com/users/co63oc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/co63oc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/co63oc/subscriptions",
"organizations_url": "https://api.github.com/users/co63oc/orgs",
"repos_url": "https://api.github.com/users/co63oc/repos",
"events_url": "https://api.github.com/users/co63oc/events{/privacy}",
"received_events_url": "https://api.github.com/users/co63oc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37798/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37798/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37797 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37797/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37797/comments | https://api.github.com/repos/huggingface/transformers/issues/37797/events | https://github.com/huggingface/transformers/pull/37797 | 3,020,648,453 | PR_kwDOCUB6oc6T8iPB | 37,797 | feat: Add support for HindiCausalLM (convaiinnovations/hindi-foundational-model-base) | {
"login": "NandhaKishorM",
"id": 48623612,
"node_id": "MDQ6VXNlcjQ4NjIzNjEy",
"avatar_url": "https://avatars.githubusercontent.com/u/48623612?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NandhaKishorM",
"html_url": "https://github.com/NandhaKishorM",
"followers_url": "https://api.github.com/users/NandhaKishorM/followers",
"following_url": "https://api.github.com/users/NandhaKishorM/following{/other_user}",
"gists_url": "https://api.github.com/users/NandhaKishorM/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NandhaKishorM/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NandhaKishorM/subscriptions",
"organizations_url": "https://api.github.com/users/NandhaKishorM/orgs",
"repos_url": "https://api.github.com/users/NandhaKishorM/repos",
"events_url": "https://api.github.com/users/NandhaKishorM/events{/privacy}",
"received_events_url": "https://api.github.com/users/NandhaKishorM/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T17:36:34 | 2025-04-28T17:38:04 | 2025-04-28T17:38:04 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37797",
"html_url": "https://github.com/huggingface/transformers/pull/37797",
"diff_url": "https://github.com/huggingface/transformers/pull/37797.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37797.patch",
"merged_at": null
} | # What does this PR do?
This PR integrates the Hindi Causal Language Model developed by ConvAI Innovations (`convaiinnovations/hindi-foundational-model-base`) into the Hugging Face `transformers` library.
This allows users to easily load and use this publicly available Hindi language model using the standard `transformers` API, such as `AutoModelForCausalLM.from_pretrained(...)` and `AutoTokenizer.from_pretrained(...)`.
The PR includes:
* `HindiCausalLMConfig`: The configuration class.
* `HindiCausalLMTokenizer`: A `PreTrainedTokenizer` wrapper for the SentencePiece model used.
* `HindiCausalLMHeadModel`: The main modeling class, adapted to match the original checkpoint's architecture for weight compatibility.
* Registrations within the library's `AutoClass` framework (`AutoConfig`, `AutoTokenizer`, `AutoModelForCausalLM`).
* A documentation page for the model.
<!-- Remove if not applicable -->
Fixes # (issue) *(<- Add GitHub issue number here if this PR addresses one, otherwise remove this line)*
## Motivation and Context
The `convaiinnovations/hindi-foundational-model-base` checkpoint provides a valuable resource for Hindi NLP tasks. However, it was originally released with custom script code (`hindi_language_model.py` included in the repo) rather than standard `transformers` model classes. Loading these weights directly with standard `transformers` classes or even initial custom attempts resulted in errors due to architectural mismatches (layer names, prefixes, normalization types, activation functions, etc.).
This PR provides the necessary "shim" code, carefully adapted from the original script, to bridge this gap. The modeling code structure, layer names, and specific implementation details (like Post-LN and GELU activation) have been designed to **exactly match the original script's implementation**, ensuring that the publicly available weights can be loaded correctly.
## Key Implementation Details & Considerations
* **Weight Compatibility & Architecture:** The modeling code (`modeling_hindi_causal_lm.py`) implements a **flattened structure** (no separate base model class), uses **Post-Layer Normalization**, employs a **hardcoded GELU activation** in the Feed-Forward Networks, and uses standard **learned positional embeddings**. This specific architecture is required to match the structure used when the original `model.safetensors` weights were saved, resolving state dictionary mismatches encountered during debugging.
* **Configuration Discrepancy:** The `config.json` currently available on the Hub repository for `convaiinnovations/hindi-foundational-model-base` specifies parameters like `hidden_act: "silu"`, `normalization_layer: "rmsnorm"`, and `positional_encoding_type: "rope"`. These **do not match** the actual implemented architecture (GELU, LayerNorm, Absolute/Learned Embeddings) reflected in this PR's modeling code (which is necessary to load the weights). Users loading the model should be aware that the *implemented* structure takes precedence. Ideally, the `config.json` on the Hub should be updated by the model authors to accurately reflect the trained architecture. For now, loading scripts may benefit from locally overriding the config object after loading but before model instantiation, as was done during debugging.
* **Tokenizer Class Name Discrepancy:** The `tokenizer_config.json` on the Hub specifies `"tokenizer_class": "SentencePieceTokenizerWrapper"`. This PR defines and registers the standard name `HindiCausalLMTokenizer`. For seamless `AutoTokenizer` loading without `trust_remote_code=True`, the `tokenizer_config.json` on the Hub should ideally be updated to use `"tokenizer_class": "HindiCausalLMTokenizer"`. Current loading via `AutoTokenizer` requires `trust_remote_code=True` or direct instantiation using `HindiCausalLMTokenizer.from_pretrained(...)`.
## Files Added/Modified
* Added `src/transformers/models/hindi_causal_lm/configuration_hindi_causal_lm.py`
* Added `src/transformers/models/hindi_causal_lm/modeling_hindi_causal_lm.py`
* Added `src/transformers/models/hindi_causal_lm/tokenization_hindi_causal_lm.py`
* Added `src/transformers/models/hindi_causal_lm/__init__.py`
* Updated `src/transformers/models/auto/configuration_auto.py`
* Updated `src/transformers/models/auto/modeling_auto.py`
* Updated `src/transformers/models/auto/tokenization_auto.py`
* Added `docs/source/en/model_doc/hindi_causal_lm.md`
* *(Potentially)* Added `tests/models/hindi_causal_lm/test_modeling_hindi_causal_lm.py`
* *(Potentially)* Added `tests/models/hindi_causal_lm/test_tokenization_hindi_causal_lm.py`
## 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. *(<- Add link if available)*
- [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). *(Added documentation page)*
- [ ] Did you write any new necessary tests? *(<- **IMPORTANT**: Tests are required for merging. Please add modeling and tokenization 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.
Models: @ArthurZucker
Tokenizers: @ArthurZucker
Community Integration: @Narsil (Optional) | {
"login": "NandhaKishorM",
"id": 48623612,
"node_id": "MDQ6VXNlcjQ4NjIzNjEy",
"avatar_url": "https://avatars.githubusercontent.com/u/48623612?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NandhaKishorM",
"html_url": "https://github.com/NandhaKishorM",
"followers_url": "https://api.github.com/users/NandhaKishorM/followers",
"following_url": "https://api.github.com/users/NandhaKishorM/following{/other_user}",
"gists_url": "https://api.github.com/users/NandhaKishorM/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NandhaKishorM/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NandhaKishorM/subscriptions",
"organizations_url": "https://api.github.com/users/NandhaKishorM/orgs",
"repos_url": "https://api.github.com/users/NandhaKishorM/repos",
"events_url": "https://api.github.com/users/NandhaKishorM/events{/privacy}",
"received_events_url": "https://api.github.com/users/NandhaKishorM/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37797/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/37797/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37796 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37796/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37796/comments | https://api.github.com/repos/huggingface/transformers/issues/37796/events | https://github.com/huggingface/transformers/pull/37796 | 3,020,538,319 | PR_kwDOCUB6oc6T8KK0 | 37,796 | Fix error message in `hub.py` | {
"login": "srai9",
"id": 119854721,
"node_id": "U_kgDOByTWgQ",
"avatar_url": "https://avatars.githubusercontent.com/u/119854721?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/srai9",
"html_url": "https://github.com/srai9",
"followers_url": "https://api.github.com/users/srai9/followers",
"following_url": "https://api.github.com/users/srai9/following{/other_user}",
"gists_url": "https://api.github.com/users/srai9/gists{/gist_id}",
"starred_url": "https://api.github.com/users/srai9/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/srai9/subscriptions",
"organizations_url": "https://api.github.com/users/srai9/orgs",
"repos_url": "https://api.github.com/users/srai9/repos",
"events_url": "https://api.github.com/users/srai9/events{/privacy}",
"received_events_url": "https://api.github.com/users/srai9/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T16:39:27 | 2025-04-25T21:03:07 | 2025-04-25T21:03:07 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37796",
"html_url": "https://github.com/huggingface/transformers/pull/37796",
"diff_url": "https://github.com/huggingface/transformers/pull/37796.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37796.patch",
"merged_at": "2025-04-25T21:03:07"
} | # What does this PR do?
This PR fixes a broken link in an error message in `hub.py`. A space is missing between the link and the following text.
## 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?
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.
@stevhliu @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/37796/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37796/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37795 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37795/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37795/comments | https://api.github.com/repos/huggingface/transformers/issues/37795/events | https://github.com/huggingface/transformers/pull/37795 | 3,020,515,458 | PR_kwDOCUB6oc6T8FJt | 37,795 | fix qwen2.5-omini cant be loaded from AutoModel | {
"login": "liwenju0",
"id": 16049564,
"node_id": "MDQ6VXNlcjE2MDQ5NTY0",
"avatar_url": "https://avatars.githubusercontent.com/u/16049564?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/liwenju0",
"html_url": "https://github.com/liwenju0",
"followers_url": "https://api.github.com/users/liwenju0/followers",
"following_url": "https://api.github.com/users/liwenju0/following{/other_user}",
"gists_url": "https://api.github.com/users/liwenju0/gists{/gist_id}",
"starred_url": "https://api.github.com/users/liwenju0/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liwenju0/subscriptions",
"organizations_url": "https://api.github.com/users/liwenju0/orgs",
"repos_url": "https://api.github.com/users/liwenju0/repos",
"events_url": "https://api.github.com/users/liwenju0/events{/privacy}",
"received_events_url": "https://api.github.com/users/liwenju0/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-04-25T16:28:06 | 2025-06-02T09:25:13 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37795",
"html_url": "https://github.com/huggingface/transformers/pull/37795",
"diff_url": "https://github.com/huggingface/transformers/pull/37795.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37795.patch",
"merged_at": null
} | # What does this PR do?
Fixes # (issue) https://github.com/huggingface/transformers/issues/37794
## 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/37795/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37795/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37794 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37794/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37794/comments | https://api.github.com/repos/huggingface/transformers/issues/37794/events | https://github.com/huggingface/transformers/issues/37794 | 3,020,513,845 | I_kwDOCUB6oc60CWI1 | 37,794 | AutoModel cant load Qwen/Qwen2.5-0mni-7B | {
"login": "liwenju0",
"id": 16049564,
"node_id": "MDQ6VXNlcjE2MDQ5NTY0",
"avatar_url": "https://avatars.githubusercontent.com/u/16049564?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/liwenju0",
"html_url": "https://github.com/liwenju0",
"followers_url": "https://api.github.com/users/liwenju0/followers",
"following_url": "https://api.github.com/users/liwenju0/following{/other_user}",
"gists_url": "https://api.github.com/users/liwenju0/gists{/gist_id}",
"starred_url": "https://api.github.com/users/liwenju0/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liwenju0/subscriptions",
"organizations_url": "https://api.github.com/users/liwenju0/orgs",
"repos_url": "https://api.github.com/users/liwenju0/repos",
"events_url": "https://api.github.com/users/liwenju0/events{/privacy}",
"received_events_url": "https://api.github.com/users/liwenju0/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 2796628563,
"node_id": "MDU6TGFiZWwyNzk2NjI4NTYz",
"url": "https://api.github.com/repos/huggingface/transformers/labels/WIP",
"name": "WIP",
"color": "234C99",
"default": false,
"description": "Label your PR/Issue with WIP for some long outstanding Issues/PRs that are work in progress"
},
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
}
] | open | false | {
"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-04-25T16:27:11 | 2025-05-26T08:23:16 | null | NONE | null | null | null | null | ### System Info
```
from transformers import AutoModel
model = AutoModel.from pretrained("Qwen/Qwen2.5-0mni-7B",torch dtype="auto"trust remote code=True)
```
will raise error:

### 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
```
from transformers import AutoModel
model = AutoModel.from pretrained("Qwen/Qwen2.5-0mni-7B",torch dtype="auto"trust remote code=True)
```
### Expected behavior
load sucessfully | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37794/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37794/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/37793 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37793/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37793/comments | https://api.github.com/repos/huggingface/transformers/issues/37793/events | https://github.com/huggingface/transformers/issues/37793 | 3,020,473,140 | I_kwDOCUB6oc60CMM0 | 37,793 | Llama4 config is not compatible with model initialization | {
"login": "fingertap",
"id": 7274689,
"node_id": "MDQ6VXNlcjcyNzQ2ODk=",
"avatar_url": "https://avatars.githubusercontent.com/u/7274689?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fingertap",
"html_url": "https://github.com/fingertap",
"followers_url": "https://api.github.com/users/fingertap/followers",
"following_url": "https://api.github.com/users/fingertap/following{/other_user}",
"gists_url": "https://api.github.com/users/fingertap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fingertap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fingertap/subscriptions",
"organizations_url": "https://api.github.com/users/fingertap/orgs",
"repos_url": "https://api.github.com/users/fingertap/repos",
"events_url": "https://api.github.com/users/fingertap/events{/privacy}",
"received_events_url": "https://api.github.com/users/fingertap/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-04-25T16:09:44 | 2025-04-28T03:10:36 | 2025-04-28T03:10:34 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.51.3
- Platform: Linux-5.15.0-126-generic-x86_64-with-glibc2.35
- Python version: 3.12.9
- Huggingface_hub version: 0.30.2
- Safetensors version: 0.5.3
- Accelerate version: 1.6.0
- Accelerate config: not found
- DeepSpeed version: not installed
- 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
- Using GPU in script?: Yes
- GPU type: NVIDIA H200
### Who can help?
When initializing the model with:
```python
config = AutoConfig.from_pretrained("/checkpoint/llama4-scout-16e")
model = Llama4ForCausalLM(config)
```
this error occurs
```
AttributeError: 'Llama4Config' object has no attribute 'hidden_size'
```
### Information
- [x] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
```python
config = AutoConfig.from_pretrained("/checkpoint/llama4-scout-16e")
model = Llama4ForCausalLM(config)
```
### Expected behavior
No error reported. | {
"login": "fingertap",
"id": 7274689,
"node_id": "MDQ6VXNlcjcyNzQ2ODk=",
"avatar_url": "https://avatars.githubusercontent.com/u/7274689?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fingertap",
"html_url": "https://github.com/fingertap",
"followers_url": "https://api.github.com/users/fingertap/followers",
"following_url": "https://api.github.com/users/fingertap/following{/other_user}",
"gists_url": "https://api.github.com/users/fingertap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fingertap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fingertap/subscriptions",
"organizations_url": "https://api.github.com/users/fingertap/orgs",
"repos_url": "https://api.github.com/users/fingertap/repos",
"events_url": "https://api.github.com/users/fingertap/events{/privacy}",
"received_events_url": "https://api.github.com/users/fingertap/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37793/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37793/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/37792 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37792/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37792/comments | https://api.github.com/repos/huggingface/transformers/issues/37792/events | https://github.com/huggingface/transformers/pull/37792 | 3,020,429,773 | PR_kwDOCUB6oc6T7yPf | 37,792 | Adding features like Tokenizer evaluation/benchmarking | {
"login": "Dharshinir004",
"id": 174322358,
"node_id": "U_kgDOCmPytg",
"avatar_url": "https://avatars.githubusercontent.com/u/174322358?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Dharshinir004",
"html_url": "https://github.com/Dharshinir004",
"followers_url": "https://api.github.com/users/Dharshinir004/followers",
"following_url": "https://api.github.com/users/Dharshinir004/following{/other_user}",
"gists_url": "https://api.github.com/users/Dharshinir004/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Dharshinir004/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Dharshinir004/subscriptions",
"organizations_url": "https://api.github.com/users/Dharshinir004/orgs",
"repos_url": "https://api.github.com/users/Dharshinir004/repos",
"events_url": "https://api.github.com/users/Dharshinir004/events{/privacy}",
"received_events_url": "https://api.github.com/users/Dharshinir004/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"
}
] | open | false | null | [] | null | [] | 2025-04-25T15:51:45 | 2025-06-02T09:25:01 | null | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37792",
"html_url": "https://github.com/huggingface/transformers/pull/37792",
"diff_url": "https://github.com/huggingface/transformers/pull/37792.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37792.patch",
"merged_at": null
} | null | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37792/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37792/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37791 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37791/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37791/comments | https://api.github.com/repos/huggingface/transformers/issues/37791/events | https://github.com/huggingface/transformers/pull/37791 | 3,020,400,814 | PR_kwDOCUB6oc6T7r9h | 37,791 | Update granite.md | {
"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-04-25T15:37:24 | 2025-05-28T07:03:59 | 2025-05-27T19:55:15 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37791",
"html_url": "https://github.com/huggingface/transformers/pull/37791",
"diff_url": "https://github.com/huggingface/transformers/pull/37791.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37791.patch",
"merged_at": "2025-05-27T19:55:15"
} | # What does this PR do?
#36979,
This PR updates the model-card for the Granite model as described in https://github.com/huggingface/transformers/issues/36979,
## 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.
@stevhliu
<!--
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/37791/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37791/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37790 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37790/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37790/comments | https://api.github.com/repos/huggingface/transformers/issues/37790/events | https://github.com/huggingface/transformers/pull/37790 | 3,020,094,049 | PR_kwDOCUB6oc6T6ozC | 37,790 | Fix tensor parallel with non-floating dtypes | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T13:36:50 | 2025-04-25T13:49:56 | 2025-04-25T13:48:16 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37790",
"html_url": "https://github.com/huggingface/transformers/pull/37790",
"diff_url": "https://github.com/huggingface/transformers/pull/37790.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37790.patch",
"merged_at": "2025-04-25T13:48:16"
} | # What does this PR do?
As per the title. https://github.com/huggingface/transformers/pull/37719 missed one location. Also fixes https://github.com/huggingface/transformers/issues/37765
| {
"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/37790/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37790/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37789 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37789/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37789/comments | https://api.github.com/repos/huggingface/transformers/issues/37789/events | https://github.com/huggingface/transformers/issues/37789 | 3,020,061,999 | I_kwDOCUB6oc60An0v | 37,789 | Whisper chunking algorithm increases WER | {
"login": "asusdisciple",
"id": 138434950,
"node_id": "U_kgDOCEBZhg",
"avatar_url": "https://avatars.githubusercontent.com/u/138434950?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/asusdisciple",
"html_url": "https://github.com/asusdisciple",
"followers_url": "https://api.github.com/users/asusdisciple/followers",
"following_url": "https://api.github.com/users/asusdisciple/following{/other_user}",
"gists_url": "https://api.github.com/users/asusdisciple/gists{/gist_id}",
"starred_url": "https://api.github.com/users/asusdisciple/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asusdisciple/subscriptions",
"organizations_url": "https://api.github.com/users/asusdisciple/orgs",
"repos_url": "https://api.github.com/users/asusdisciple/repos",
"events_url": "https://api.github.com/users/asusdisciple/events{/privacy}",
"received_events_url": "https://api.github.com/users/asusdisciple/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 3817266200,
"node_id": "MDU6TGFiZWwzODE3MjY2MjAw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": null
},
{
"id": 7377881103,
"node_id": "LA_kwDOCUB6oc8AAAABt8GIDw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Whisper",
"name": "Whisper",
"color": "83303E",
"default": false,
"description": ""
}
] | closed | false | null | [] | null | [] | 2025-04-25T13:25:21 | 2025-07-16T08:03:22 | 2025-07-16T08:03:22 | NONE | null | null | null | null | ### System Info
So I made a few experiments with whisper and seamless m4tv2 on the fleurs (concatenated files to 5min samples) dataset. I used the batching functionality by setting `chunk_length_s` to 30s and as is turns out the WER increases by **20%** over all languages compared to long form transcription (sequentially going through each file). Do you have the same behaviour? Is this a bug or expected to happen because of the chunking? 20% seems to be far too much from my point of view.
### 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
Just use the default pipeline implementation of whisper on files which are a few minutes long. Its far worse when chunking is enabled.
### Expected behavior
I would expect the same transcription quality or maybe a few % less but 20% is far from that. | {
"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/37789/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37789/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/37788 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37788/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37788/comments | https://api.github.com/repos/huggingface/transformers/issues/37788/events | https://github.com/huggingface/transformers/pull/37788 | 3,020,033,544 | PR_kwDOCUB6oc6T6boo | 37,788 | Fix donut backtracking | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T13:14:00 | 2025-05-06T16:39:06 | 2025-05-06T16:39:04 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37788",
"html_url": "https://github.com/huggingface/transformers/pull/37788",
"diff_url": "https://github.com/huggingface/transformers/pull/37788.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37788.patch",
"merged_at": "2025-05-06T16:39:04"
} | There's an exploitable regex in the donut processor, this replaces it with less blowup-prone code! | {
"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/37788/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37788/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37787 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37787/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37787/comments | https://api.github.com/repos/huggingface/transformers/issues/37787/events | https://github.com/huggingface/transformers/pull/37787 | 3,019,676,418 | PR_kwDOCUB6oc6T5Nvw | 37,787 | Align gpt2 mask preparation to #37612 | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T10:38:46 | 2025-04-25T10:51:27 | 2025-04-25T10:50:30 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37787",
"html_url": "https://github.com/huggingface/transformers/pull/37787",
"diff_url": "https://github.com/huggingface/transformers/pull/37787.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37787.patch",
"merged_at": "2025-04-25T10:50:30"
} | # What does this PR do?
Align gpt2. This was a race condition in merging order of https://github.com/huggingface/transformers/pull/37612 and https://github.com/huggingface/transformers/pull/35761
It causes the following error https://app.circleci.com/pipelines/github/huggingface/transformers/128019/workflows/ba65aabf-d3a9-4750-b3f6-b264aa3c5bce/jobs/1715832
cc @zucchini-nlp to double-check! | {
"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/37787/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37787/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37786 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37786/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37786/comments | https://api.github.com/repos/huggingface/transformers/issues/37786/events | https://github.com/huggingface/transformers/issues/37786 | 3,019,636,674 | I_kwDOCUB6oc6z-__C | 37,786 | Loading a Pytorch model from a Tensorflow saved model doesn't work | {
"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"
},
{
"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-04-25T10:19:44 | 2025-05-10T11:11:09 | 2025-05-10T11:11:09 | CONTRIBUTOR | null | null | null | null | ### System Info
- `transformers` version: 4.51.3
- Platform: Linux-6.1.123+-x86_64-with-glibc2.35
- Python version: 3.11.12
- Huggingface_hub version: 0.30.2
- Safetensors version: 0.5.3
- Accelerate version: 1.5.2
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (GPU?): 2.6.0+cu124 (True)
- Tensorflow version (GPU?): 2.18.0 (True)
- Flax version (CPU?/GPU?/TPU?): 0.10.5 (gpu)
- Jax version: 0.5.2
- JaxLib version: 0.5.1
- Using distributed or parallel set-up in script?: No
- Using GPU in script?: No
- GPU type: Tesla T4
### Who can help?
@gante and @Rocketknight1
### Information
- [x] The official example scripts
- [ ] My own modified scripts
### Tasks
- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
I got the error from [the Quickstart notebook](https://github.com/huggingface/notebooks/blob/main/transformers_doc/en/quicktour.ipynb).
To make it easier for reproduction, here's the sample script to reproduce the error:
```python
from transformers import TFAutoModelForSequenceClassification
#model_name = "nlptown/bert-base-multilingual-uncased-sentiment"
model_name = "bert-base-cased"
tf_model = TFAutoModelForSequenceClassification.from_pretrained(model_name)
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)
tf_save_directory = "./tf_save_pretrained"
tokenizer.save_pretrained(tf_save_directory)
tf_model.save_pretrained(tf_save_directory)
from transformers import AutoModelForSequenceClassification
pt_model = AutoModelForSequenceClassification.from_pretrained(tf_save_directory, from_tf=True)
```
You would get this error:
```
/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py:2397: UserWarning: for bert.embeddings.word_embeddings.weight: copying from a non-meta parameter in the checkpoint to a meta parameter in the current model, which is a no-op. (Did you mean to pass `assign=True` to assign items in the state dictionary to their corresponding key in the module instead of copying them in place?)
warnings.warn(
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[<ipython-input-7-95e44b6f2430>](https://localhost:8080/#) in <cell line: 0>()
----> 1 pt_model = AutoModelForSequenceClassification.from_pretrained(tf_save_directory, from_tf=True)
8 frames
[/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in load_state_dict(self, state_dict, strict, assign)
2579
2580 if len(error_msgs) > 0:
-> 2581 raise RuntimeError(
2582 "Error(s) in loading state_dict for {}:\n\t{}".format(
2583 self.__class__.__name__, "\n\t".join(error_msgs)
RuntimeError: Error(s) in loading state_dict for BertForSequenceClassification:
size mismatch for bert.embeddings.position_embeddings.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([512, 768]).
size mismatch for bert.embeddings.token_type_embeddings.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([2, 768]).
size mismatch for bert.embeddings.LayerNorm.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
size mismatch for bert.embeddings.LayerNorm.bias: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
size mismatch for bert.encoder.layer.0.attention.self.query.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768, 768]).
size mismatch for bert.encoder.layer.0.attention.self.query.bias: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
size mismatch for bert.encoder.layer.0.attention.self.key.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768, 768]).
size mismatch for bert.encoder.layer.0.attention.self.key.bias: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
...
size mismatch for bert.encoder.layer.11.output.dense.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768, 3072]).
size mismatch for bert.encoder.layer.11.output.dense.bias: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
size mismatch for bert.encoder.layer.11.output.LayerNorm.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
size mismatch for bert.encoder.layer.11.output.LayerNorm.bias: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
size mismatch for bert.pooler.dense.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768, 768]).
size mismatch for bert.pooler.dense.bias: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([768]).
size mismatch for classifier.weight: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([2, 768]).
size mismatch for classifier.bias: copying a param with shape torch.Size([28996, 768]) from checkpoint, the shape in current model is torch.Size([2]).
```
### Expected behavior
I should be able to get the Pytorch model from the Tensorflow saved model.
Loading up the Tensorflow model from the Pytorch saved model **works** (the other way around). | {
"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/37786/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37786/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/37785 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37785/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37785/comments | https://api.github.com/repos/huggingface/transformers/issues/37785/events | https://github.com/huggingface/transformers/pull/37785 | 3,019,633,498 | PR_kwDOCUB6oc6T5EZS | 37,785 | Force torch>=2.6 with torch.load to avoid vulnerability issue | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T10:18:23 | 2025-05-07T12:03:31 | 2025-04-25T14:57:10 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37785",
"html_url": "https://github.com/huggingface/transformers/pull/37785",
"diff_url": "https://github.com/huggingface/transformers/pull/37785.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37785.patch",
"merged_at": "2025-04-25T14:57:10"
} | # What does this PR do?
As per the title, following the vulnerability report received. `torch.load` in unsafe even with `weights_only=True` for any version < 2.6
Whenever we do not have `weights_only=False` explicitly, either from user input or internally, we should raise an Error asking to upgrade torch.
This PR does not update the files in `examples/legacy`, as they are, as their name suggest, legacy examples
cc @SunMarc as well, how restrictive is it from the Trainer point of view?
| {
"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/37785/reactions",
"total_count": 2,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 2,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37785/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37784 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37784/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37784/comments | https://api.github.com/repos/huggingface/transformers/issues/37784/events | https://github.com/huggingface/transformers/pull/37784 | 3,019,353,127 | PR_kwDOCUB6oc6T4HuY | 37,784 | Fix typos in strings and comments | {
"login": "co63oc",
"id": 4617245,
"node_id": "MDQ6VXNlcjQ2MTcyNDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4617245?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/co63oc",
"html_url": "https://github.com/co63oc",
"followers_url": "https://api.github.com/users/co63oc/followers",
"following_url": "https://api.github.com/users/co63oc/following{/other_user}",
"gists_url": "https://api.github.com/users/co63oc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/co63oc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/co63oc/subscriptions",
"organizations_url": "https://api.github.com/users/co63oc/orgs",
"repos_url": "https://api.github.com/users/co63oc/repos",
"events_url": "https://api.github.com/users/co63oc/events{/privacy}",
"received_events_url": "https://api.github.com/users/co63oc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T08:23:58 | 2025-04-30T00:53:18 | 2025-04-25T12:47:25 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37784",
"html_url": "https://github.com/huggingface/transformers/pull/37784",
"diff_url": "https://github.com/huggingface/transformers/pull/37784.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37784.patch",
"merged_at": "2025-04-25T12:47:25"
} | # What does this PR do?
Fix typos in strings and comments found by codespell.
<!--
Congratulations! You've made it this far! You're not quite done yet though.
Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.
Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.
Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] 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/37784/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37784/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37783 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37783/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37783/comments | https://api.github.com/repos/huggingface/transformers/issues/37783/events | https://github.com/huggingface/transformers/pull/37783 | 3,019,284,747 | PR_kwDOCUB6oc6T35AE | 37,783 | fix total updates in epoch | {
"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-04-25T07:53:35 | 2025-05-02T11:19:57 | 2025-05-02T11:19:57 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37783",
"html_url": "https://github.com/huggingface/transformers/pull/37783",
"diff_url": "https://github.com/huggingface/transformers/pull/37783.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37783.patch",
"merged_at": null
} | # What does this PR do?
described in #37777
fix errors in #34198
<!--
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 #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?
@ArthurZucker @muellerzr @SunMarc
<!-- 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": "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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37783/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37783/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37782 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37782/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37782/comments | https://api.github.com/repos/huggingface/transformers/issues/37782/events | https://github.com/huggingface/transformers/pull/37782 | 3,019,270,079 | PR_kwDOCUB6oc6T313V | 37,782 | Fix error of HPU TP | {
"login": "yuanwu2017",
"id": 34643241,
"node_id": "MDQ6VXNlcjM0NjQzMjQx",
"avatar_url": "https://avatars.githubusercontent.com/u/34643241?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yuanwu2017",
"html_url": "https://github.com/yuanwu2017",
"followers_url": "https://api.github.com/users/yuanwu2017/followers",
"following_url": "https://api.github.com/users/yuanwu2017/following{/other_user}",
"gists_url": "https://api.github.com/users/yuanwu2017/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yuanwu2017/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yuanwu2017/subscriptions",
"organizations_url": "https://api.github.com/users/yuanwu2017/orgs",
"repos_url": "https://api.github.com/users/yuanwu2017/repos",
"events_url": "https://api.github.com/users/yuanwu2017/events{/privacy}",
"received_events_url": "https://api.github.com/users/yuanwu2017/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-25T07:46:37 | 2025-04-28T13:47:17 | 2025-04-28T13:47:17 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37782",
"html_url": "https://github.com/huggingface/transformers/pull/37782",
"diff_url": "https://github.com/huggingface/transformers/pull/37782.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37782.patch",
"merged_at": "2025-04-28T13:47: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 # (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": "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/37782/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37782/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37781 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37781/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37781/comments | https://api.github.com/repos/huggingface/transformers/issues/37781/events | https://github.com/huggingface/transformers/pull/37781 | 3,019,255,385 | PR_kwDOCUB6oc6T3ys- | 37,781 | assign the correct torchao data layout for xpu | {
"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-04-25T07:39:44 | 2025-07-02T05:22:27 | 2025-05-21T15:21:55 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37781",
"html_url": "https://github.com/huggingface/transformers/pull/37781",
"diff_url": "https://github.com/huggingface/transformers/pull/37781.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37781.patch",
"merged_at": "2025-05-21T15:21:55"
} | Hi @Rocketknight1 @ArthurZucker . Same as CPU, the XPU requires a specific data layout to make torchao work. Please review this PR. Thanks! | {
"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/37781/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 1,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37781/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37780 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37780/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37780/comments | https://api.github.com/repos/huggingface/transformers/issues/37780/events | https://github.com/huggingface/transformers/issues/37780 | 3,019,254,097 | I_kwDOCUB6oc6z9ilR | 37,780 | Support multimodal models in vLLM with transformers backend | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [
{
"id": 1834083927,
"node_id": "MDU6TGFiZWwxODM0MDgzOTI3",
"url": "https://api.github.com/repos/huggingface/transformers/labels/External",
"name": "External",
"color": "fbca04",
"default": false,
"description": "Using the library with external tools (onnx, tflite, ...)"
},
{
"id": 7940548572,
"node_id": "LA_kwDOCUB6oc8AAAAB2Usn3A",
"url": "https://api.github.com/repos/huggingface/transformers/labels/VLM",
"name": "VLM",
"color": "4519DA",
"default": false,
"description": ""
}
] | 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-04-25T07:39:06 | 2025-06-06T08:04:17 | 2025-06-06T08:04:16 | MEMBER | null | null | null | null | This is a tracker issue since there are now too many PRs here and there, all making some sort of standardization to help vLLM support vision LLMs.
What we need is:
- [x] Identical naming for special multimodal tokens, same way as we have `config.pad_token_id` (https://github.com/huggingface/transformers/pull/37573)
- [x] Add base model and nudge new models to follow LLM-like format. In other words, a base model holds everything without head and the `ConditionalGeneration` holds "base model + head" (https://github.com/huggingface/transformers/pull/37033)
- [ ] Helper fn to obtain multimodal embeddings from the base model because each model has its own pre/post projection layers on top (https://github.com/huggingface/transformers/pull/37743)
- [x] Clean up qwen models which are completely different from existing VLMs in structure (https://github.com/huggingface/transformers/pull/37268) and hopefully after all done it will be okay. Needs verification
- [X] Support attention backends for all models by using new attn interface and correctly propagating `kwargs` . BTW, we also need to use `self.loss_fn` after this PR, to fix issues in Trainer with grad accum. But that is not vLLM related and comes in subsequent PR (https://github.com/huggingface/transformers/pull/37576)
- [ ] Processors need helpers to calculate `num_multimodal_tokens` given input image sizes and to return `mm_token_type_ids` (https://github.com/huggingface/transformers/pull/37915)
- [ ] All vision backbones should return `embeds` of shape `(bs, ...., dim)`. I found Pixtral doesn't do so, and will need to go over other models as well. To check if it is doable in vision encoder (BC breaking?) or we need to postprocess `embeds` in `_get_image_features`
cc @hmellor so you can keep track
cc @ArthurZucker @Cyrilvallez , I will be pinging you for reviews 😄 | {
"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/37780/reactions",
"total_count": 8,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 4,
"confused": 0,
"heart": 0,
"rocket": 4,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37780/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/37779 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37779/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37779/comments | https://api.github.com/repos/huggingface/transformers/issues/37779/events | https://github.com/huggingface/transformers/pull/37779 | 3,019,205,368 | PR_kwDOCUB6oc6T3oJS | 37,779 | enable internvl UTs 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-04-25T07:15:47 | 2025-05-05T22:36:23 | 2025-04-30T08:29:41 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37779",
"html_url": "https://github.com/huggingface/transformers/pull/37779",
"diff_url": "https://github.com/huggingface/transformers/pull/37779.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37779.patch",
"merged_at": "2025-04-30T08:29:41"
} | `pytest -rA tests/models/internvl/test_modeling_internvl.py`
137 cases PASSED, 4 failed cases are same as CUDA, will investigate in separate efforts.
FAILED tests/models/internvl/test_modeling_internvl.py::InternVLModelTest::test_resize_embeddings_untied_with_deepspeed
FAILED tests/models/internvl/test_modeling_internvl.py::InternVLModelTest::test_resize_embeddings_untied_with_deepspeed_multi_gpu
FAILED tests/models/internvl/test_modeling_internvl.py::InternVLModelTest::test_resize_tokens_embeddings_with_deepspeed
FAILED tests/models/internvl/test_modeling_internvl.py::InternVLModelTest::test_resize_tokens_embeddings_with_deepspeed_multi_gpu
| {
"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/37779/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37779/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37778 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37778/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37778/comments | https://api.github.com/repos/huggingface/transformers/issues/37778/events | https://github.com/huggingface/transformers/issues/37778 | 3,019,121,701 | I_kwDOCUB6oc6z9CQl | 37,778 | Report AssertionError: Torch not compiled with CUDA enabled on npu machine | {
"login": "vfdff",
"id": 6094516,
"node_id": "MDQ6VXNlcjYwOTQ1MTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6094516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vfdff",
"html_url": "https://github.com/vfdff",
"followers_url": "https://api.github.com/users/vfdff/followers",
"following_url": "https://api.github.com/users/vfdff/following{/other_user}",
"gists_url": "https://api.github.com/users/vfdff/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vfdff/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vfdff/subscriptions",
"organizations_url": "https://api.github.com/users/vfdff/orgs",
"repos_url": "https://api.github.com/users/vfdff/repos",
"events_url": "https://api.github.com/users/vfdff/events{/privacy}",
"received_events_url": "https://api.github.com/users/vfdff/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-04-25T06:31:19 | 2025-04-25T06:40:08 | 2025-04-25T06:40:08 | NONE | null | null | null | null | ### System Info
transformers 4.51.3
python3.9
### Who can help?
Ascend NPU: @ivarflakstad
### 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
on my npu machine, I also define the device is npu, but it still trigger the error **AssertionError: Torch not compiled with CUDA enabled**.
* the test script: target is **Ascend NPU**, so don't except excute on gpu
> (py39) [ma-user llama149]$cat testLlame_new1.py
```
from transformers import LlamaForCausalLM, AutoTokenizer
import torch
import torch_npu
import time
torch.set_printoptions(profile="full")
device="npu:1"
#下载好的hf模型地址
hf_model_path = 'models--daryl149--llama-2-7b-hf'
# model = LlamaForCausalLM.from_pretrained(hf_model_path).to(device)
model = LlamaForCausalLM.from_pretrained(hf_model_path, device_map=device) # trigger error
tokenizer = AutoTokenizer.from_pretrained(hf_model_path)
print(model)
```
* the detail error log
```
/home/ma-user/anaconda3/envs/py39/lib/python3.9/site-packages/torch/_utils.py:831: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
return self.fget.__get__(instance, owner)()
Loading checkpoint shards: 0%| | 0/2 [00:25<?, ?it/s]
Traceback (most recent call last):
File "/home/ma-user/work/zhongyunde/test/llama149/testLlame_new.py", line 13, in <module>
model = LlamaForCausalLM.from_pretrained(hf_model_path, device_map=device)
File "/home/ma-user/anaconda3/envs/py39/lib/python3.9/site-packages/transformers/modeling_utils.py", line 279, in _wrapper
return func(*args, **kwargs)
File "/home/ma-user/anaconda3/envs/py39/lib/python3.9/site-packages/transformers/modeling_utils.py", line 4399, in from_pretrained
) = cls._load_pretrained_model(
File "/home/ma-user/anaconda3/envs/py39/lib/python3.9/site-packages/transformers/modeling_utils.py", line 4833, in _load_pretrained_model
disk_offload_index, cpu_offload_index = _load_state_dict_into_meta_model(
File "/home/ma-user/anaconda3/envs/py39/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/ma-user/anaconda3/envs/py39/lib/python3.9/site-packages/transformers/modeling_utils.py", line 765, in _load_state_dict_into_meta_model
param = empty_param.to(tensor_device) # It is actually not empty!
File "/home/ma-user/anaconda3/envs/py39/lib/python3.9/site-packages/torch/cuda/__init__.py", line 289, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
```
### Expected behavior
run on npu target, and don't touch the gpu | {
"login": "vfdff",
"id": 6094516,
"node_id": "MDQ6VXNlcjYwOTQ1MTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6094516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vfdff",
"html_url": "https://github.com/vfdff",
"followers_url": "https://api.github.com/users/vfdff/followers",
"following_url": "https://api.github.com/users/vfdff/following{/other_user}",
"gists_url": "https://api.github.com/users/vfdff/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vfdff/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vfdff/subscriptions",
"organizations_url": "https://api.github.com/users/vfdff/orgs",
"repos_url": "https://api.github.com/users/vfdff/repos",
"events_url": "https://api.github.com/users/vfdff/events{/privacy}",
"received_events_url": "https://api.github.com/users/vfdff/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37778/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37778/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/37777 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37777/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37777/comments | https://api.github.com/repos/huggingface/transformers/issues/37777/events | https://github.com/huggingface/transformers/issues/37777 | 3,018,975,461 | I_kwDOCUB6oc6z8ejl | 37,777 | [Trainer] tot update steps is incorrect | {
"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
} | [
{
"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-04-25T04:48:24 | 2025-05-12T15:45:26 | 2025-05-12T15:45:26 | CONTRIBUTOR | null | null | null | null | ### System Info
latest main
### Who can help?
@ArthurZucker
### 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
num_examples is the number of examples in the dataloader and is not the number of batches in the dataloader, and is not the number of batches for one process. so the remainer is incorrect.
when steps_in_epoch % args.gradient_accumulation_steps == 0 and args.gradient_accumulation_steps > 1, total_updates is one more than expected.
https://github.com/huggingface/transformers/blob/7bb619d710ea3bcddeedb2e7999dff4e124aee85/src/transformers/trainer.py#L2497-L2503
num_examples from:
https://github.com/huggingface/transformers/blob/7bb619d710ea3bcddeedb2e7999dff4e124aee85/src/transformers/trainer.py#L1756-L1768
### Expected behavior
correct code is
```python
remainder = steps_in_epoch % args.gradient_accumulation_steps
if remainder == 0:
remainder = args.gradient_accumulation_steps
update_step = -1
total_updates = steps_in_epoch // args.gradient_accumulation_steps + int(remainder < args.gradient_accumulation_steps)
``` | {
"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/37777/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37777/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/37776 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37776/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37776/comments | https://api.github.com/repos/huggingface/transformers/issues/37776/events | https://github.com/huggingface/transformers/issues/37776 | 3,018,941,467 | I_kwDOCUB6oc6z8WQb | 37,776 | Confusing `split_batches` argument | {
"login": "alvanli",
"id": 51011489,
"node_id": "MDQ6VXNlcjUxMDExNDg5",
"avatar_url": "https://avatars.githubusercontent.com/u/51011489?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/alvanli",
"html_url": "https://github.com/alvanli",
"followers_url": "https://api.github.com/users/alvanli/followers",
"following_url": "https://api.github.com/users/alvanli/following{/other_user}",
"gists_url": "https://api.github.com/users/alvanli/gists{/gist_id}",
"starred_url": "https://api.github.com/users/alvanli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alvanli/subscriptions",
"organizations_url": "https://api.github.com/users/alvanli/orgs",
"repos_url": "https://api.github.com/users/alvanli/repos",
"events_url": "https://api.github.com/users/alvanli/events{/privacy}",
"received_events_url": "https://api.github.com/users/alvanli/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-04-25T04:16:24 | 2025-04-25T04:27:39 | 2025-04-25T04:27:38 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.51.3
- Platform: Linux-6.8.0-52-generic-x86_64-with-glibc2.35
- Python version: 3.11.9
- Huggingface_hub version: 0.30.2
- Safetensors version: 0.5.3
- Accelerate version: 1.6.0
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (GPU?): 2.4.1+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: <fill in>
- Using GPU in script?: <fill in>
- GPU type: NVIDIA GeForce RTX 4090
### Who can help?
@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
It looks like `split_batches` in `Seq2SeqTrainingArguments` was deprecated and removed in this [PR](https://github.com/huggingface/transformers/pull/36946) but it still exists in the newest [doc](https://huggingface.co/docs/transformers/main_classes/trainer#transformers.Seq2SeqTrainingArguments) and error message
```
RuntimeError: You can't use batches of different size with `dispatch_batches=True` or when using an `IterableDataset`.either pass `dispatch_batches=False` and have each process fetch its own batch or pass `split_batches=True`. By doing so, the main process will fetch a full batch and slice it into `num_processes` batches for each process
```
Passing in the argument will result in an error `Seq2SeqTrainingArguments.__init__() got an unexpected keyword argument 'split_batches`
### Expected behavior
Error messages similar to warning messages in the previous version
```
FutureWarning: Using `--split_batches` is deprecated and will be removed in version 4.41 of 🤗 Transformers. Use `--accelerator_config {'split_batches':VALUE} instead
``` | {
"login": "alvanli",
"id": 51011489,
"node_id": "MDQ6VXNlcjUxMDExNDg5",
"avatar_url": "https://avatars.githubusercontent.com/u/51011489?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/alvanli",
"html_url": "https://github.com/alvanli",
"followers_url": "https://api.github.com/users/alvanli/followers",
"following_url": "https://api.github.com/users/alvanli/following{/other_user}",
"gists_url": "https://api.github.com/users/alvanli/gists{/gist_id}",
"starred_url": "https://api.github.com/users/alvanli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alvanli/subscriptions",
"organizations_url": "https://api.github.com/users/alvanli/orgs",
"repos_url": "https://api.github.com/users/alvanli/repos",
"events_url": "https://api.github.com/users/alvanli/events{/privacy}",
"received_events_url": "https://api.github.com/users/alvanli/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37776/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37776/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/37775 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37775/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37775/comments | https://api.github.com/repos/huggingface/transformers/issues/37775/events | https://github.com/huggingface/transformers/issues/37775 | 3,018,872,923 | I_kwDOCUB6oc6z8Fhb | 37,775 | error: subprocess-exited-with-error when install transformerspython | {
"login": "vfdff",
"id": 6094516,
"node_id": "MDQ6VXNlcjYwOTQ1MTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6094516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vfdff",
"html_url": "https://github.com/vfdff",
"followers_url": "https://api.github.com/users/vfdff/followers",
"following_url": "https://api.github.com/users/vfdff/following{/other_user}",
"gists_url": "https://api.github.com/users/vfdff/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vfdff/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vfdff/subscriptions",
"organizations_url": "https://api.github.com/users/vfdff/orgs",
"repos_url": "https://api.github.com/users/vfdff/repos",
"events_url": "https://api.github.com/users/vfdff/events{/privacy}",
"received_events_url": "https://api.github.com/users/vfdff/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-04-25T03:06:26 | 2025-06-02T08:02:59 | 2025-06-02T08:02:59 | NONE | null | null | null | null | ### System Info
Python 3.8.17
### 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
/data/zhongyunde/source/test/llama149 # pip install transformers
```
Looking in indexes: http://mirrors.tools.huawei.com/pypi/simple
Collecting transformers
Downloading http://mirrors.tools.huawei.com/pypi/packages/51/51/b87caa939fedf307496e4dbf412f4b909af3d9ca8b189fc3b65c1faa456f/transformers-4.46.3-py3-none-any.whl (10.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.0/10.0 MB 32.5 MB/s eta 0:00:00
Requirement already satisfied: filelock in /usr/local/python3.8.17/lib/python3.8/site-packages (from transformers) (3.13.1)
Collecting huggingface-hub<1.0,>=0.23.2 (from transformers)
Downloading http://mirrors.tools.huawei.com/pypi/packages/93/27/1fb384a841e9661faad1c31cbfa62864f59632e876df5d795234da51c395/huggingface_hub-0.30.2-py3-none-any.whl (481 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 481.4/481.4 kB 7.8 MB/s eta 0:00:00
Requirement already satisfied: numpy>=1.17 in /usr/local/python3.8.17/lib/python3.8/site-packages (from transformers) (1.24.3)
Requirement already satisfied: packaging>=20.0 in /usr/local/python3.8.17/lib/python3.8/site-packages (from transformers) (23.2)
Requirement already satisfied: pyyaml>=5.1 in /usr/local/python3.8.17/lib/python3.8/site-packages (from transformers) (6.0.1)
Collecting regex!=2019.12.17 (from transformers)
Downloading http://mirrors.tools.huawei.com/pypi/packages/0a/27/0b3cf7d9fbe43301aa3473d54406019a7380abe4e3c9ae250bac13c4fdb3/regex-2024.11.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (783 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 783.6/783.6 kB 10.8 MB/s eta 0:00:00
Requirement already satisfied: requests in /usr/local/python3.8.17/lib/python3.8/site-packages (from transformers) (2.31.0)
Collecting tokenizers<0.21,>=0.20 (from transformers)
Downloading http://mirrors.tools.huawei.com/pypi/packages/1a/98/0df883ea6201e35e286a97f5fb2a601bfb5b52e4165f7688a76e4553eeec/tokenizers-0.20.4.tar.gz (343 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 343.0/343.0 kB 5.5 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
```
### Expected behavior
successfully to install | {
"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/37775/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37775/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/37774 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37774/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37774/comments | https://api.github.com/repos/huggingface/transformers/issues/37774/events | https://github.com/huggingface/transformers/pull/37774 | 3,018,821,229 | PR_kwDOCUB6oc6T2XEq | 37,774 | enable xpu in test_trainer | {
"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-04-25T02:17:56 | 2025-05-06T22:47:20 | 2025-05-06T15:13:36 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37774",
"html_url": "https://github.com/huggingface/transformers/pull/37774",
"diff_url": "https://github.com/huggingface/transformers/pull/37774.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37774.patch",
"merged_at": "2025-05-06T15:13:36"
} | 128 PASSED, 27 FAILED for lacking of `optimizer_update_32bit` xpu op in BNB, the implementation in under going, once done, will pass after PR merged to bnb. | {
"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/37774/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37774/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37773 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37773/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37773/comments | https://api.github.com/repos/huggingface/transformers/issues/37773/events | https://github.com/huggingface/transformers/pull/37773 | 3,018,663,564 | PR_kwDOCUB6oc6T12Up | 37,773 | fix performance issue in convert_ids_to_tokens | {
"login": "martin-harmonic",
"id": 156004542,
"node_id": "U_kgDOCUxwvg",
"avatar_url": "https://avatars.githubusercontent.com/u/156004542?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/martin-harmonic",
"html_url": "https://github.com/martin-harmonic",
"followers_url": "https://api.github.com/users/martin-harmonic/followers",
"following_url": "https://api.github.com/users/martin-harmonic/following{/other_user}",
"gists_url": "https://api.github.com/users/martin-harmonic/gists{/gist_id}",
"starred_url": "https://api.github.com/users/martin-harmonic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martin-harmonic/subscriptions",
"organizations_url": "https://api.github.com/users/martin-harmonic/orgs",
"repos_url": "https://api.github.com/users/martin-harmonic/repos",
"events_url": "https://api.github.com/users/martin-harmonic/events{/privacy}",
"received_events_url": "https://api.github.com/users/martin-harmonic/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T23:38:58 | 2025-04-25T20:00:50 | 2025-04-25T20:00:50 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37773",
"html_url": "https://github.com/huggingface/transformers/pull/37773",
"diff_url": "https://github.com/huggingface/transformers/pull/37773.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37773.patch",
"merged_at": "2025-04-25T20:00:50"
} | null | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37773/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37773/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37772 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37772/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37772/comments | https://api.github.com/repos/huggingface/transformers/issues/37772/events | https://github.com/huggingface/transformers/pull/37772 | 3,018,548,114 | PR_kwDOCUB6oc6T1dgB | 37,772 | [torch.compile] Remove compiler related configs from model_kwargs | {
"login": "anijain2305",
"id": 13822661,
"node_id": "MDQ6VXNlcjEzODIyNjYx",
"avatar_url": "https://avatars.githubusercontent.com/u/13822661?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/anijain2305",
"html_url": "https://github.com/anijain2305",
"followers_url": "https://api.github.com/users/anijain2305/followers",
"following_url": "https://api.github.com/users/anijain2305/following{/other_user}",
"gists_url": "https://api.github.com/users/anijain2305/gists{/gist_id}",
"starred_url": "https://api.github.com/users/anijain2305/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/anijain2305/subscriptions",
"organizations_url": "https://api.github.com/users/anijain2305/orgs",
"repos_url": "https://api.github.com/users/anijain2305/repos",
"events_url": "https://api.github.com/users/anijain2305/events{/privacy}",
"received_events_url": "https://api.github.com/users/anijain2305/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T21:58:37 | 2025-04-29T20:01:06 | 2025-04-29T20:01:06 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37772",
"html_url": "https://github.com/huggingface/transformers/pull/37772",
"diff_url": "https://github.com/huggingface/transformers/pull/37772.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37772.patch",
"merged_at": null
} | # What does this PR do?
This allows us to add arguments `disable_compile` and `compile_config` while calling `from_pretrained` and control `torch.compile` from the user program.
## 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": "anijain2305",
"id": 13822661,
"node_id": "MDQ6VXNlcjEzODIyNjYx",
"avatar_url": "https://avatars.githubusercontent.com/u/13822661?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/anijain2305",
"html_url": "https://github.com/anijain2305",
"followers_url": "https://api.github.com/users/anijain2305/followers",
"following_url": "https://api.github.com/users/anijain2305/following{/other_user}",
"gists_url": "https://api.github.com/users/anijain2305/gists{/gist_id}",
"starred_url": "https://api.github.com/users/anijain2305/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/anijain2305/subscriptions",
"organizations_url": "https://api.github.com/users/anijain2305/orgs",
"repos_url": "https://api.github.com/users/anijain2305/repos",
"events_url": "https://api.github.com/users/anijain2305/events{/privacy}",
"received_events_url": "https://api.github.com/users/anijain2305/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37772/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37772/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37771 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37771/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37771/comments | https://api.github.com/repos/huggingface/transformers/issues/37771/events | https://github.com/huggingface/transformers/issues/37771 | 3,018,537,026 | I_kwDOCUB6oc6z6zhC | 37,771 | Force the model to write some tokens mid-generation? | {
"login": "ccocks",
"id": 96586789,
"node_id": "U_kgDOBcHMJQ",
"avatar_url": "https://avatars.githubusercontent.com/u/96586789?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ccocks",
"html_url": "https://github.com/ccocks",
"followers_url": "https://api.github.com/users/ccocks/followers",
"following_url": "https://api.github.com/users/ccocks/following{/other_user}",
"gists_url": "https://api.github.com/users/ccocks/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ccocks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ccocks/subscriptions",
"organizations_url": "https://api.github.com/users/ccocks/orgs",
"repos_url": "https://api.github.com/users/ccocks/repos",
"events_url": "https://api.github.com/users/ccocks/events{/privacy}",
"received_events_url": "https://api.github.com/users/ccocks/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-04-24T21:50:32 | 2025-04-25T19:02:22 | null | NONE | null | null | null | null | ### Feature request
Here’s an example:
User: Hello make a python function for something
Assistant: Here’s an function for that:
def function():
pass
<codetests> ← This is a line we tuned the model to generate
import pytest
assert foo == bar
</codetests> ← Execute the tests right after this token was predicted
Result: tests **succeeded** ← THIS is the forced tokens, we also tuned the model to generate this
Ok, looks like the function is working…
EDIT:
The LLM is trained to respond with the same block given above, however since LLMs are bad at detecting when they have done a mistake they will lean towards saying succeeded for everything.
However after the inference pass for the token “succeeded” there will be a probablity distribution e.g.
succeeded 0.5
failed 0.3
etc.
So I want to “force” the model to pick failed (or succeeded) even though it is a less likely token. Seems like something very simple, but there is no support.
### Motivation
In case you didn't realize the point already, doing this could be opensource LLMs becoming significantly better for agentic workflows. unlike stopping generation, calling tools, and otherwise creating delays, this works right between inference passes. **Agentic workflows for proprietary LLMs can add up costs FAST.**
### Your contribution
I'm not used to this codebase. It seems very complex. but the feature is very simple. Maybe is someone could give me pointers | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37771/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37771/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/37770 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37770/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37770/comments | https://api.github.com/repos/huggingface/transformers/issues/37770/events | https://github.com/huggingface/transformers/pull/37770 | 3,018,284,379 | PR_kwDOCUB6oc6T0kZd | 37,770 | New Model: Ava | {
"login": "Kuduxaaa",
"id": 68453819,
"node_id": "MDQ6VXNlcjY4NDUzODE5",
"avatar_url": "https://avatars.githubusercontent.com/u/68453819?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Kuduxaaa",
"html_url": "https://github.com/Kuduxaaa",
"followers_url": "https://api.github.com/users/Kuduxaaa/followers",
"following_url": "https://api.github.com/users/Kuduxaaa/following{/other_user}",
"gists_url": "https://api.github.com/users/Kuduxaaa/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Kuduxaaa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Kuduxaaa/subscriptions",
"organizations_url": "https://api.github.com/users/Kuduxaaa/orgs",
"repos_url": "https://api.github.com/users/Kuduxaaa/repos",
"events_url": "https://api.github.com/users/Kuduxaaa/events{/privacy}",
"received_events_url": "https://api.github.com/users/Kuduxaaa/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T19:41:45 | 2025-04-28T03:50:09 | 2025-04-28T03:50:09 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37770",
"html_url": "https://github.com/huggingface/transformers/pull/37770",
"diff_url": "https://github.com/huggingface/transformers/pull/37770.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37770.patch",
"merged_at": null
} | # 🚀 Add AvaModel: A Scalable & Efficient LLM Architecture
## Overview
This PR introduces **AvaModel**, a new transformer-based language model architecture designed for high performance across different scales (100M to 100B parameters).
## Architecture Highlights
```python
AvaForCausalLM(
(model): AvaModel(
(embed_tokens): Embedding(32000, 1280)
(layers): ModuleList(
(0-11): 12 x AvaDecoderLayer(
(self_attn): AvaAttention(
(q_proj): Linear(in_features=1280, out_features=1280, bias=False)
(k_proj): Linear(in_features=1280, out_features=640, bias=False)
(v_proj): Linear(in_features=1280, out_features=640, bias=False)
(o_proj): Linear(in_features=1280, out_features=1280, bias=False)
(dropout): Dropout(p=0.0, inplace=False)
)
(mlp): AvaMLP(
(gate_proj): Linear(in_features=1280, out_features=5120, bias=False)
(up_proj): Linear(in_features=1280, out_features=5120, bias=False)
(down_proj): Linear(in_features=5120, out_features=1280, bias=False)
(act_fn): SiLU()
)
(input_layernorm): AvaRMSNorm()
(post_attention_layernorm): AvaRMSNorm()
)
)
(norm): AvaRMSNorm()
(rotary_emb): AvaRotaryEmbedding()
)
(lm_head): Linear(in_features=1280, out_features=32000, bias=False)
)
```
More info: [Kuduxaaa/ava-llm](https://github.com/Kuduxaaa/ava-llm)
| {
"login": "Kuduxaaa",
"id": 68453819,
"node_id": "MDQ6VXNlcjY4NDUzODE5",
"avatar_url": "https://avatars.githubusercontent.com/u/68453819?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Kuduxaaa",
"html_url": "https://github.com/Kuduxaaa",
"followers_url": "https://api.github.com/users/Kuduxaaa/followers",
"following_url": "https://api.github.com/users/Kuduxaaa/following{/other_user}",
"gists_url": "https://api.github.com/users/Kuduxaaa/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Kuduxaaa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Kuduxaaa/subscriptions",
"organizations_url": "https://api.github.com/users/Kuduxaaa/orgs",
"repos_url": "https://api.github.com/users/Kuduxaaa/repos",
"events_url": "https://api.github.com/users/Kuduxaaa/events{/privacy}",
"received_events_url": "https://api.github.com/users/Kuduxaaa/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37770/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37770/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37769 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37769/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37769/comments | https://api.github.com/repos/huggingface/transformers/issues/37769/events | https://github.com/huggingface/transformers/pull/37769 | 3,018,252,837 | PR_kwDOCUB6oc6T0dn3 | 37,769 | Vectorize deepseek moe | {
"login": "eljandoubi",
"id": 78537694,
"node_id": "MDQ6VXNlcjc4NTM3Njk0",
"avatar_url": "https://avatars.githubusercontent.com/u/78537694?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eljandoubi",
"html_url": "https://github.com/eljandoubi",
"followers_url": "https://api.github.com/users/eljandoubi/followers",
"following_url": "https://api.github.com/users/eljandoubi/following{/other_user}",
"gists_url": "https://api.github.com/users/eljandoubi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/eljandoubi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eljandoubi/subscriptions",
"organizations_url": "https://api.github.com/users/eljandoubi/orgs",
"repos_url": "https://api.github.com/users/eljandoubi/repos",
"events_url": "https://api.github.com/users/eljandoubi/events{/privacy}",
"received_events_url": "https://api.github.com/users/eljandoubi/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-04-24T19:26:05 | 2025-07-16T15:11:43 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37769",
"html_url": "https://github.com/huggingface/transformers/pull/37769",
"diff_url": "https://github.com/huggingface/transformers/pull/37769.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37769.patch",
"merged_at": null
} | # What does this PR do?
Vectorize deepseek moe
## Who can review?
Models:
- text models: @ArthurZucker
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37769/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37769/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37768 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37768/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37768/comments | https://api.github.com/repos/huggingface/transformers/issues/37768/events | https://github.com/huggingface/transformers/pull/37768 | 3,017,834,395 | PR_kwDOCUB6oc6TzBns | 37,768 | unpin pytest<8 | {
"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-04-24T16:36:29 | 2025-04-25T10:34:35 | 2025-04-25T10:34:33 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37768",
"html_url": "https://github.com/huggingface/transformers/pull/37768",
"diff_url": "https://github.com/huggingface/transformers/pull/37768.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37768.patch",
"merged_at": "2025-04-25T10:34:33"
} | # What does this PR do?
unpin pytest<8 to see if we get rid of
> Too long with no output (exceeded 10m0s): context deadline exceeded
as discussed internally https://huggingface.slack.com/archives/C01NE71C4F7/p1745514692206779?thread_ts=1745423231.198669&cid=C01NE71C4F7 | {
"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/37768/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37768/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37767 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37767/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37767/comments | https://api.github.com/repos/huggingface/transformers/issues/37767/events | https://github.com/huggingface/transformers/pull/37767 | 3,017,810,292 | PR_kwDOCUB6oc6Ty8VN | 37,767 | Fix santacoder model loading issue #37765 | {
"login": "nv-guomingz",
"id": 137257613,
"node_id": "U_kgDOCC5ijQ",
"avatar_url": "https://avatars.githubusercontent.com/u/137257613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nv-guomingz",
"html_url": "https://github.com/nv-guomingz",
"followers_url": "https://api.github.com/users/nv-guomingz/followers",
"following_url": "https://api.github.com/users/nv-guomingz/following{/other_user}",
"gists_url": "https://api.github.com/users/nv-guomingz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nv-guomingz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nv-guomingz/subscriptions",
"organizations_url": "https://api.github.com/users/nv-guomingz/orgs",
"repos_url": "https://api.github.com/users/nv-guomingz/repos",
"events_url": "https://api.github.com/users/nv-guomingz/events{/privacy}",
"received_events_url": "https://api.github.com/users/nv-guomingz/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T16:26:55 | 2025-04-27T01:31:27 | 2025-04-27T01:31:27 | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37767",
"html_url": "https://github.com/huggingface/transformers/pull/37767",
"diff_url": "https://github.com/huggingface/transformers/pull/37767.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37767.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": "nv-guomingz",
"id": 137257613,
"node_id": "U_kgDOCC5ijQ",
"avatar_url": "https://avatars.githubusercontent.com/u/137257613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nv-guomingz",
"html_url": "https://github.com/nv-guomingz",
"followers_url": "https://api.github.com/users/nv-guomingz/followers",
"following_url": "https://api.github.com/users/nv-guomingz/following{/other_user}",
"gists_url": "https://api.github.com/users/nv-guomingz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nv-guomingz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nv-guomingz/subscriptions",
"organizations_url": "https://api.github.com/users/nv-guomingz/orgs",
"repos_url": "https://api.github.com/users/nv-guomingz/repos",
"events_url": "https://api.github.com/users/nv-guomingz/events{/privacy}",
"received_events_url": "https://api.github.com/users/nv-guomingz/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37767/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37767/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37766 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37766/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37766/comments | https://api.github.com/repos/huggingface/transformers/issues/37766/events | https://github.com/huggingface/transformers/issues/37766 | 3,017,805,055 | I_kwDOCUB6oc6z4Az_ | 37,766 | [Trainer] As gradient_accumulation_steps increases, the loss also increases | {
"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
} | [
{
"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-04-24T16:24:25 | 2025-06-02T08:03:02 | 2025-06-02T08:03:02 | CONTRIBUTOR | null | null | null | null | ### System Info
transformers 4.47.1
### Who can help?
@ArthurZucker
### 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
If model does not accept loss_kwargs, the loss is **not** divided by the number of items in the batch, but only by the number of items in a single forward pass. When `gradient_accumulation_steps > 1`, this can lead to an increased loss — yet no error is raised.
In the latest version (v4.51.3), although the loss no longer increases, num_items_in_batch still does not function as expected when the model does not accept loss_kwargs, and no error or warning is raised.
### Expected behavior
x | {
"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/37766/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 1
} | https://api.github.com/repos/huggingface/transformers/issues/37766/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/37765 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37765/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37765/comments | https://api.github.com/repos/huggingface/transformers/issues/37765/events | https://github.com/huggingface/transformers/issues/37765 | 3,017,800,915 | I_kwDOCUB6oc6z3_zT | 37,765 | Failed to load santacoder model with transformer 4.51.3, it's a similar issue like #37737 | {
"login": "nv-guomingz",
"id": 137257613,
"node_id": "U_kgDOCC5ijQ",
"avatar_url": "https://avatars.githubusercontent.com/u/137257613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nv-guomingz",
"html_url": "https://github.com/nv-guomingz",
"followers_url": "https://api.github.com/users/nv-guomingz/followers",
"following_url": "https://api.github.com/users/nv-guomingz/following{/other_user}",
"gists_url": "https://api.github.com/users/nv-guomingz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nv-guomingz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nv-guomingz/subscriptions",
"organizations_url": "https://api.github.com/users/nv-guomingz/orgs",
"repos_url": "https://api.github.com/users/nv-guomingz/repos",
"events_url": "https://api.github.com/users/nv-guomingz/events{/privacy}",
"received_events_url": "https://api.github.com/users/nv-guomingz/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-04-24T16:23:04 | 2025-04-25T13:48:17 | 2025-04-25T13:48:17 | CONTRIBUTOR | null | null | null | null |
### System Info
Hi, I just installed transformers 4.51.3 on linux system with nvidia gpu.
When I tried to run below code snippet
```python
import transformers
model = transformers.AutoModelForCausalLM.from_pretrained('bigcode/santacoder', device_map='auto', trust_remote_code=True)
```
Meanwhile, I set below envs
```bash
export WORLD_SIZE=1
export RANK=0
export LOCAL_RANK=0
export MASTER_PORT=63563
export MASTER_ADDR=`your localhost`
```
I got below error message:
```bash
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 279, in _wrapper
[rank0]: return func(*args, **kwargs)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4401, in from_pretrained
[rank0]: ) = cls._load_pretrained_model(
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4830, in _load_pretrained_model
[rank0]: disk_offload_index, cpu_offload_index = _load_state_dict_into_meta_model(
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]: return func(*args, **kwargs)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 777, in _load_state_dict_into_meta_model
[rank0]: shard_and_distribute_module(
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/integrations/tensor_parallel.py", line 669, in shard_and_distribute_module
[rank0]: param = torch.nn.Parameter(param)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/usr/local/lib/python3.12/dist-packages/torch/nn/parameter.py", line 46, in __new__
[rank0]: return torch.Tensor._make_subclass(cls, data, requires_grad)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: RuntimeError: Only Tensors of floating point and complex dtype can require gradients
[rank0]:[W424 16:00:01.852231233 ProcessGroupNCCL.cpp:1497] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
```
If I unset **WORLD_SIZE**, the above code snippet could run succesfully.
It looks like one similar issue like #37737
### Who can help?
@Cyrilvallez
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
1. Install transformers 4.51.3 via `pip install transformers`
2. Run below code snippet
`import transformers
model = transformers.AutoModelForCausalLM.from_pretrained('bigcode/starcoder', device_map='auto')`
### Expected behavior
Load model sucessfully.
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
1. Install transformers 4.51.3 via pip install transformers
2. Run below code snippet
```python
import transformers
model = transformers.AutoModelForCausalLM.from_pretrained('openai-community/gpt2-medium', device_map='auto', trust_remote_code=True)
```
### Expected behavior
Load model sucessfully. | {
"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/37765/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37765/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/37764 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37764/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37764/comments | https://api.github.com/repos/huggingface/transformers/issues/37764/events | https://github.com/huggingface/transformers/pull/37764 | 3,017,772,336 | PR_kwDOCUB6oc6Ty0Fb | 37,764 | Define warmup allocator for torchao quantization | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-04-24T16:10:55 | 2025-04-28T08:45:56 | 2025-04-28T08:45:55 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37764",
"html_url": "https://github.com/huggingface/transformers/pull/37764",
"diff_url": "https://github.com/huggingface/transformers/pull/37764.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37764.patch",
"merged_at": "2025-04-28T08:45:55"
} | # What does this PR do?
Since when computing the total number of bytes of a torchao quantized model using : `param_byte_count = param.numel() * param.element_size()` the `param.element_size()` is not correct, we need to account for that and have a factor of 4 for `int8` models and a factor of `8` for `int4` models | {
"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/37764/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/37764/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37763 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37763/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37763/comments | https://api.github.com/repos/huggingface/transformers/issues/37763/events | https://github.com/huggingface/transformers/pull/37763 | 3,017,733,455 | PR_kwDOCUB6oc6TyrnV | 37,763 | general spm converter | {
"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-04-24T15:55:07 | 2025-05-19T14:03:59 | null | COLLABORATOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37763",
"html_url": "https://github.com/huggingface/transformers/pull/37763",
"diff_url": "https://github.com/huggingface/transformers/pull/37763.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37763.patch",
"merged_at": null
} | null | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37763/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37763/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37762 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37762/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37762/comments | https://api.github.com/repos/huggingface/transformers/issues/37762/events | https://github.com/huggingface/transformers/pull/37762 | 3,017,686,865 | PR_kwDOCUB6oc6Tyhlq | 37,762 | Add update_tp_plan() for Quark | {
"login": "amd-xiaoyu12",
"id": 188109516,
"node_id": "U_kgDOCzZSzA",
"avatar_url": "https://avatars.githubusercontent.com/u/188109516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amd-xiaoyu12",
"html_url": "https://github.com/amd-xiaoyu12",
"followers_url": "https://api.github.com/users/amd-xiaoyu12/followers",
"following_url": "https://api.github.com/users/amd-xiaoyu12/following{/other_user}",
"gists_url": "https://api.github.com/users/amd-xiaoyu12/gists{/gist_id}",
"starred_url": "https://api.github.com/users/amd-xiaoyu12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amd-xiaoyu12/subscriptions",
"organizations_url": "https://api.github.com/users/amd-xiaoyu12/orgs",
"repos_url": "https://api.github.com/users/amd-xiaoyu12/repos",
"events_url": "https://api.github.com/users/amd-xiaoyu12/events{/privacy}",
"received_events_url": "https://api.github.com/users/amd-xiaoyu12/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | open | false | null | [] | null | [] | 2025-04-24T15:37:02 | 2025-04-29T00:17:23 | null | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37762",
"html_url": "https://github.com/huggingface/transformers/pull/37762",
"diff_url": "https://github.com/huggingface/transformers/pull/37762.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37762.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
-->
| null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37762/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37762/timeline | null | null | null | null | true | false |
https://api.github.com/repos/huggingface/transformers/issues/37761 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37761/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37761/comments | https://api.github.com/repos/huggingface/transformers/issues/37761/events | https://github.com/huggingface/transformers/pull/37761 | 3,017,654,125 | PR_kwDOCUB6oc6Tyapm | 37,761 | Update TP plan for Quark | {
"login": "amd-xiaoyu12",
"id": 188109516,
"node_id": "U_kgDOCzZSzA",
"avatar_url": "https://avatars.githubusercontent.com/u/188109516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amd-xiaoyu12",
"html_url": "https://github.com/amd-xiaoyu12",
"followers_url": "https://api.github.com/users/amd-xiaoyu12/followers",
"following_url": "https://api.github.com/users/amd-xiaoyu12/following{/other_user}",
"gists_url": "https://api.github.com/users/amd-xiaoyu12/gists{/gist_id}",
"starred_url": "https://api.github.com/users/amd-xiaoyu12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amd-xiaoyu12/subscriptions",
"organizations_url": "https://api.github.com/users/amd-xiaoyu12/orgs",
"repos_url": "https://api.github.com/users/amd-xiaoyu12/repos",
"events_url": "https://api.github.com/users/amd-xiaoyu12/events{/privacy}",
"received_events_url": "https://api.github.com/users/amd-xiaoyu12/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T15:24:33 | 2025-04-24T15:39:30 | 2025-04-24T15:25:17 | CONTRIBUTOR | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37761",
"html_url": "https://github.com/huggingface/transformers/pull/37761",
"diff_url": "https://github.com/huggingface/transformers/pull/37761.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37761.patch",
"merged_at": null
} | # What does this PR do?
Add update_tp_plan() to Qurak
<!--
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": "amd-xiaoyu12",
"id": 188109516,
"node_id": "U_kgDOCzZSzA",
"avatar_url": "https://avatars.githubusercontent.com/u/188109516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amd-xiaoyu12",
"html_url": "https://github.com/amd-xiaoyu12",
"followers_url": "https://api.github.com/users/amd-xiaoyu12/followers",
"following_url": "https://api.github.com/users/amd-xiaoyu12/following{/other_user}",
"gists_url": "https://api.github.com/users/amd-xiaoyu12/gists{/gist_id}",
"starred_url": "https://api.github.com/users/amd-xiaoyu12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amd-xiaoyu12/subscriptions",
"organizations_url": "https://api.github.com/users/amd-xiaoyu12/orgs",
"repos_url": "https://api.github.com/users/amd-xiaoyu12/repos",
"events_url": "https://api.github.com/users/amd-xiaoyu12/events{/privacy}",
"received_events_url": "https://api.github.com/users/amd-xiaoyu12/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37761/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37761/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37760 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37760/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37760/comments | https://api.github.com/repos/huggingface/transformers/issues/37760/events | https://github.com/huggingface/transformers/pull/37760 | 3,017,589,967 | PR_kwDOCUB6oc6TyM1u | 37,760 | [deps] pin max `torch` version | {
"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-04-24T15:01:59 | 2025-05-14T10:22:35 | 2025-04-24T15:18:25 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37760",
"html_url": "https://github.com/huggingface/transformers/pull/37760",
"diff_url": "https://github.com/huggingface/transformers/pull/37760.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37760.patch",
"merged_at": "2025-04-24T15:18:25"
} | # What does this PR do?
At a first glance, `torch==2.7.0` results in very big slowdowns with `torch.compile` -- >10x slower in my test runs
This PR pins `torch` while we investigate it.
_____________________________________
Benchmark script:
```py
import copy
import os
import torch
from torch.utils import benchmark
from transformers import AutoTokenizer, AutoModelForCausalLM
os.environ["TOKENIZERS_PARALLELISM"] = "false"
# Benchmarking settings
BSZ = [1, 4]
NEW_TOK = [16, 256]
N_ITER = 10
MODEL_ID = "google/gemma-2-2b-it"
# MODEL_ID = "Qwen/Qwen2.5-0.5B-Instruct"
CACHE_IMPLEMENTATION = "hybrid"
# CACHE_IMPLEMENTATION = "static"
# debug: run only the first batch_size/max_new_tokens pair
BSZ = [BSZ[0]]
NEW_TOK = [NEW_TOK[0]]
# Other constants
FRANCE_ARTICLE = (
"<s>Marseille, France (CNN)The French prosecutor leading an investigation into the crash of Germanwings Flight "
"9525 insisted Wednesday that he was not aware of any video footage from on board the plane. Marseille "
"prosecutor Brice Robin told CNN that \"so far no videos were used in the crash investigation.\" He added, \"A "
"person who has such a video needs to immediately give it to the investigators.\" Robin\'s comments follow claims "
"by two magazines, German daily Bild and French Paris Match, of a cell phone video showing the harrowing final "
"seconds from on board Germanwings Flight 9525 as it crashed into the French Alps. All 150 on board were killed. "
"Paris Match and Bild reported that the video was recovered from a phone at the wreckage site. The two "
"publications described the supposed video, but did not post it on their websites. The publications said that "
"they watched the video, which was found by a source close to the investigation. \"One can hear cries of 'My God' "
"in several languages,\" Paris Match reported. \"Metallic banging can also be heard more than three times, "
"perhaps of the pilot trying to open the cockpit door with a heavy object. Towards the end, after a heavy "
"shake, stronger than the others, the screaming intensifies. Then nothing.\" \"It is a very disturbing scene,\" "
"said Julian Reichelt, editor-in-chief of Bild online. An official with France\'s accident investigation agency, "
"the BEA, said the agency is not aware of any such video. Lt. Col. Jean-Marc Menichini, a French Gendarmerie "
"spokesman in charge of communications on rescue efforts around the Germanwings crash site, told CNN that the "
"reports were \"completely wrong\" and \"unwarranted.\" Cell phones have been collected at the site, he said, "
"but that they \"hadn\'t been exploited yet.\" Menichini said he believed the cell phones would need to be sent "
"to the Criminal Research Institute in Rosny sous-Bois, near Paris, in order to be analyzed by specialized "
"technicians working hand-in-hand with investigators. But none of the cell phones found so far have been sent "
"to the institute, Menichini said. Asked whether staff involved in the search could have leaked a memory card "
"to the media, Menichini answered with a categorical \"no.\" Reichelt told \"Erin Burnett: Outfront\" that he "
"had watched the video and stood by the report, saying Bild and Paris Match are \"very confident\" that the clip "
"is real. He noted that investigators only revealed they\'d recovered cell phones from the crash site after "
"Bild and Paris Match published their reports. \"That is something we did not know before. ... Overall we can "
"say many things of the investigation weren\'t revealed by the investigation at the beginning,\" he said. What "
"was mental state of Germanwings co-pilot? German airline Lufthansa confirmed Tuesday that co-pilot Andreas "
"Lubitz had battled depression years before he took the controls of Germanwings Flight 9525, which he\'s "
"accused of deliberately crashing last week in the French Alps. Lubitz told his Lufthansa flight training "
"school in 2009 that he had a \"previous episode of severe depression,\" the airline said Tuesday. Email "
"correspondence between Lubitz and the school discovered in an internal investigation, Lufthansa said, "
"included medical documents he submitted in connection with resuming his flight training. The announcement "
"indicates that Lufthansa, the parent company of Germanwings, knew of Lubitz's battle with depression, allowed "
"him to continue training and ultimately put him in the cockpit. Lufthansa, whose CEO Carsten Spohr previously "
"said Lubitz was 100% fit to fly, described its statement Tuesday as a \"swift and seamless clarification\" and "
"said it was sharing the information and documents -- including training and medical records -- with public "
"prosecutors. Spohr traveled to the crash site Wednesday, where recovery teams have been working for the past "
"week to recover human remains and plane debris scattered across a steep mountainside. He saw the crisis center "
"set up in Seyne-les-Alpes, laid a wreath in the village of Le Vernet, closer to the crash site, where grieving "
"families have left flowers at a simple stone memorial. Menichini told CNN late Tuesday that no visible human "
"remains were left at the site but recovery teams would keep searching. French President Francois Hollande, "
"speaking Tuesday, said that it should be possible to identify all the victims using DNA analysis by the "
"end of the week, sooner than authorities had previously suggested. In the meantime, the recovery of the "
"victims' personal belongings will start Wednesday, Menichini said. Among those personal belongings could be "
"more cell phones belonging to the 144 passengers and six crew on board. Check out the latest from our "
"correspondents . The details about Lubitz's correspondence with the flight school during his training were "
"among several developments as investigators continued to delve into what caused the crash and Lubitz\'s "
"possible motive for downing the jet. A Lufthansa spokesperson told CNN on Tuesday that Lubitz had a valid "
"medical certificate, had passed all his examinations and \"held all the licenses required.\" Earlier, a "
"spokesman for the prosecutor\'s office in Dusseldorf, Christoph Kumpa, said medical records reveal Lubitz "
"suffered from suicidal tendencies at some point before his aviation career and underwent psychotherapy before "
"he got his pilot's license. Kumpa emphasized there's no evidence suggesting Lubitz was suicidal or acting "
"aggressively before the crash. Investigators are looking into whether Lubitz feared his medical condition "
"would cause him to lose his pilot's license, a European government official briefed on the investigation told "
"CNN on Tuesday. While flying was \"a big part of his life,\" the source said, it\'s only one theory being "
"considered. Another source, a law enforcement official briefed on the investigation, also told CNN that "
"authorities believe the primary motive for Lubitz to bring down the plane was that he feared he would not "
"be allowed to fly because of his medical problems. Lubitz's girlfriend told investigators he had seen an eye "
"doctor and a neuropsychologist, both of whom deemed him unfit to work recently and concluded he had "
"psychological issues, the European government official said. But no matter what details emerge about his "
"previous mental health struggles, there's more to the story, said Brian Russell, a forensic psychologist. "
"\"Psychology can explain why somebody would turn rage inward on themselves about the fact that maybe they "
"weren't going to keep doing their job and they're upset about that and so they're suicidal,\" he said. \"But "
"there is no mental illness that explains why somebody then feels entitled to also take that rage and turn it "
"outward on 149 other people who had nothing to do with the person's problems.\" Germanwings crash compensation: "
"What we know . Who was the captain of Germanwings Flight 9525? CNN's Margot Haddad reported from Marseille and "
"Pamela Brown from Dusseldorf, while Laura Smith-Spark wrote from London. CNN's Frederik Pleitgen, Pamela "
"Boykoff, Antonia Mortensen, Sandrine Amiel and Anna-Maja Rappard contributed to this report."
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, padding_side="left")
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype=torch.bfloat16, device_map="auto")
prompt_length = tokenizer([FRANCE_ARTICLE], return_tensors="pt").input_ids.shape[1]
label_ms_per_token = f"Throughput (time/foward pass, prompt = {prompt_length} tokens)"
label_first_step = f"First call (time, prompt = {prompt_length} tokens)"
def print_results(all_results):
print("\n")
compare = benchmark.Compare(all_results)
compare.trim_significant_figures()
compare.colorize(rowwise = True)
compare.print()
def time_generate_call(model, task, ms_per_token, first_step, compile=False):
for bsz in BSZ:
for max_new_tokens in NEW_TOK:
input_ids = tokenizer([FRANCE_ARTICLE] * bsz, return_tensors="pt").to("cuda")
description = f"batch size, max_new_tokens: {bsz, max_new_tokens}"
task_spec_ms_per_token = benchmark.TaskSpec(
stmt="", setup="", description=task, label=label_ms_per_token, sub_label=description
)
task_spec_ms_first_step = benchmark.TaskSpec(
stmt="", setup="", description=task, label=label_first_step, sub_label=description
)
# generate EXACTLY `max_new_tokens` tokens (no early termination due to `eos_token_id`)
generation_kwargs = {
"max_new_tokens": max_new_tokens,
"min_new_tokens": max_new_tokens,
"eos_token_id": None,
"do_sample": False,
"cache_implementation": CACHE_IMPLEMENTATION if compile else None
}
generation_config = copy.deepcopy(model.generation_config)
generation_config.update(**generation_kwargs)
torch.compiler.reset()
results = []
for _ in range(N_ITER):
start = torch.cuda.Event(enable_timing=True)
end = torch.cuda.Event(enable_timing=True)
start.record()
gen_out = model.generate(**input_ids, generation_config=generation_config)
end.record()
torch.cuda.synchronize()
total_time = start.elapsed_time(end) / 1000 # time in seconds
time_per_forward = total_time / max_new_tokens
assert gen_out.shape[1] == max_new_tokens + prompt_length
results.append(time_per_forward)
ms_per_token.append(benchmark.Measurement(1, results[3:], task_spec_ms_per_token, metadata=None))
first_step.append(benchmark.Measurement(
1, [results[0] * max_new_tokens], task_spec_ms_first_step, metadata=None)
)
print_results(ms_per_token)
print_results(first_step)
print("*" * 80)
ms_per_token = []
first_step = []
# eager
with torch.compiler.set_stance("force_eager"):
time_generate_call(model, "eager", ms_per_token, first_step)
# compiled
time_generate_call(model, "compiled", ms_per_token, first_step, compile=True)
``` | {
"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/37760/reactions",
"total_count": 2,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 2,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37760/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37759 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37759/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37759/comments | https://api.github.com/repos/huggingface/transformers/issues/37759/events | https://github.com/huggingface/transformers/pull/37759 | 3,017,524,940 | PR_kwDOCUB6oc6Tx-tL | 37,759 | Fix auto-round hfoption | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-04-24T14:39:54 | 2025-04-24T16:19:40 | 2025-04-24T16:19:38 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37759",
"html_url": "https://github.com/huggingface/transformers/pull/37759",
"diff_url": "https://github.com/huggingface/transformers/pull/37759.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37759.patch",
"merged_at": "2025-04-24T16:19:38"
} | # What does this PR do?
Fixes `auto-round` docs using `hfoption`
| {
"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/37759/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37759/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37758 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37758/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37758/comments | https://api.github.com/repos/huggingface/transformers/issues/37758/events | https://github.com/huggingface/transformers/pull/37758 | 3,017,517,345 | PR_kwDOCUB6oc6Tx9Dm | 37,758 | Fix tied weight loading with TP and loading sub state_dicts | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T14:37:15 | 2025-04-24T14:50:12 | 2025-04-24T14:47:40 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37758",
"html_url": "https://github.com/huggingface/transformers/pull/37758",
"diff_url": "https://github.com/huggingface/transformers/pull/37758.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37758.patch",
"merged_at": "2025-04-24T14:47:40"
} | # What does this PR do?
See https://github.com/huggingface/transformers/issues/37737 | {
"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/37758/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37758/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37757 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37757/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37757/comments | https://api.github.com/repos/huggingface/transformers/issues/37757/events | https://github.com/huggingface/transformers/pull/37757 | 3,017,487,425 | PR_kwDOCUB6oc6Tx2kl | 37,757 | FIX: Faulty PEFT tests | {
"login": "BenjaminBossan",
"id": 6229650,
"node_id": "MDQ6VXNlcjYyMjk2NTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/6229650?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BenjaminBossan",
"html_url": "https://github.com/BenjaminBossan",
"followers_url": "https://api.github.com/users/BenjaminBossan/followers",
"following_url": "https://api.github.com/users/BenjaminBossan/following{/other_user}",
"gists_url": "https://api.github.com/users/BenjaminBossan/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BenjaminBossan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BenjaminBossan/subscriptions",
"organizations_url": "https://api.github.com/users/BenjaminBossan/orgs",
"repos_url": "https://api.github.com/users/BenjaminBossan/repos",
"events_url": "https://api.github.com/users/BenjaminBossan/events{/privacy}",
"received_events_url": "https://api.github.com/users/BenjaminBossan/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T14:27:15 | 2025-04-28T13:10:54 | 2025-04-28T13:10:47 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37757",
"html_url": "https://github.com/huggingface/transformers/pull/37757",
"diff_url": "https://github.com/huggingface/transformers/pull/37757.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37757.patch",
"merged_at": "2025-04-28T13:10:47"
} | Two [PEFT tests are actually failing](https://github.com/huggingface/transformers/actions/runs/14632303734/job/41057310419#step:13:241):
- `tests/peft_integration/test_peft_integration.py::PeftIntegrationTester::test_delete_adapter`
- `tests/peft_integration/test_peft_integration.py::PeftIntegrationTester::test_peft_pipeline_no_warning`
This must have been going on for some time but was apparently never noticed. The cause is that the tests themselves are faulty, the PEFT integration is correct in these cases.
## `test_delete_adapter`
The first faulty test was introduced by #34650. AFAICT, it should never have passed in the first place, the PEFT integration logic was not changed in the meantime. At this point, the logs for the PR CI are gone, so I'm not sure if the test passed back then or not.
## `test_peft_pipeline_no_warning`
This test was introduced in #36783 and IMO should also never have passed, as the [`self.assertNoLogs` context manager](https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertNoLogs) only returns `None`, thus the assert should never have worked (mea culpa for suggesting this code snippet). Here too, the CI logs are deleted by now, so I can't check if the test already failed back then.
## Note
Overall, I'm a bit concerned that those tests apparently never passed but the PRs were still merged. Also, it would be great if the PEFT maintainers could be alerted when the transformers PEFT tests fail. However, I could not find where the corresponding CI is defined.
## 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? | {
"login": "BenjaminBossan",
"id": 6229650,
"node_id": "MDQ6VXNlcjYyMjk2NTA=",
"avatar_url": "https://avatars.githubusercontent.com/u/6229650?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BenjaminBossan",
"html_url": "https://github.com/BenjaminBossan",
"followers_url": "https://api.github.com/users/BenjaminBossan/followers",
"following_url": "https://api.github.com/users/BenjaminBossan/following{/other_user}",
"gists_url": "https://api.github.com/users/BenjaminBossan/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BenjaminBossan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BenjaminBossan/subscriptions",
"organizations_url": "https://api.github.com/users/BenjaminBossan/orgs",
"repos_url": "https://api.github.com/users/BenjaminBossan/repos",
"events_url": "https://api.github.com/users/BenjaminBossan/events{/privacy}",
"received_events_url": "https://api.github.com/users/BenjaminBossan/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37757/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37757/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37756 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37756/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37756/comments | https://api.github.com/repos/huggingface/transformers/issues/37756/events | https://github.com/huggingface/transformers/pull/37756 | 3,017,350,061 | PR_kwDOCUB6oc6TxY0B | 37,756 | [generate] fix default autocompile case on gpu | {
"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-04-24T13:43:51 | 2025-04-24T14:08:39 | 2025-04-24T14:08:39 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37756",
"html_url": "https://github.com/huggingface/transformers/pull/37756",
"diff_url": "https://github.com/huggingface/transformers/pull/37756.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37756.patch",
"merged_at": "2025-04-24T14:08:39"
} | # What does this PR do?
(I didn't run slow tests before merging #37709 , the CPU tests of the push ci didn't caught this issue)
reproducer, requires GPU
```py
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct", device_map="auto")
inputs = tokenizer(["The quick brown"], return_tensors="pt").to(model.device)
# compilable cache -> compilation will happen
gen_out = model.generate(**inputs, do_sample=False, cache_implementation="static")
print(tokenizer.batch_decode(gen_out, skip_special_tokens=True))
```
| {
"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/37756/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37756/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37755 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37755/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37755/comments | https://api.github.com/repos/huggingface/transformers/issues/37755/events | https://github.com/huggingface/transformers/pull/37755 | 3,017,215,044 | PR_kwDOCUB6oc6Tw7pP | 37,755 | Guard DeepSpeed imports | {
"login": "lewtun",
"id": 26859204,
"node_id": "MDQ6VXNlcjI2ODU5MjA0",
"avatar_url": "https://avatars.githubusercontent.com/u/26859204?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lewtun",
"html_url": "https://github.com/lewtun",
"followers_url": "https://api.github.com/users/lewtun/followers",
"following_url": "https://api.github.com/users/lewtun/following{/other_user}",
"gists_url": "https://api.github.com/users/lewtun/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lewtun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lewtun/subscriptions",
"organizations_url": "https://api.github.com/users/lewtun/orgs",
"repos_url": "https://api.github.com/users/lewtun/repos",
"events_url": "https://api.github.com/users/lewtun/events{/privacy}",
"received_events_url": "https://api.github.com/users/lewtun/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T13:02:30 | 2025-04-24T16:16:35 | 2025-04-24T16:16:34 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37755",
"html_url": "https://github.com/huggingface/transformers/pull/37755",
"diff_url": "https://github.com/huggingface/transformers/pull/37755.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37755.patch",
"merged_at": "2025-04-24T16:16:34"
} | # What does this PR do?
<!--
Congratulations! You've made it this far! You're not quite done yet though.
Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.
Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.
Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
This PR follows a similar approach as the one taken in `accelerate` (https://github.com/huggingface/accelerate/pull/1963) to guard the DeepSpeed imports so that we only call `import deepspeed` when it's needed. The rationale for this is that whenever we run `import deepspeed`, CUDA is initialised which is (a) slow and (b) interferes with the vllm server when DP=8 and TP=1 (see https://github.com/vllm-project/vllm/issues/17079)
Related to https://github.com/huggingface/trl/pull/3351
Gently pinging @SunMarc for review 🤗
## 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": "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/37755/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37755/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37754 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37754/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37754/comments | https://api.github.com/repos/huggingface/transformers/issues/37754/events | https://github.com/huggingface/transformers/issues/37754 | 3,017,173,079 | I_kwDOCUB6oc6z1mhX | 37,754 | [Bug]: LLAMA_ATTENTION_CLASSES no longer found in newer versions, error when deploying models (Aria) | {
"login": "musoles",
"id": 135031143,
"node_id": "U_kgDOCAxpZw",
"avatar_url": "https://avatars.githubusercontent.com/u/135031143?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/musoles",
"html_url": "https://github.com/musoles",
"followers_url": "https://api.github.com/users/musoles/followers",
"following_url": "https://api.github.com/users/musoles/following{/other_user}",
"gists_url": "https://api.github.com/users/musoles/gists{/gist_id}",
"starred_url": "https://api.github.com/users/musoles/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/musoles/subscriptions",
"organizations_url": "https://api.github.com/users/musoles/orgs",
"repos_url": "https://api.github.com/users/musoles/repos",
"events_url": "https://api.github.com/users/musoles/events{/privacy}",
"received_events_url": "https://api.github.com/users/musoles/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-04-24T12:51:17 | 2025-04-24T13:21:13 | 2025-04-24T13:21:12 | NONE | null | null | null | null | ### System Info
Environment install:
pip install vllm==0.8.4
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
This is related to a [vLLM issue I raised](https://github.com/vllm-project/vllm/issues/17077) when trying to deploy [Aria model](https://huggingface.co/rhymes-ai/Aria).
The error I'm getting is related to a missing variable:
`LLAMA_ATTENTION_CLASSES' from 'transformers.models.llama.modeling_llama`
Upon initial investigation I noticed `LLAMA_ATTENTION_CLASSES` was present in `transformers<=4.47.1` but disappeared after. Since vLLM requires transformers >=4.51, this causes an issue.
I'm uncertain if this is a vLLM or a transformers issue, hence raising it in both.
The command to reproduce:
```
python -m vllm.entrypoints.openai.api_server \
--model rhymes-ai/Aria-Chat \
--host 0.0.0.0 --port 8080 \
--tensor-parallel-size 1 \
--pipeline-parallel-size 1
```
### Expected behavior
Successfully deployed Aria model. | {
"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/37754/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37754/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/37753 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37753/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37753/comments | https://api.github.com/repos/huggingface/transformers/issues/37753/events | https://github.com/huggingface/transformers/pull/37753 | 3,017,154,403 | PR_kwDOCUB6oc6TwuN7 | 37,753 | Updated Albert model Card | {
"login": "souvikchand",
"id": 96312748,
"node_id": "U_kgDOBb2drA",
"avatar_url": "https://avatars.githubusercontent.com/u/96312748?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/souvikchand",
"html_url": "https://github.com/souvikchand",
"followers_url": "https://api.github.com/users/souvikchand/followers",
"following_url": "https://api.github.com/users/souvikchand/following{/other_user}",
"gists_url": "https://api.github.com/users/souvikchand/gists{/gist_id}",
"starred_url": "https://api.github.com/users/souvikchand/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/souvikchand/subscriptions",
"organizations_url": "https://api.github.com/users/souvikchand/orgs",
"repos_url": "https://api.github.com/users/souvikchand/repos",
"events_url": "https://api.github.com/users/souvikchand/events{/privacy}",
"received_events_url": "https://api.github.com/users/souvikchand/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T12:44:43 | 2025-06-16T19:51:47 | 2025-06-13T21:58:06 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37753",
"html_url": "https://github.com/huggingface/transformers/pull/37753",
"diff_url": "https://github.com/huggingface/transformers/pull/37753.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37753.patch",
"merged_at": "2025-06-13T21:58:06"
} | # 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 -->
Updates `ALBERT` model card as per #[36979](https://github.com/huggingface/transformers/issues/36979)
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? https://github.com/huggingface/transformers/issues/36979
to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?
## Who can review?
@stevhliu Please check the PR and see if it's alright :smile:
<!-- 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/37753/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37753/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37752 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37752/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37752/comments | https://api.github.com/repos/huggingface/transformers/issues/37752/events | https://github.com/huggingface/transformers/issues/37752 | 3,017,130,174 | I_kwDOCUB6oc6z1cC- | 37,752 | [Install] fail to install pip install transformers==4.42 | {
"login": "vfdff",
"id": 6094516,
"node_id": "MDQ6VXNlcjYwOTQ1MTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6094516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vfdff",
"html_url": "https://github.com/vfdff",
"followers_url": "https://api.github.com/users/vfdff/followers",
"following_url": "https://api.github.com/users/vfdff/following{/other_user}",
"gists_url": "https://api.github.com/users/vfdff/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vfdff/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vfdff/subscriptions",
"organizations_url": "https://api.github.com/users/vfdff/orgs",
"repos_url": "https://api.github.com/users/vfdff/repos",
"events_url": "https://api.github.com/users/vfdff/events{/privacy}",
"received_events_url": "https://api.github.com/users/vfdff/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-04-24T12:36:24 | 2025-04-25T07:03:30 | 2025-04-25T07:02:43 | NONE | null | null | null | null | ### System Info
python 3.9
### 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
According to https://github.com/huggingface/transformers/issues/31806, the transformer version 4.42.3 is matched to python 3.9, so I try to install it with **pip install transformers==4.42** .
It report errors (machine 131)
```
(py2.1-zyd) [ma-user llama149]$**pip install transformers==4.42**
Looking in indexes: https://pip.modelarts.private.com/repository/pypi/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0xffff82fdd4c0>, 'Connection to openproxy.huawei.com timed out. (connect timeout=120.0)')': /repository/pypi/simple/transformers/
```
But it can successfully installed with **pip install transformers**
```
(py2.1-zyd) [ma-user llama149]$pip install transformers
Looking in indexes: https://pip.modelarts.private.com/repository/pypi/simple
Requirement already satisfied: transformers in /home/ma-user/work/zhongyunde/envs/py2.1-zyd/lib/python3.9/site-packages (4.44.2)
```
### Expected behavior
successfully install the special version transformer version 4.42 | {
"login": "vfdff",
"id": 6094516,
"node_id": "MDQ6VXNlcjYwOTQ1MTY=",
"avatar_url": "https://avatars.githubusercontent.com/u/6094516?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vfdff",
"html_url": "https://github.com/vfdff",
"followers_url": "https://api.github.com/users/vfdff/followers",
"following_url": "https://api.github.com/users/vfdff/following{/other_user}",
"gists_url": "https://api.github.com/users/vfdff/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vfdff/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vfdff/subscriptions",
"organizations_url": "https://api.github.com/users/vfdff/orgs",
"repos_url": "https://api.github.com/users/vfdff/repos",
"events_url": "https://api.github.com/users/vfdff/events{/privacy}",
"received_events_url": "https://api.github.com/users/vfdff/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37752/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37752/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/37751 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37751/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37751/comments | https://api.github.com/repos/huggingface/transformers/issues/37751/events | https://github.com/huggingface/transformers/pull/37751 | 3,017,111,090 | PR_kwDOCUB6oc6Twkpg | 37,751 | Stop autoconverting custom code checkpoints | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T12:30:48 | 2025-05-26T18:15:30 | 2025-05-26T18:15:28 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37751",
"html_url": "https://github.com/huggingface/transformers/pull/37751",
"diff_url": "https://github.com/huggingface/transformers/pull/37751.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37751.patch",
"merged_at": "2025-05-26T18:15:28"
} | Our Space for autoconverting code fails with custom code models, which causes problems when a custom code model only has Pytorch checkpoints!
This PR resolves this by not launching the autoconversion thread when the model is custom code! | {
"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/37751/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37751/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37750 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37750/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37750/comments | https://api.github.com/repos/huggingface/transformers/issues/37750/events | https://github.com/huggingface/transformers/pull/37750 | 3,017,060,155 | PR_kwDOCUB6oc6TwZb8 | 37,750 | Update `MllamaForConditionalGenerationIntegrationTest` | {
"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-04-24T12:13:07 | 2025-04-24T12:29:48 | 2025-04-24T12:29:46 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37750",
"html_url": "https://github.com/huggingface/transformers/pull/37750",
"diff_url": "https://github.com/huggingface/transformers/pull/37750.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37750.patch",
"merged_at": "2025-04-24T12:29:46"
} | # What does this PR do?
Followup of #37644 | {
"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/37750/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37750/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37749 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37749/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37749/comments | https://api.github.com/repos/huggingface/transformers/issues/37749/events | https://github.com/huggingface/transformers/pull/37749 | 3,016,982,005 | PR_kwDOCUB6oc6TwIcI | 37,749 | WIP | {
"login": "i-be-snek",
"id": 94386553,
"node_id": "U_kgDOBaA5eQ",
"avatar_url": "https://avatars.githubusercontent.com/u/94386553?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/i-be-snek",
"html_url": "https://github.com/i-be-snek",
"followers_url": "https://api.github.com/users/i-be-snek/followers",
"following_url": "https://api.github.com/users/i-be-snek/following{/other_user}",
"gists_url": "https://api.github.com/users/i-be-snek/gists{/gist_id}",
"starred_url": "https://api.github.com/users/i-be-snek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/i-be-snek/subscriptions",
"organizations_url": "https://api.github.com/users/i-be-snek/orgs",
"repos_url": "https://api.github.com/users/i-be-snek/repos",
"events_url": "https://api.github.com/users/i-be-snek/events{/privacy}",
"received_events_url": "https://api.github.com/users/i-be-snek/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T11:43:21 | 2025-04-24T11:43:56 | 2025-04-24T11:43:56 | NONE | null | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37749",
"html_url": "https://github.com/huggingface/transformers/pull/37749",
"diff_url": "https://github.com/huggingface/transformers/pull/37749.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37749.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": "i-be-snek",
"id": 94386553,
"node_id": "U_kgDOBaA5eQ",
"avatar_url": "https://avatars.githubusercontent.com/u/94386553?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/i-be-snek",
"html_url": "https://github.com/i-be-snek",
"followers_url": "https://api.github.com/users/i-be-snek/followers",
"following_url": "https://api.github.com/users/i-be-snek/following{/other_user}",
"gists_url": "https://api.github.com/users/i-be-snek/gists{/gist_id}",
"starred_url": "https://api.github.com/users/i-be-snek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/i-be-snek/subscriptions",
"organizations_url": "https://api.github.com/users/i-be-snek/orgs",
"repos_url": "https://api.github.com/users/i-be-snek/repos",
"events_url": "https://api.github.com/users/i-be-snek/events{/privacy}",
"received_events_url": "https://api.github.com/users/i-be-snek/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37749/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37749/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37748 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37748/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37748/comments | https://api.github.com/repos/huggingface/transformers/issues/37748/events | https://github.com/huggingface/transformers/issues/37748 | 3,016,930,491 | I_kwDOCUB6oc6z0rS7 | 37,748 | Performance degradation on certain vision models from v4.51.* | {
"login": "yuan-thomas",
"id": 37086040,
"node_id": "MDQ6VXNlcjM3MDg2MDQw",
"avatar_url": "https://avatars.githubusercontent.com/u/37086040?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/yuan-thomas",
"html_url": "https://github.com/yuan-thomas",
"followers_url": "https://api.github.com/users/yuan-thomas/followers",
"following_url": "https://api.github.com/users/yuan-thomas/following{/other_user}",
"gists_url": "https://api.github.com/users/yuan-thomas/gists{/gist_id}",
"starred_url": "https://api.github.com/users/yuan-thomas/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yuan-thomas/subscriptions",
"organizations_url": "https://api.github.com/users/yuan-thomas/orgs",
"repos_url": "https://api.github.com/users/yuan-thomas/repos",
"events_url": "https://api.github.com/users/yuan-thomas/events{/privacy}",
"received_events_url": "https://api.github.com/users/yuan-thomas/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-04-24T11:24:43 | 2025-05-09T16:44:30 | 2025-05-09T16:44:30 | NONE | null | null | null | null | ### System Info
- `transformers` version: 4.51.3
- Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.39
- Python version: 3.12.3
- 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.0a0+7c8ec84dab.nv25.03 (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?: No
- Using GPU in script?: Yes
- GPU type: NVIDIA GeForce RTX 3070 Laptop GPU
### Who can help?
vision models: @amyeroberts, @qubvel
### Information
- [x] The official example scripts
- [x] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
Run this script:
```py
from transformers import AutoImageProcessor, ConvNextV2Model
import torch
import torch.nn as nn
import time
from datasets import load_dataset
dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]
image_processor = AutoImageProcessor.from_pretrained("facebook/convnextv2-large-1k-224")
model = ConvNextV2Model.from_pretrained("facebook/convnextv2-large-1k-224")
inputs = image_processor(image, return_tensors="pt")
start_time = time.time()
model.train()
logits = model(**inputs).last_hidden_state.mean(dim=1) # [batch_size, hidden_size]
criterion = nn.BCEWithLogitsLoss()
fake_logits = torch.randn_like(logits)
loss = criterion(logits, fake_logits)
loss.backward()
print(time.time() - start_time)
```
### Expected behavior
It seems there is performance degradation between version 4.50.* and 4.51.*. Tried pytorch version 2.4 & 2.7.
In my testing, 4.51.* is about 4x slower than the previous version. Using the script attached:
- 4.50.* uses 1.1s
- 4.51.* uses 4.5s | {
"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/37748/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37748/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/37747 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37747/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37747/comments | https://api.github.com/repos/huggingface/transformers/issues/37747/events | https://github.com/huggingface/transformers/pull/37747 | 3,016,903,476 | PR_kwDOCUB6oc6Tv3ei | 37,747 | updated hidden_features for FlaxDinov2SwiGLUFFN in Dinov2 | {
"login": "premmurugan229",
"id": 44919870,
"node_id": "MDQ6VXNlcjQ0OTE5ODcw",
"avatar_url": "https://avatars.githubusercontent.com/u/44919870?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/premmurugan229",
"html_url": "https://github.com/premmurugan229",
"followers_url": "https://api.github.com/users/premmurugan229/followers",
"following_url": "https://api.github.com/users/premmurugan229/following{/other_user}",
"gists_url": "https://api.github.com/users/premmurugan229/gists{/gist_id}",
"starred_url": "https://api.github.com/users/premmurugan229/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/premmurugan229/subscriptions",
"organizations_url": "https://api.github.com/users/premmurugan229/orgs",
"repos_url": "https://api.github.com/users/premmurugan229/repos",
"events_url": "https://api.github.com/users/premmurugan229/events{/privacy}",
"received_events_url": "https://api.github.com/users/premmurugan229/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T11:13:43 | 2025-04-24T13:30:32 | 2025-04-24T13:30:32 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37747",
"html_url": "https://github.com/huggingface/transformers/pull/37747",
"diff_url": "https://github.com/huggingface/transformers/pull/37747.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37747.patch",
"merged_at": "2025-04-24T13:30:32"
} | # What does this PR do?
Fixes #37745
## Changes made
[FlaxDinov2SwiGLUFFN](https://github.com/huggingface/transformers/blob/b6d65e40b256d98d9621707762b94bc8ad83b7a7/src/transformers/models/dinov2/modeling_flax_dinov2.py#L400) has only 2 attributes (config,dtype). It doesn't have hidden_features attribute. So, the previously calculated hidden_feature value is used. This change removes the error faced in the above linked issue
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [ ] 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?
@gante @Rocketknight1 | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37747/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37747/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37746 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37746/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37746/comments | https://api.github.com/repos/huggingface/transformers/issues/37746/events | https://github.com/huggingface/transformers/pull/37746 | 3,016,900,434 | PR_kwDOCUB6oc6Tv20S | 37,746 | Skip all `AriaForConditionalGenerationIntegrationTest` on `T4` | {
"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-04-24T11:12:24 | 2025-04-30T15:17:37 | 2025-04-24T12:11:56 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37746",
"html_url": "https://github.com/huggingface/transformers/pull/37746",
"diff_url": "https://github.com/huggingface/transformers/pull/37746.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37746.patch",
"merged_at": "2025-04-24T12:11:56"
} | # What does this PR do?
Follow up of [this commment](https://github.com/huggingface/transformers/pull/37444#issuecomment-2801489013)
Skip all `AriaForConditionalGenerationIntegrationTest` except `test_tokenizer_integration` on `T4` runner.
These tests uses [this repository](https://huggingface.co/rhymes-ai/Aria/tree/main) that doesn't fit into T4 or even A10, even using `load_in_4bit=True`.
(The `require_torch_large_accelerator` or `require_torch_large_gpu` is not well-written to specify the min. memory requirement despite it has an argument `memory`.)
| {
"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/37746/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37746/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37745 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37745/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37745/comments | https://api.github.com/repos/huggingface/transformers/issues/37745/events | https://github.com/huggingface/transformers/issues/37745 | 3,016,813,615 | I_kwDOCUB6oc6z0Owv | 37,745 | Facing AttributeError: "FlaxDinov2SwiGLUFFN" object has no attribute "hidden_features". | {
"login": "premmurugan229",
"id": 44919870,
"node_id": "MDQ6VXNlcjQ0OTE5ODcw",
"avatar_url": "https://avatars.githubusercontent.com/u/44919870?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/premmurugan229",
"html_url": "https://github.com/premmurugan229",
"followers_url": "https://api.github.com/users/premmurugan229/followers",
"following_url": "https://api.github.com/users/premmurugan229/following{/other_user}",
"gists_url": "https://api.github.com/users/premmurugan229/gists{/gist_id}",
"starred_url": "https://api.github.com/users/premmurugan229/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/premmurugan229/subscriptions",
"organizations_url": "https://api.github.com/users/premmurugan229/orgs",
"repos_url": "https://api.github.com/users/premmurugan229/repos",
"events_url": "https://api.github.com/users/premmurugan229/events{/privacy}",
"received_events_url": "https://api.github.com/users/premmurugan229/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-04-24T10:38:02 | 2025-04-24T14:34:10 | 2025-04-24T13:30:33 | CONTRIBUTOR | null | null | null | null | ### System Info
While running Dinov2 model in Flax for giant variant, I am encountering an error as
> AttributeError: "FlaxDinov2SwiGLUFFN" object has no attribute "hidden_features".
There should be a typo [here](https://github.com/huggingface/transformers/blob/72e4844059cf0d7d01f0dfca20a9834cef82c133/src/transformers/models/dinov2/modeling_flax_dinov2.py#L406).
FlaxDinov2SwiGLUFFN config doesn't have hidden_features attribute. Instead we should use the previously calculated hidden_feature value.
#### I would like to contribute for this issue.
My environment details are as below :
> transformers version: 4.51.3
> Platform: Linux-5.4.0-212-generic-x86_64-with-glibc2.35
> Python version: 3.10.12
> 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.6.0+cu124 (False)
> Tensorflow version (GPU?): not installed (NA)
> Flax version (CPU?/GPU?/TPU?): 0.10.4 (cpu)
> Jax version: 0.5.0
> JaxLib version: 0.5.0
I am attaching screenshot for reference

### Who can help?
@gante @Rocketknight1
This issue is faced for Flax implementation of Dinov2 variant
### 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
Steps to recreate the error:
run the below code in any python editor
```
from transformers import AutoImageProcessor, FlaxDinov2ForImageClassification
from PIL import Image
import jax
import requests
url = "[http://images.cocodataset.org/val2017/000000039769.jpg"](http://images.cocodataset.org/val2017/000000039769.jpg%22)
image = Image.open(requests.get(url, stream=True).raw)
image_processor = AutoImageProcessor.from_pretrained("facebook/dinov2-giant")
model = FlaxDinov2ForImageClassification.from_pretrained("facebook/dinov2-giant", from_pt=True)
```
### Expected behavior
The model should run and produce an error free output with basic example | {
"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/37745/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37745/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/37744 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37744/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37744/comments | https://api.github.com/repos/huggingface/transformers/issues/37744/events | https://github.com/huggingface/transformers/issues/37744 | 3,016,789,722 | I_kwDOCUB6oc6z0I7a | 37,744 | 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-04-24T10:30:18 | 2025-08-01T14:43:24 | 2025-08-01T14:43:24 | CONTRIBUTOR | null | null | null | null | ### Model description
Hi,
MM Grounding DINO is MMDetection's implementation of Grounding DINO. It improves zero-shot detection performance quite a bit (especially on LVIS) and is very similar to the original Grounding DINO implementation-wise. I'm mostly interested in it because they also have checkpoints for models with higher resolution FPN features, which are not available for the original model.
The model also appears to be the same inference-wise as LLMDet (#37334), so this could be a good stepping stone for that one.
### Open source status
- [x] The model implementation is available
- [x] The model weights are available
### Provide useful links for the implementation
Weights and implementation are available in MMDetection [here](https://github.com/open-mmlab/mmdetection/blob/main/configs/mm_grounding_dino/README.md).
I've already started working on porting the model with modular transformers, so I can open a draft PR if you want. | {
"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/37744/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37744/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/37743 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37743/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37743/comments | https://api.github.com/repos/huggingface/transformers/issues/37743/events | https://github.com/huggingface/transformers/pull/37743 | 3,016,752,790 | PR_kwDOCUB6oc6TvWLR | 37,743 | [VLMs] add helpers to get multimodal encodings | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T10:19:02 | 2025-05-16T11:20:10 | 2025-05-16T11:20:10 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37743",
"html_url": "https://github.com/huggingface/transformers/pull/37743",
"diff_url": "https://github.com/huggingface/transformers/pull/37743.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37743.patch",
"merged_at": "2025-05-16T11:20:10"
} | # What does this PR do?
As per title, makes it available in all VLMs where it was not added. This PR is another small part of vLLM integration for multimodality
Would be nice to update a few audio LLMs we have, but qwen2-audio is a mess and we can update it only after cleaning up deprecations. Granite Speech is already updated, cool | {
"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/37743/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37743/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37742 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37742/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37742/comments | https://api.github.com/repos/huggingface/transformers/issues/37742/events | https://github.com/huggingface/transformers/pull/37742 | 3,016,698,675 | PR_kwDOCUB6oc6TvKgS | 37,742 | Add Bitnet model | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-04-24T09:57:41 | 2025-04-29T08:49:45 | 2025-04-28T13:08:48 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37742",
"html_url": "https://github.com/huggingface/transformers/pull/37742",
"diff_url": "https://github.com/huggingface/transformers/pull/37742.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37742.patch",
"merged_at": "2025-04-28T13:08:48"
} | # What does this PR do?
This PR complements the BitNet integration introduced in [#37503](https://github.com/huggingface/transformers/pull/37503) created and refined by @shumingma, addressing the remaining review comments ahead of merging.
| {
"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/37742/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37742/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37741 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37741/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37741/comments | https://api.github.com/repos/huggingface/transformers/issues/37741/events | https://github.com/huggingface/transformers/pull/37741 | 3,016,674,914 | PR_kwDOCUB6oc6TvFRR | 37,741 | change XLA deprecated api | {
"login": "SunMarc",
"id": 57196510,
"node_id": "MDQ6VXNlcjU3MTk2NTEw",
"avatar_url": "https://avatars.githubusercontent.com/u/57196510?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SunMarc",
"html_url": "https://github.com/SunMarc",
"followers_url": "https://api.github.com/users/SunMarc/followers",
"following_url": "https://api.github.com/users/SunMarc/following{/other_user}",
"gists_url": "https://api.github.com/users/SunMarc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SunMarc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SunMarc/subscriptions",
"organizations_url": "https://api.github.com/users/SunMarc/orgs",
"repos_url": "https://api.github.com/users/SunMarc/repos",
"events_url": "https://api.github.com/users/SunMarc/events{/privacy}",
"received_events_url": "https://api.github.com/users/SunMarc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T09:48:57 | 2025-04-28T14:27:44 | 2025-04-28T14:27:42 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37741",
"html_url": "https://github.com/huggingface/transformers/pull/37741",
"diff_url": "https://github.com/huggingface/transformers/pull/37741.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37741.patch",
"merged_at": "2025-04-28T14:27:42"
} | # What does this PR do?
Fixes https://github.com/huggingface/transformers/issues/37301
In torch-xla version 2.7, `xm.xrt_world_size()` is replaced by `xr.world_size() `and `xm.get_ordinal()` is replaced by `xr.global_ordinal()`
Should be safe to switch since it was added in the torch_xla 2.1 release https://github.com/pytorch/xla/pull/5011 and we enforce users to use torch 2.1 minimum
Not sure what to do with XLA_USE_BF16 and XLA_DOWNCAST_BF16 starting from 2.7. We rely on these for `get_parameter_dtype`.
| {
"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/37741/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37741/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37740 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37740/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37740/comments | https://api.github.com/repos/huggingface/transformers/issues/37740/events | https://github.com/huggingface/transformers/pull/37740 | 3,016,668,172 | PR_kwDOCUB6oc6TvDyH | 37,740 | Correctly raise errors when downloading tokenizer files | {
"login": "Cyrilvallez",
"id": 71554963,
"node_id": "MDQ6VXNlcjcxNTU0OTYz",
"avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Cyrilvallez",
"html_url": "https://github.com/Cyrilvallez",
"followers_url": "https://api.github.com/users/Cyrilvallez/followers",
"following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}",
"gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions",
"organizations_url": "https://api.github.com/users/Cyrilvallez/orgs",
"repos_url": "https://api.github.com/users/Cyrilvallez/repos",
"events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}",
"received_events_url": "https://api.github.com/users/Cyrilvallez/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T09:46:25 | 2025-04-24T10:53:08 | 2025-04-24T10:53:07 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37740",
"html_url": "https://github.com/huggingface/transformers/pull/37740",
"diff_url": "https://github.com/huggingface/transformers/pull/37740.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37740.patch",
"merged_at": "2025-04-24T10:53:07"
} | # What does this PR do?
As per the title. If an error arises in the middle of downloading tokenizer files, it was not properly raised and would propagate `None` values instead (because the check was performed on all files, i.e. aither they all pass or they all miss, but we may fail in the middle due to e.g. timeout) | {
"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/37740/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37740/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37739 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37739/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37739/comments | https://api.github.com/repos/huggingface/transformers/issues/37739/events | https://github.com/huggingface/transformers/pull/37739 | 3,016,644,847 | PR_kwDOCUB6oc6Tu-qV | 37,739 | Fix `embeds_to_talker` device in Qwen2.5-Omni | {
"login": "BakerBunker",
"id": 17872844,
"node_id": "MDQ6VXNlcjE3ODcyODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/17872844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BakerBunker",
"html_url": "https://github.com/BakerBunker",
"followers_url": "https://api.github.com/users/BakerBunker/followers",
"following_url": "https://api.github.com/users/BakerBunker/following{/other_user}",
"gists_url": "https://api.github.com/users/BakerBunker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BakerBunker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BakerBunker/subscriptions",
"organizations_url": "https://api.github.com/users/BakerBunker/orgs",
"repos_url": "https://api.github.com/users/BakerBunker/repos",
"events_url": "https://api.github.com/users/BakerBunker/events{/privacy}",
"received_events_url": "https://api.github.com/users/BakerBunker/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T09:37:42 | 2025-04-24T10:49:58 | 2025-04-24T10:49:57 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37739",
"html_url": "https://github.com/huggingface/transformers/pull/37739",
"diff_url": "https://github.com/huggingface/transformers/pull/37739.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37739.patch",
"merged_at": "2025-04-24T10:49:57"
} | # 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 `embeds_to_talker` device in Qwen2.5-Omni
## 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.
cc @zucchini-nlp
<!-- 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": "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/37739/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37739/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37738 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37738/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37738/comments | https://api.github.com/repos/huggingface/transformers/issues/37738/events | https://github.com/huggingface/transformers/pull/37738 | 3,016,595,421 | PR_kwDOCUB6oc6Tuz_y | 37,738 | fix:fix model loading issue when WORLD_SIZE env set(#37737). | {
"login": "nv-guomingz",
"id": 137257613,
"node_id": "U_kgDOCC5ijQ",
"avatar_url": "https://avatars.githubusercontent.com/u/137257613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nv-guomingz",
"html_url": "https://github.com/nv-guomingz",
"followers_url": "https://api.github.com/users/nv-guomingz/followers",
"following_url": "https://api.github.com/users/nv-guomingz/following{/other_user}",
"gists_url": "https://api.github.com/users/nv-guomingz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nv-guomingz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nv-guomingz/subscriptions",
"organizations_url": "https://api.github.com/users/nv-guomingz/orgs",
"repos_url": "https://api.github.com/users/nv-guomingz/repos",
"events_url": "https://api.github.com/users/nv-guomingz/events{/privacy}",
"received_events_url": "https://api.github.com/users/nv-guomingz/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T09:19:20 | 2025-04-24T14:39:23 | 2025-04-24T14:39:22 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37738",
"html_url": "https://github.com/huggingface/transformers/pull/37738",
"diff_url": "https://github.com/huggingface/transformers/pull/37738.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37738.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": "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/37738/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37738/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37737 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37737/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37737/comments | https://api.github.com/repos/huggingface/transformers/issues/37737/events | https://github.com/huggingface/transformers/issues/37737 | 3,016,551,507 | I_kwDOCUB6oc6zzOxT | 37,737 | Failed to load model with transformers 4.51.3 when WORLD_SIZE set to 1 on nvidia gpu | {
"login": "nv-guomingz",
"id": 137257613,
"node_id": "U_kgDOCC5ijQ",
"avatar_url": "https://avatars.githubusercontent.com/u/137257613?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nv-guomingz",
"html_url": "https://github.com/nv-guomingz",
"followers_url": "https://api.github.com/users/nv-guomingz/followers",
"following_url": "https://api.github.com/users/nv-guomingz/following{/other_user}",
"gists_url": "https://api.github.com/users/nv-guomingz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nv-guomingz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nv-guomingz/subscriptions",
"organizations_url": "https://api.github.com/users/nv-guomingz/orgs",
"repos_url": "https://api.github.com/users/nv-guomingz/repos",
"events_url": "https://api.github.com/users/nv-guomingz/events{/privacy}",
"received_events_url": "https://api.github.com/users/nv-guomingz/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-04-24T09:02:24 | 2025-06-02T08:03:05 | 2025-06-02T08:03:05 | CONTRIBUTOR | null | null | null | null | ### System Info
Hi, I just installed transformers 4.51.3 on linux system with nvidia gpu.
When I tried to run below code snippet
```python
import transformers
model = transformers.AutoModelForCausalLM.from_pretrained('openai-community/gpt2-medium', device_map='auto')
```
I got below error message:
```bash
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 572, in from_pretrained
[rank0]: return model_class.from_pretrained(
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 279, in _wrapper
[rank0]: return func(*args, **kwargs)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4399, in from_pretrained
[rank0]: ) = cls._load_pretrained_model(
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/home/guomingz/.local/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4903, in _load_pretrained_model
[rank0]: param.to(tp_device),
[rank0]: ^^^^^^^^^^^^^^^^^^^
[rank0]: NotImplementedError: Cannot copy out of meta tensor; no data!
[rank0]:[W424 08:46:08.832753922 ProcessGroupNCCL.cpp:1497] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
```
If I unset **WORLD_SIZE**, the above code snippet could run succesfully.
It looks like the issue related with new feature introduced in 4.50.0 [Tensor Parallelism implementation changes](https://github.com/huggingface/transformers/pull/35996)
Could u please take a look on this case? Thanks. I also filed one draft PR https://github.com/huggingface/transformers/pull/37738 which fixes above issue, could u please review that PR?
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
1. Install transformers 4.51.3 via `pip install transformers`
2. Run below code snippet
`import transformers
model = transformers.AutoModelForCausalLM.from_pretrained('openai-community/gpt2-medium', device_map='auto')`
### Expected behavior
Load model sucessfully. | {
"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/37737/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37737/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/37736 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37736/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37736/comments | https://api.github.com/repos/huggingface/transformers/issues/37736/events | https://github.com/huggingface/transformers/issues/37736 | 3,016,463,645 | I_kwDOCUB6oc6zy5Ud | 37,736 | ValueError: GGUF model with architecture deci is not supported yet. | {
"login": "iEddie-cmd",
"id": 68989637,
"node_id": "MDQ6VXNlcjY4OTg5NjM3",
"avatar_url": "https://avatars.githubusercontent.com/u/68989637?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/iEddie-cmd",
"html_url": "https://github.com/iEddie-cmd",
"followers_url": "https://api.github.com/users/iEddie-cmd/followers",
"following_url": "https://api.github.com/users/iEddie-cmd/following{/other_user}",
"gists_url": "https://api.github.com/users/iEddie-cmd/gists{/gist_id}",
"starred_url": "https://api.github.com/users/iEddie-cmd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/iEddie-cmd/subscriptions",
"organizations_url": "https://api.github.com/users/iEddie-cmd/orgs",
"repos_url": "https://api.github.com/users/iEddie-cmd/repos",
"events_url": "https://api.github.com/users/iEddie-cmd/events{/privacy}",
"received_events_url": "https://api.github.com/users/iEddie-cmd/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-04-24T08:29:20 | 2025-08-26T13:43:18 | 2025-08-26T13:43:18 | NONE | null | null | null | null | ### Feature request
ValueError: GGUF model with architecture deci is not supported yet.
### Motivation
ValueError: GGUF model with architecture deci is not supported yet. (Nvidia Nemotron 2025)
### Your contribution
I could help in maybe programming | {
"login": "Isotr0py",
"id": 41363108,
"node_id": "MDQ6VXNlcjQxMzYzMTA4",
"avatar_url": "https://avatars.githubusercontent.com/u/41363108?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Isotr0py",
"html_url": "https://github.com/Isotr0py",
"followers_url": "https://api.github.com/users/Isotr0py/followers",
"following_url": "https://api.github.com/users/Isotr0py/following{/other_user}",
"gists_url": "https://api.github.com/users/Isotr0py/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Isotr0py/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Isotr0py/subscriptions",
"organizations_url": "https://api.github.com/users/Isotr0py/orgs",
"repos_url": "https://api.github.com/users/Isotr0py/repos",
"events_url": "https://api.github.com/users/Isotr0py/events{/privacy}",
"received_events_url": "https://api.github.com/users/Isotr0py/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37736/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37736/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/37735 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37735/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37735/comments | https://api.github.com/repos/huggingface/transformers/issues/37735/events | https://github.com/huggingface/transformers/pull/37735 | 3,016,345,337 | PR_kwDOCUB6oc6Tt9-Y | 37,735 | Fix Float64 RuntimeError on Integrated Graphics when using DirectML | {
"login": "chn-lee-yumi",
"id": 20398519,
"node_id": "MDQ6VXNlcjIwMzk4NTE5",
"avatar_url": "https://avatars.githubusercontent.com/u/20398519?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/chn-lee-yumi",
"html_url": "https://github.com/chn-lee-yumi",
"followers_url": "https://api.github.com/users/chn-lee-yumi/followers",
"following_url": "https://api.github.com/users/chn-lee-yumi/following{/other_user}",
"gists_url": "https://api.github.com/users/chn-lee-yumi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/chn-lee-yumi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chn-lee-yumi/subscriptions",
"organizations_url": "https://api.github.com/users/chn-lee-yumi/orgs",
"repos_url": "https://api.github.com/users/chn-lee-yumi/repos",
"events_url": "https://api.github.com/users/chn-lee-yumi/events{/privacy}",
"received_events_url": "https://api.github.com/users/chn-lee-yumi/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T07:43:49 | 2025-07-24T00:42:47 | 2025-07-24T00:42:46 | NONE | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37735",
"html_url": "https://github.com/huggingface/transformers/pull/37735",
"diff_url": "https://github.com/huggingface/transformers/pull/37735.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37735.patch",
"merged_at": null
} | # What does this PR do?
Fix Float64 RuntimeError on Integrated Graphics when using DirectML:
```
File "C:\Users\xxx\Downloads\MaterialSearchWindowsLarge\MaterialSearchWindows\Lib\site-packages\transformers\models\chinese_clip\modeling_chinese_clip.py", line 1277, in forward
extended_attention_mask: torch.Tensor = self.get_extended_attention_mask(attention_mask, input_shape)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxx\Downloads\MaterialSearchWindowsLarge\MaterialSearchWindows\Lib\site-packages\transformers\modeling_utils.py", line 1603, in get_extended_attention_mask
extended_attention_mask = (1.0 - extended_attention_mask) * torch.finfo(dtype).min
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
File "C:\Users\xxx\Downloads\MaterialSearchWindowsLarge\MaterialSearchWindows\Lib\site-packages\torch\_tensor.py", line 41, in wrapped
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "C:\Users\xxx\Downloads\MaterialSearchWindowsLarge\MaterialSearchWindows\Lib\site-packages\torch\_tensor.py", line 962, in __rsub__
return _C._VariableFunctions.rsub(self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The GPU device does not support Double (Float64) operations!
```
Even though `extended_attention_mask` is of type `Float32`, the literal `1.0` in Python is treated as a `Double`. As a result, the expression `1.0 - extended_attention_mask` is promoted to a `Float64` operation, which will trigger a `RuntimeError` if the device does not support `Float64`.
To avoid this error, `1.0` should be cast to a tensor with the correct `dtype`.
@ydshieh | {
"login": "chn-lee-yumi",
"id": 20398519,
"node_id": "MDQ6VXNlcjIwMzk4NTE5",
"avatar_url": "https://avatars.githubusercontent.com/u/20398519?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/chn-lee-yumi",
"html_url": "https://github.com/chn-lee-yumi",
"followers_url": "https://api.github.com/users/chn-lee-yumi/followers",
"following_url": "https://api.github.com/users/chn-lee-yumi/following{/other_user}",
"gists_url": "https://api.github.com/users/chn-lee-yumi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/chn-lee-yumi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chn-lee-yumi/subscriptions",
"organizations_url": "https://api.github.com/users/chn-lee-yumi/orgs",
"repos_url": "https://api.github.com/users/chn-lee-yumi/repos",
"events_url": "https://api.github.com/users/chn-lee-yumi/events{/privacy}",
"received_events_url": "https://api.github.com/users/chn-lee-yumi/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37735/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37735/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37734 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37734/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37734/comments | https://api.github.com/repos/huggingface/transformers/issues/37734/events | https://github.com/huggingface/transformers/issues/37734 | 3,016,209,496 | I_kwDOCUB6oc6zx7RY | 37,734 | `tokenizer` is still being used in `Trainer` instead of `processing_class` | {
"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-04-24T06:54:53 | 2025-04-25T19:03:14 | 2025-04-25T19:03:14 | CONTRIBUTOR | null | null | null | null | In the [`Fine-tuning a model with the Trainer API` page](https://huggingface.co/learn/llm-course/chapter3/3?fw=pt), either in the documentation or the notebook, we are told to use the `tokenizer` parameter when initializing the `Trainer` class.

But the `tokenizer` parameter has been deprecated. We should use the `processing_class` parameter.
@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/37734/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37734/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/37732 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37732/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37732/comments | https://api.github.com/repos/huggingface/transformers/issues/37732/events | https://github.com/huggingface/transformers/pull/37732 | 3,015,996,360 | PR_kwDOCUB6oc6Tsylf | 37,732 | Support FlaxPreTrainedModel to load model checkpoint from local subfolder safetensors | {
"login": "Melody-coder923",
"id": 193462815,
"node_id": "U_kgDOC4gCHw",
"avatar_url": "https://avatars.githubusercontent.com/u/193462815?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Melody-coder923",
"html_url": "https://github.com/Melody-coder923",
"followers_url": "https://api.github.com/users/Melody-coder923/followers",
"following_url": "https://api.github.com/users/Melody-coder923/following{/other_user}",
"gists_url": "https://api.github.com/users/Melody-coder923/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Melody-coder923/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Melody-coder923/subscriptions",
"organizations_url": "https://api.github.com/users/Melody-coder923/orgs",
"repos_url": "https://api.github.com/users/Melody-coder923/repos",
"events_url": "https://api.github.com/users/Melody-coder923/events{/privacy}",
"received_events_url": "https://api.github.com/users/Melody-coder923/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": ""
}
] | closed | false | null | [] | null | [] | 2025-04-24T04:52:56 | 2025-04-30T14:13:24 | 2025-04-30T14:13:23 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37732",
"html_url": "https://github.com/huggingface/transformers/pull/37732",
"diff_url": "https://github.com/huggingface/transformers/pull/37732.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37732.patch",
"merged_at": "2025-04-30T14:13:23"
} |
# What does this PR do?
Add support for loading FlaxpreTrainedModel checkpoint in safetensor format from subfolder in local directory.
<!--
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 #19603
## 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.
@gante and @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": "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/37732/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37732/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37731 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37731/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37731/comments | https://api.github.com/repos/huggingface/transformers/issues/37731/events | https://github.com/huggingface/transformers/issues/37731 | 3,015,979,481 | I_kwDOCUB6oc6zxDHZ | 37,731 | Facing "NotImplementedError: ``config.do_stable_layer_norm is False`` is currently not supported" in FlaxWav2vec2Models | {
"login": "premmurugan229",
"id": 44919870,
"node_id": "MDQ6VXNlcjQ0OTE5ODcw",
"avatar_url": "https://avatars.githubusercontent.com/u/44919870?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/premmurugan229",
"html_url": "https://github.com/premmurugan229",
"followers_url": "https://api.github.com/users/premmurugan229/followers",
"following_url": "https://api.github.com/users/premmurugan229/following{/other_user}",
"gists_url": "https://api.github.com/users/premmurugan229/gists{/gist_id}",
"starred_url": "https://api.github.com/users/premmurugan229/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/premmurugan229/subscriptions",
"organizations_url": "https://api.github.com/users/premmurugan229/orgs",
"repos_url": "https://api.github.com/users/premmurugan229/repos",
"events_url": "https://api.github.com/users/premmurugan229/events{/privacy}",
"received_events_url": "https://api.github.com/users/premmurugan229/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-04-24T04:40:07 | 2025-06-01T08:02:41 | 2025-06-01T08:02:41 | CONTRIBUTOR | null | null | null | null | ### System Info
While running Flax Wav2Vec2 models like **FlaxWav2Vec2Model**, **FlaxWav2Vec2ForCTC,** **FlaxWav2Vec2ForPreTraining** , I am encountering an error as
`NotImplementedError: ``config.do_stable_layer_norm is False`` is currently not supported"`
when config.do_stable_layer_norm is False, currently [there is no implementation](https://github.com/huggingface/transformers/blob/b6d65e40b256d98d9621707762b94bc8ad83b7a7/src/transformers/models/wav2vec2/modeling_flax_wav2vec2.py#L953)
but, by default **config.do_stable_layer_norm** is False [Reference](https://github.com/huggingface/transformers/blob/b6d65e40b256d98d9621707762b94bc8ad83b7a7/src/transformers/models/wav2vec2/configuration_wav2vec2.py#L98)
We need to implement this, since mostly **do_stable_layer_norm** value is false. We might get this error frequently
System Info
My environment details are as below :
> - `transformers` version: 4.51.3
> - Platform: Linux-5.4.0-212-generic-x86_64-with-glibc2.35
> - Python version: 3.10.12
> - 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.6.0+cu124 (False)
> - Tensorflow version (GPU?): not installed (NA)
> - Flax version (CPU?/GPU?/TPU?): 0.10.4 (cpu)
> - Jax version: 0.5.0
> - JaxLib version: 0.5.0
I am attaching screenshot for reference
<img width="1665" alt="Image" src="https://github.com/user-attachments/assets/d4aa125a-c34b-4613-a9ad-a5cd74b54cd6" />
<img width="1657" alt="Image" src="https://github.com/user-attachments/assets/9f2cec28-b986-40b1-8d9e-ade447cbc968" />
<img width="1660" alt="Image" src="https://github.com/user-attachments/assets/01cc9964-844e-4275-bfa6-115e76839a74" />
### Who can help?
@gante @Rocketknight1
I am facing issue for Flax models like
> **FlaxWav2Vec2Model**
> **FlaxWav2Vec2ForCTC**
> **FlaxWav2Vec2ForPreTraining**
### 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
Steps to recreate the error:
Run the below code in any python editor
```
from transformers import AutoProcessor, FlaxWav2Vec2Model
processor = AutoProcessor.from_pretrained("facebook/wav2vec2-base-960h")
model = FlaxWav2Vec2Model.from_pretrained("facebook/wav2vec2-base-960h", from_pt= True)
```
### Expected behavior
The model should run and produce an error free output with the basic examples | {
"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/37731/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37731/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/37730 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37730/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37730/comments | https://api.github.com/repos/huggingface/transformers/issues/37730/events | https://github.com/huggingface/transformers/issues/37730 | 3,015,893,106 | I_kwDOCUB6oc6zwuBy | 37,730 | [predict or eval error] There are cases where an error occurs when `preprocess_logits_for_metrics` and `gather_function` are executed. | {
"login": "YooSungHyun",
"id": 34292279,
"node_id": "MDQ6VXNlcjM0MjkyMjc5",
"avatar_url": "https://avatars.githubusercontent.com/u/34292279?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/YooSungHyun",
"html_url": "https://github.com/YooSungHyun",
"followers_url": "https://api.github.com/users/YooSungHyun/followers",
"following_url": "https://api.github.com/users/YooSungHyun/following{/other_user}",
"gists_url": "https://api.github.com/users/YooSungHyun/gists{/gist_id}",
"starred_url": "https://api.github.com/users/YooSungHyun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/YooSungHyun/subscriptions",
"organizations_url": "https://api.github.com/users/YooSungHyun/orgs",
"repos_url": "https://api.github.com/users/YooSungHyun/repos",
"events_url": "https://api.github.com/users/YooSungHyun/events{/privacy}",
"received_events_url": "https://api.github.com/users/YooSungHyun/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-04-24T04:02:22 | 2025-04-24T04:55:13 | 2025-04-24T04:55:12 | NONE | null | null | null | null | ### System Info
<img width="619" alt="Image" src="https://github.com/user-attachments/assets/ca71a30e-6fde-4488-ad6f-f98e83247681" />
If I move the logits to the CPU in `preprocess_logits_for_metrics` due to GPU memory issues, it can cause an error in `gather_function`.
This happens because the tensors are no longer distributed across CUDA devices.
I think there should be a condition like `if logits.is_cuda:` to handle this properly.
Should I contribute a fix for this?
You can reproduce the issue by using the following code and running `predict()`:
```python
def preprocess_logits_for_metrics(logits, labels):
return logits.to("cpu")
```
### Who can help?
@zach-huggingface @SunMarc
### Information
- [x] The official example scripts
- [x] My own modified scripts
### Tasks
- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
```python
def preprocess_logits_for_metrics(logits, labels):
return logits.to("cpu")
```
run trainer.predict()
### Expected behavior
predict success | {
"login": "YooSungHyun",
"id": 34292279,
"node_id": "MDQ6VXNlcjM0MjkyMjc5",
"avatar_url": "https://avatars.githubusercontent.com/u/34292279?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/YooSungHyun",
"html_url": "https://github.com/YooSungHyun",
"followers_url": "https://api.github.com/users/YooSungHyun/followers",
"following_url": "https://api.github.com/users/YooSungHyun/following{/other_user}",
"gists_url": "https://api.github.com/users/YooSungHyun/gists{/gist_id}",
"starred_url": "https://api.github.com/users/YooSungHyun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/YooSungHyun/subscriptions",
"organizations_url": "https://api.github.com/users/YooSungHyun/orgs",
"repos_url": "https://api.github.com/users/YooSungHyun/repos",
"events_url": "https://api.github.com/users/YooSungHyun/events{/privacy}",
"received_events_url": "https://api.github.com/users/YooSungHyun/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37730/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37730/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/37729 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37729/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37729/comments | https://api.github.com/repos/huggingface/transformers/issues/37729/events | https://github.com/huggingface/transformers/pull/37729 | 3,015,888,393 | PR_kwDOCUB6oc6Tsaci | 37,729 | Fix wrong input shapes in doc-string of models | {
"login": "kkew3",
"id": 13264071,
"node_id": "MDQ6VXNlcjEzMjY0MDcx",
"avatar_url": "https://avatars.githubusercontent.com/u/13264071?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kkew3",
"html_url": "https://github.com/kkew3",
"followers_url": "https://api.github.com/users/kkew3/followers",
"following_url": "https://api.github.com/users/kkew3/following{/other_user}",
"gists_url": "https://api.github.com/users/kkew3/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kkew3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkew3/subscriptions",
"organizations_url": "https://api.github.com/users/kkew3/orgs",
"repos_url": "https://api.github.com/users/kkew3/repos",
"events_url": "https://api.github.com/users/kkew3/events{/privacy}",
"received_events_url": "https://api.github.com/users/kkew3/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-24T04:00:44 | 2025-04-24T14:45:24 | 2025-04-24T14:36:03 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37729",
"html_url": "https://github.com/huggingface/transformers/pull/37729",
"diff_url": "https://github.com/huggingface/transformers/pull/37729.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37729.patch",
"merged_at": "2025-04-24T14:36:03"
} | # 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 #37702
This PR aims to fix wrong input shapes in the doc-string of several models. For example, the GPT2Model's API [doc](https://huggingface.co/docs/transformers/v4.51.3/model_doc/gpt2#transformers.GPT2Model.forward.position_ids) said
> position_ids (torch.LongTensor of shape (batch_size, sequence_length), optional)
but apparently the length of `position_ids` should be identical to the `input_ids`'s length, i.e. `input_ids_length`.
By searching for keywords like `position_ids`, a (potentially non-exhaustive) list of models containing incorrect input shape doc-strings is found:
- [x] src/transformers/models/clvp/modeling_clvp.py
- [x] src/transformers/models/ctrl/modeling_ctrl.py
- [x] src/transformers/models/ctrl/modeling_tf_ctrl.py
- [ ] src/transformers/models/falcon/modeling_falcon.py
- [x] src/transformers/models/gemma/modeling_flax_gemma.py
- [x] src/transformers/models/gpt2/modeling_flax_gpt2.py
- [x] src/transformers/models/gpt2/modeling_gpt2.py
- [x] src/transformers/models/gpt2/modeling_tf_gpt2.py
- [x] src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py
- [x] src/transformers/models/gpt_neo/modeling_flax_gpt_neo.py
- [x] src/transformers/models/gpt_neo/modeling_gpt_neo.py
- [x] src/transformers/models/gptj/modeling_flax_gptj.py
- [x] src/transformers/models/gptj/modeling_tf_gptj.py
- [x] src/transformers/models/imagegpt/modeling_imagegpt.py
- [x] src/transformers/models/llama/modeling_flax_llama.py
- [x] src/transformers/models/mistral/modeling_flax_mistral.py
- [ ] src/transformers/models/moshi/modeling_moshi.py
where the **unchecked boxes** mean that: there *may* be mistakes, but I either lack the knowledge to verify them, or can't find direct evidence that these are incorrect. From my side, they are not ongoing works; so I didn't tag "[WIP]" to the PR title.
Note on commits: I split the changes into many small commits because I feel it's easier to claim how each change is supported by the code this way. The commits with "possibly" in the title indicate that the evidence that there's mistake is not as strong as the others.
## 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.
- [ ] 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?
It seems to me that the docs under `docs/` folder are overarching description of the models rather than API details. Therefore I didn't touch them.
## 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.
@Rocketknight1, who advised me to open this 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/37729/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37729/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37728 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37728/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37728/comments | https://api.github.com/repos/huggingface/transformers/issues/37728/events | https://github.com/huggingface/transformers/pull/37728 | 3,015,498,825 | PR_kwDOCUB6oc6TrGAH | 37,728 | Gemma3 is Torch Exportable | {
"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-04-23T23:50:18 | 2025-04-28T07:36:47 | 2025-04-28T07:36:47 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37728",
"html_url": "https://github.com/huggingface/transformers/pull/37728",
"diff_url": "https://github.com/huggingface/transformers/pull/37728.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37728.patch",
"merged_at": "2025-04-28T07:36:47"
} | # What does this PR do?
Initial effort to add `torch.expport` support for the Gemma3 model!
Gemma3 provides a 1b variant that is suitable for `ExecuTorch` to bring it for on-device use-case. This PR is focusing on creating the export recipe and validate the exported model can produce same output as eager.
Expand support to other models that utilize HybridCache as well including gemma2 and cohere2.
### End2end Test Validation with Exported Graph
`RUN_SLOW=1 pytest tests/models/gemma3/test_modeling_gemma3.py -s -v -k test_export_text_only_with_hybrid_cache`
```
Export generated texts: 'What is the capital of France?
The capital of France is Paris.
Final Answer: The final answer is $\boxed{Paris'
Eager generated texts: 'What is the capital of France?
The capital of France is Paris.
Final Answer: The final answer is $\boxed{Paris'
PASSED
======================================================= 1 passed, 319 deselected, 108 warnings in 26.95s =======================================================
```
### Ene2end Validation in Optimum-ExecuTorch
<img width="1579" alt="Screenshot 2025-04-24 at 2 01 49 PM" src="https://github.com/user-attachments/assets/f6b135d8-bf58-449a-8d66-38c868a221db" />
## 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. https://github.com/huggingface/transformers/issues/37727
- [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 @qubvel
| {
"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/37728/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37728/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37727 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37727/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37727/comments | https://api.github.com/repos/huggingface/transformers/issues/37727/events | https://github.com/huggingface/transformers/issues/37727 | 3,015,494,568 | I_kwDOCUB6oc6zvMuo | 37,727 | Gemma3 is ExecuTorch compatible | {
"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
} | [
{
"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-04-23T23:48:08 | 2025-04-29T01:27:55 | 2025-04-29T01:27:53 | CONTRIBUTOR | null | null | null | null | ### Feature request
Enable Gemma3 model for ExecuTorch
### Motivation
See details in https://github.com/huggingface/transformers/issues/32253
### Your contribution
Enablement | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37727/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37727/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/37726 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37726/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37726/comments | https://api.github.com/repos/huggingface/transformers/issues/37726/events | https://github.com/huggingface/transformers/pull/37726 | 3,015,005,892 | PR_kwDOCUB6oc6Tpcwx | 37,726 | [Ready to Merge][HFQuantizer] Squelch pydantic warnings | {
"login": "kylesayrs",
"id": 17103692,
"node_id": "MDQ6VXNlcjE3MTAzNjky",
"avatar_url": "https://avatars.githubusercontent.com/u/17103692?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kylesayrs",
"html_url": "https://github.com/kylesayrs",
"followers_url": "https://api.github.com/users/kylesayrs/followers",
"following_url": "https://api.github.com/users/kylesayrs/following{/other_user}",
"gists_url": "https://api.github.com/users/kylesayrs/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kylesayrs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kylesayrs/subscriptions",
"organizations_url": "https://api.github.com/users/kylesayrs/orgs",
"repos_url": "https://api.github.com/users/kylesayrs/repos",
"events_url": "https://api.github.com/users/kylesayrs/events{/privacy}",
"received_events_url": "https://api.github.com/users/kylesayrs/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-23T18:57:36 | 2025-05-05T18:41:22 | 2025-05-05T18:38:49 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37726",
"html_url": "https://github.com/huggingface/transformers/pull/37726",
"diff_url": "https://github.com/huggingface/transformers/pull/37726.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37726.patch",
"merged_at": "2025-05-05T18:38:49"
} | ## Purpose ##
* Reduce pydantic warnings
```
...lib/python3.12/site-packages/transformers/utils/quantization_config.py:1336: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.11/migration/
quantization_config = self.quantization_config.dict()
```
## Changes ##
* Replace `.dict()` with `.model_dump()`
## Reviewers ##
* @SunMarc, @ArthurZucker, @Rocketknight1 | {
"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/37726/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37726/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37725 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37725/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37725/comments | https://api.github.com/repos/huggingface/transformers/issues/37725/events | https://github.com/huggingface/transformers/pull/37725 | 3,014,901,760 | PR_kwDOCUB6oc6TpF8x | 37,725 | fix FSDP + torch.compile bug when saving pretrained model | {
"login": "Joaquinecc",
"id": 12649261,
"node_id": "MDQ6VXNlcjEyNjQ5MjYx",
"avatar_url": "https://avatars.githubusercontent.com/u/12649261?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Joaquinecc",
"html_url": "https://github.com/Joaquinecc",
"followers_url": "https://api.github.com/users/Joaquinecc/followers",
"following_url": "https://api.github.com/users/Joaquinecc/following{/other_user}",
"gists_url": "https://api.github.com/users/Joaquinecc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Joaquinecc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Joaquinecc/subscriptions",
"organizations_url": "https://api.github.com/users/Joaquinecc/orgs",
"repos_url": "https://api.github.com/users/Joaquinecc/repos",
"events_url": "https://api.github.com/users/Joaquinecc/events{/privacy}",
"received_events_url": "https://api.github.com/users/Joaquinecc/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-23T18:19:01 | 2025-07-28T12:55:20 | 2025-05-06T15:51:28 | CONTRIBUTOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37725",
"html_url": "https://github.com/huggingface/transformers/pull/37725",
"diff_url": "https://github.com/huggingface/transformers/pull/37725.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37725.patch",
"merged_at": "2025-05-06T15:51:28"
} | # What does this PR do?
The issue at hand relates to the behavior of `accelerator.unwrap_model` when used with FSDP and `torch.compile`. The problem occurs when the model, wrapped by `torch.compile`, is not unwrapped correctly when saving, leading to a failure to save the model properly. Specifically, the `torch.compile` wrapper isn't removed before saving, causing the model's parameters to be incorrectly modified. The solution to fix the issue was to adjust the `unwrap_model` method to not reapply the `torch.compile` wrapper after FSDP has been applied.
<!--
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 [37519](https://github.com/huggingface/transformers/issues/37519)
## 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).
- [ ] Did you write any new necessary tests?
## Who can review?
@SunMarc @S1ro1 @zach-huggingface
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/37725/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37725/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37724 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37724/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37724/comments | https://api.github.com/repos/huggingface/transformers/issues/37724/events | https://github.com/huggingface/transformers/pull/37724 | 3,014,829,534 | PR_kwDOCUB6oc6To2f- | 37,724 | [tests] fix flaky pattern in `test_generate_continue_from_past_key_values` | {
"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-04-23T17:47:37 | 2025-04-29T11:20:52 | 2025-04-29T11:20:42 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37724",
"html_url": "https://github.com/huggingface/transformers/pull/37724",
"diff_url": "https://github.com/huggingface/transformers/pull/37724.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37724.patch",
"merged_at": "2025-04-29T11:20:42"
} | # What does this PR do?
Fixes the flakiness pattern behind a [common flaky test](https://app.circleci.com/insights/github/huggingface/transformers/workflows/run_tests/tests?branch=main), `tests/models/kosmos2/test_modeling_kosmos2.py::Kosmos2ModelTest::test_generate_continue_from_past_key_values`
flakiness pattern TL;DR:
- on mixin tests, the models have random weights
- different input shapes can cause slightly different outputs (see [here](https://github.com/huggingface/transformers/issues/25420#issuecomment-1775317535))
- in `generate`, tiny differences in the logits can lead to a different token, changing generation from that point onward
- equivalence checks for `generate` shouldn't naively look at the output sequences, but rather at the output sequences up to the point where they diverge, if they diverge 👉 corrects all equivalence checks using the right pattern (this pattern was already present in most tests, but a few ones still had the old pattern) | {
"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/37724/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37724/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37723 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37723/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37723/comments | https://api.github.com/repos/huggingface/transformers/issues/37723/events | https://github.com/huggingface/transformers/pull/37723 | 3,014,674,426 | PR_kwDOCUB6oc6ToUaw | 37,723 | Skip is_flaky tests in the CI | {
"login": "Rocketknight1",
"id": 12866554,
"node_id": "MDQ6VXNlcjEyODY2NTU0",
"avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Rocketknight1",
"html_url": "https://github.com/Rocketknight1",
"followers_url": "https://api.github.com/users/Rocketknight1/followers",
"following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}",
"gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions",
"organizations_url": "https://api.github.com/users/Rocketknight1/orgs",
"repos_url": "https://api.github.com/users/Rocketknight1/repos",
"events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}",
"received_events_url": "https://api.github.com/users/Rocketknight1/received_events",
"type": "User",
"user_view_type": "public",
"site_admin": false
} | [] | closed | false | null | [] | null | [] | 2025-04-23T16:49:48 | 2025-04-30T07:52:23 | 2025-04-30T07:52:22 | MEMBER | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37723",
"html_url": "https://github.com/huggingface/transformers/pull/37723",
"diff_url": "https://github.com/huggingface/transformers/pull/37723.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37723.patch",
"merged_at": "2025-04-30T07:52:22"
} | 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/37723/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37723/timeline | null | null | null | null | true | true |
https://api.github.com/repos/huggingface/transformers/issues/37722 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/37722/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/37722/comments | https://api.github.com/repos/huggingface/transformers/issues/37722/events | https://github.com/huggingface/transformers/pull/37722 | 3,014,664,800 | PR_kwDOCUB6oc6ToSOT | 37,722 | refactor can_save_slow_tokenizer | {
"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
} | [] | closed | false | null | [] | null | [] | 2025-04-23T16:47:04 | 2025-05-23T15:29:40 | 2025-05-23T15:29:38 | COLLABORATOR | null | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/37722",
"html_url": "https://github.com/huggingface/transformers/pull/37722",
"diff_url": "https://github.com/huggingface/transformers/pull/37722.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/37722.patch",
"merged_at": "2025-05-23T15:29:38"
} | refactor to rm property `can_save_slow_tokenizer`, it can be done within the `if` of `save_vocabulary`, allows us to reduce exposed functions | {
"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
} | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/37722/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/37722/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.