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/41040
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41040/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41040/comments
https://api.github.com/repos/huggingface/transformers/issues/41040/events
https://github.com/huggingface/transformers/pull/41040
3,439,078,084
PR_kwDOCUB6oc6pvjSn
41,040
Add Keye vl 8b 1.5
{ "login": "Kwai-Keye", "id": 216671074, "node_id": "U_kgDODOojYg", "avatar_url": "https://avatars.githubusercontent.com/u/216671074?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Kwai-Keye", "html_url": "https://github.com/Kwai-Keye", "followers_url": "https://api.github.com/users/Kwai-Keye/followers", "following_url": "https://api.github.com/users/Kwai-Keye/following{/other_user}", "gists_url": "https://api.github.com/users/Kwai-Keye/gists{/gist_id}", "starred_url": "https://api.github.com/users/Kwai-Keye/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Kwai-Keye/subscriptions", "organizations_url": "https://api.github.com/users/Kwai-Keye/orgs", "repos_url": "https://api.github.com/users/Kwai-Keye/repos", "events_url": "https://api.github.com/users/Kwai-Keye/events{/privacy}", "received_events_url": "https://api.github.com/users/Kwai-Keye/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-22T03:51:07
2025-10-21T09:19:46
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41040", "html_url": "https://github.com/huggingface/transformers/pull/41040", "diff_url": "https://github.com/huggingface/transformers/pull/41040.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41040.patch", "merged_at": null }
# Model Upgrade: Keye-VL-1.5-8B ## Overview This PR introduces an upgraded version of the visual-language model, transitioning from the previous `keye-preview` to `keye-vl-1.5-8B`. The update includes architectural refinements, documentation improvements, code optimizations, and style enhancements. ## Key Changes ### 1. Model Architecture - Fine-tuned the model structure for improved performance and efficiency. - Enhanced visual-language alignment capabilities. ### 2. Documentation - Updated and optimized relevant documentation for better clarity and usability. - Added detailed descriptions of new features and modifications. ### 3. Code Optimization - Streamlined code workflow for enhanced maintainability. - Removed redundant parameters and code lines to improve efficiency. - Performed code style adaptations to ensure consistency with project standards. ## Impact - Improved model performance and accuracy. - Enhanced code readability and maintainability. - Reduced computational overhead by eliminating unnecessary parameters. ## Usage Refer to the updated documentation for detailed instructions on using the new model version. ## Notes - This upgrade maintains backward compatibility with existing pipelines. - Users are encouraged to review the updated docs for optimal utilization of new features.
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41040/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41040/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41039
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41039/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41039/comments
https://api.github.com/repos/huggingface/transformers/issues/41039/events
https://github.com/huggingface/transformers/pull/41039
3,438,715,064
PR_kwDOCUB6oc6puZME
41,039
docs: fully offline usage (env vars, local_files_only, caches)
{ "login": "Username46786", "id": 98800422, "node_id": "U_kgDOBeOTJg", "avatar_url": "https://avatars.githubusercontent.com/u/98800422?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Username46786", "html_url": "https://github.com/Username46786", "followers_url": "https://api.github.com/users/Username46786/followers", "following_url": "https://api.github.com/users/Username46786/following{/other_user}", "gists_url": "https://api.github.com/users/Username46786/gists{/gist_id}", "starred_url": "https://api.github.com/users/Username46786/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Username46786/subscriptions", "organizations_url": "https://api.github.com/users/Username46786/orgs", "repos_url": "https://api.github.com/users/Username46786/repos", "events_url": "https://api.github.com/users/Username46786/events{/privacy}", "received_events_url": "https://api.github.com/users/Username46786/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T23:32:40
2025-09-23T18:09:19
2025-09-23T18:09:19
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41039", "html_url": "https://github.com/huggingface/transformers/pull/41039", "diff_url": "https://github.com/huggingface/transformers/pull/41039.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41039.patch", "merged_at": null }
Adds a focused guide for running Transformers in air-gapped/firewalled environments: - Explains `TRANSFORMERS_OFFLINE`, `HF_HUB_OFFLINE`, and `local_files_only` - Shows how to pre-populate & relocate caches - Covers pipelines/trainers loading strictly from local files - Adds entry to `_toctree.yml` References: - Offline mode mention in installation docs (historic) and offline flags discussions/issues.
{ "login": "Username46786", "id": 98800422, "node_id": "U_kgDOBeOTJg", "avatar_url": "https://avatars.githubusercontent.com/u/98800422?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Username46786", "html_url": "https://github.com/Username46786", "followers_url": "https://api.github.com/users/Username46786/followers", "following_url": "https://api.github.com/users/Username46786/following{/other_user}", "gists_url": "https://api.github.com/users/Username46786/gists{/gist_id}", "starred_url": "https://api.github.com/users/Username46786/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Username46786/subscriptions", "organizations_url": "https://api.github.com/users/Username46786/orgs", "repos_url": "https://api.github.com/users/Username46786/repos", "events_url": "https://api.github.com/users/Username46786/events{/privacy}", "received_events_url": "https://api.github.com/users/Username46786/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41039/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41039/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41038
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41038/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41038/comments
https://api.github.com/repos/huggingface/transformers/issues/41038/events
https://github.com/huggingface/transformers/issues/41038
3,438,430,631
I_kwDOCUB6oc7M8kmn
41,038
Method `from_pretrained` does not respect the mapping of tied tensors in `safetensors` checkpoint
{ "login": "daskol", "id": 9336514, "node_id": "MDQ6VXNlcjkzMzY1MTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/9336514?v=4", "gravatar_id": "", "url": "https://api.github.com/users/daskol", "html_url": "https://github.com/daskol", "followers_url": "https://api.github.com/users/daskol/followers", "following_url": "https://api.github.com/users/daskol/following{/other_user}", "gists_url": "https://api.github.com/users/daskol/gists{/gist_id}", "starred_url": "https://api.github.com/users/daskol/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/daskol/subscriptions", "organizations_url": "https://api.github.com/users/daskol/orgs", "repos_url": "https://api.github.com/users/daskol/repos", "events_url": "https://api.github.com/users/daskol/events{/privacy}", "received_events_url": "https://api.github.com/users/daskol/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-21T17:20:26
2025-09-29T13:10:57
2025-09-29T13:10:57
CONTRIBUTOR
null
null
null
null
### System Info The issue exists for `transformers>=4.54.0<=4.56.1` for sure (tested). ```bash $ transformers env - `transformers` version: 4.56.1 - Platform: Linux-6.16.7-arch1-1-x86_64-with-glibc2.42 - Python version: 3.13.7 - Huggingface_hub version: 0.35.0 - Safetensors version: 0.5.3 - Accelerate version: 1.10.1 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (accelerator?): 2.8.0 (NA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): 0.10.5 (cpu) - Jax version: 0.7.0 - JaxLib version: 0.7.0 - Using distributed or parallel set-up in script?: <fill in> ``` ### Who can help? @CyrilVallez Method `AutoModel.from_pretrained` populates model weights from a checkpoint in `safetensors` format then it ties model weights in a way independent of checkpoint metadata and overwrite loaded weights on the real device with fake weights on `meta`. Here is relevant piece of code. https://github.com/huggingface/transformers/blob/91393fe4cc3266a05bc0d129e34ff5f761bb46e2/src/transformers/modeling_utils.py#L5164-L5194 ### Details The `transformers` library loads weights first and then ties input embeddings to output embeddings as follows (see [transformers/modeling_utils.py#L3236][1]). ```python def _tie_or_clone_weights(self, output_embeddings, input_embeddings): if self.config.torchscript: ... else: output_embeddings.weight = input_embeddings.weight ``` However, the choice what keys of state dict to load depends on `transformers` implementation. Specifically, it makes decision based on available keys in state dict loaded from a checkpoint. This can bring to the situation when 1. it loads output embeddings but not input ones; 2. then it ties input embeddings to output ones. As the result, both the input and output embeddings lives on `meta` device! In other words, no weights are loaded for bot input and output embeddings. ### Reproduction The issue can be reproduced with a `convert.py` script from `safetensors` repo (see [bindings/python/convert.py#L216][2]). The routine `convert_file` sorts all keys alphabetically and takes the first item in the list. For example, it keeps `model.lm_head.weight` rather than `model.model.decoder.embed_tokens.weight` in case of OPT model. ```python >>> from convert import convert_file >>> convert_file('facebook/opt-125m/pytorch_model.bin', 'facebook/opt-125m/model.safetensors', []) >>> from transformers import AutoModelForCausalLM >>> model = AutoModelForCausalLM.from_pretrained('facebook/opt-125m') >>> model.to('cpu') NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device. ``` [1]: https://github.com/huggingface/transformers/blob/v4.56.1/src/transformers/modeling_utils.py#L3236 [2]: https://github.com/huggingface/safetensors/blob/v0.6.2/bindings/python/convert.py#L216 ### Information - [x] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction The issue can be reproduced with a `convert.py` script from `safetensors` repo (see [bindings/python/convert.py#L216][2]). The routine `convert_file` sorts all keys alphabetically and takes the first item in the list. For example, it keeps `model.lm_head.weight` rather than `model.model.decoder.embed_tokens.weight` in case of OPT model. ```python >>> from convert import convert_file >>> convert_file('facebook/opt-125m/pytorch_model.bin', 'facebook/opt-125m/model.safetensors', []) >>> from transformers import AutoModelForCausalLM >>> model = AutoModelForCausalLM.from_pretrained('facebook/opt-125m') >>> model.to('cpu') NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device. ``` [1]: https://github.com/huggingface/transformers/blob/v4.56.1/src/transformers/modeling_utils.py#L3236 [2]: https://github.com/huggingface/safetensors/blob/v0.6.2/bindings/python/convert.py#L216 ### Expected behavior - All weights in state dict are restored from a checkpoint. - No weights remains on `meta` device.
{ "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/41038/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41038/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/41037
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41037/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41037/comments
https://api.github.com/repos/huggingface/transformers/issues/41037/events
https://github.com/huggingface/transformers/pull/41037
3,438,368,851
PR_kwDOCUB6oc6ptYrU
41,037
Tests: Apertus integration tests
{ "login": "andresnowak", "id": 35544006, "node_id": "MDQ6VXNlcjM1NTQ0MDA2", "avatar_url": "https://avatars.githubusercontent.com/u/35544006?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andresnowak", "html_url": "https://github.com/andresnowak", "followers_url": "https://api.github.com/users/andresnowak/followers", "following_url": "https://api.github.com/users/andresnowak/following{/other_user}", "gists_url": "https://api.github.com/users/andresnowak/gists{/gist_id}", "starred_url": "https://api.github.com/users/andresnowak/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andresnowak/subscriptions", "organizations_url": "https://api.github.com/users/andresnowak/orgs", "repos_url": "https://api.github.com/users/andresnowak/repos", "events_url": "https://api.github.com/users/andresnowak/events{/privacy}", "received_events_url": "https://api.github.com/users/andresnowak/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-21T16:00:11
2025-10-03T13:40:10
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41037", "html_url": "https://github.com/huggingface/transformers/pull/41037", "diff_url": "https://github.com/huggingface/transformers/pull/41037.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41037.patch", "merged_at": null }
# What does this PR do? This PR adds integration tests for the Apertus model, the tests are: - Check short greedy generation - Check short instruct model greedy generation - Check model logits in bfloat16, and compare with XIELU cuda output - Check model logits in float32, and compare with XIELU cuda output (I think float32 tests are not desired?) Note: Right now I do an environment variable just to show the difference between experimental XIELU cuda and no XIELU cuda outputs (but if this isn't desirable I'll remove it and just do a test for one of the two versions instead) Related PR: #39381 @ArthurZucker
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41037/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/41037/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41036
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41036/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41036/comments
https://api.github.com/repos/huggingface/transformers/issues/41036/events
https://github.com/huggingface/transformers/pull/41036
3,438,266,279
PR_kwDOCUB6oc6ptFNS
41,036
[Qwen3-next] Fix dimension mismatch in torch_chunk_gated_delta_rule and torch_recurrent_gated_delta_rule (#40963)
{ "login": "notkisk", "id": 107971634, "node_id": "U_kgDOBm-EMg", "avatar_url": "https://avatars.githubusercontent.com/u/107971634?v=4", "gravatar_id": "", "url": "https://api.github.com/users/notkisk", "html_url": "https://github.com/notkisk", "followers_url": "https://api.github.com/users/notkisk/followers", "following_url": "https://api.github.com/users/notkisk/following{/other_user}", "gists_url": "https://api.github.com/users/notkisk/gists{/gist_id}", "starred_url": "https://api.github.com/users/notkisk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/notkisk/subscriptions", "organizations_url": "https://api.github.com/users/notkisk/orgs", "repos_url": "https://api.github.com/users/notkisk/repos", "events_url": "https://api.github.com/users/notkisk/events{/privacy}", "received_events_url": "https://api.github.com/users/notkisk/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T13:48:11
2025-09-24T11:19:11
2025-09-24T11:18:27
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41036", "html_url": "https://github.com/huggingface/transformers/pull/41036", "diff_url": "https://github.com/huggingface/transformers/pull/41036.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41036.patch", "merged_at": "2025-09-24T11:18:27" }
## Fixes #40963 ## Issue When running inference with **Qwen3-next** (`modeling_qwen3_next.py`), a dimension mismatch occurs in the `Qwen3NextGatedDeltaNet` class inside the `torch_chunk_gated_delta_rule` function. - Input tensors start as `(batch_size, seq_len, num_heads, head_dim)`. - After `transpose(1, 2)`, the shape becomes `(batch_size, num_heads, seq_len, head_dim)`. - The code incorrectly unpacks as `(batch_size, sequence_length, num_heads, k_head_dim)`, causing inconsistent calculations and runtime errors. See [line 461](https://github.com/huggingface/transformers/blob/main/src/transformers/models/qwen3_next/modeling_qwen3_next.py#L461). ## Solution Updated both `torch_chunk_gated_delta_rule` and `torch_recurrent_gated_delta_rule` in **`modular_qwen3_next.py`**: - Corrected dimension unpacking: ```python batch_size, num_heads, sequence_length, k_head_dim = key.shape ##Verification - Reproduced the bug and confirmed the mismatch. - Applied the fix and re-ran tests: 96 passed, 134 skipped (all as expected). - Verified inference works correctly on the official example query: “Give me a short introduction to large language model.” ##Root Cause The bug was caused by assuming the original dimension order after transpose(1, 2). This led to wrong unpacking of key.shape, which then broke padding, chunking, and recurrent state initialization. The fix ensures consistent handling of dimensions after the transpose operation.
{ "login": "vasqu", "id": 73884904, "node_id": "MDQ6VXNlcjczODg0OTA0", "avatar_url": "https://avatars.githubusercontent.com/u/73884904?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vasqu", "html_url": "https://github.com/vasqu", "followers_url": "https://api.github.com/users/vasqu/followers", "following_url": "https://api.github.com/users/vasqu/following{/other_user}", "gists_url": "https://api.github.com/users/vasqu/gists{/gist_id}", "starred_url": "https://api.github.com/users/vasqu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vasqu/subscriptions", "organizations_url": "https://api.github.com/users/vasqu/orgs", "repos_url": "https://api.github.com/users/vasqu/repos", "events_url": "https://api.github.com/users/vasqu/events{/privacy}", "received_events_url": "https://api.github.com/users/vasqu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41036/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41036/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41035
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41035/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41035/comments
https://api.github.com/repos/huggingface/transformers/issues/41035/events
https://github.com/huggingface/transformers/pull/41035
3,438,183,599
PR_kwDOCUB6oc6ps1vA
41,035
docs: update speech recognition examples to use modern Common Voice d…
{ "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 }
[]
open
false
null
[]
null
[]
2025-09-21T11:59:16
2025-09-25T17:02:37
null
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41035", "html_url": "https://github.com/huggingface/transformers/pull/41035", "diff_url": "https://github.com/huggingface/transformers/pull/41035.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41035.patch", "merged_at": null }
# What does this PR do? This PR updates the existing `"common_voice" \` dataset with modern `"mozilla-foundation/common_voice_11_0" \`. Fixes #40977 ## 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? ## Who can review? @Rocketknight1 <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41035/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41035/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41034
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41034/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41034/comments
https://api.github.com/repos/huggingface/transformers/issues/41034/events
https://github.com/huggingface/transformers/issues/41034
3,437,876,949
I_kwDOCUB6oc7M6dbV
41,034
G
{ "login": "ESCAPEEEE111", "id": 223460714, "node_id": "U_kgDODVG9ag", "avatar_url": "https://avatars.githubusercontent.com/u/223460714?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ESCAPEEEE111", "html_url": "https://github.com/ESCAPEEEE111", "followers_url": "https://api.github.com/users/ESCAPEEEE111/followers", "following_url": "https://api.github.com/users/ESCAPEEEE111/following{/other_user}", "gists_url": "https://api.github.com/users/ESCAPEEEE111/gists{/gist_id}", "starred_url": "https://api.github.com/users/ESCAPEEEE111/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ESCAPEEEE111/subscriptions", "organizations_url": "https://api.github.com/users/ESCAPEEEE111/orgs", "repos_url": "https://api.github.com/users/ESCAPEEEE111/repos", "events_url": "https://api.github.com/users/ESCAPEEEE111/events{/privacy}", "received_events_url": "https://api.github.com/users/ESCAPEEEE111/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T06:37:35
2025-09-21T06:37:38
2025-09-21T06:37:38
NONE
null
null
null
null
null
{ "login": "ESCAPEEEE111", "id": 223460714, "node_id": "U_kgDODVG9ag", "avatar_url": "https://avatars.githubusercontent.com/u/223460714?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ESCAPEEEE111", "html_url": "https://github.com/ESCAPEEEE111", "followers_url": "https://api.github.com/users/ESCAPEEEE111/followers", "following_url": "https://api.github.com/users/ESCAPEEEE111/following{/other_user}", "gists_url": "https://api.github.com/users/ESCAPEEEE111/gists{/gist_id}", "starred_url": "https://api.github.com/users/ESCAPEEEE111/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ESCAPEEEE111/subscriptions", "organizations_url": "https://api.github.com/users/ESCAPEEEE111/orgs", "repos_url": "https://api.github.com/users/ESCAPEEEE111/repos", "events_url": "https://api.github.com/users/ESCAPEEEE111/events{/privacy}", "received_events_url": "https://api.github.com/users/ESCAPEEEE111/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41034/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41034/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/41033
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41033/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41033/comments
https://api.github.com/repos/huggingface/transformers/issues/41033/events
https://github.com/huggingface/transformers/pull/41033
3,437,873,055
PR_kwDOCUB6oc6pr2vu
41,033
feat: make audio feature extractors torch.export-able
{ "login": "The5cheduler", "id": 46714886, "node_id": "MDQ6VXNlcjQ2NzE0ODg2", "avatar_url": "https://avatars.githubusercontent.com/u/46714886?v=4", "gravatar_id": "", "url": "https://api.github.com/users/The5cheduler", "html_url": "https://github.com/The5cheduler", "followers_url": "https://api.github.com/users/The5cheduler/followers", "following_url": "https://api.github.com/users/The5cheduler/following{/other_user}", "gists_url": "https://api.github.com/users/The5cheduler/gists{/gist_id}", "starred_url": "https://api.github.com/users/The5cheduler/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/The5cheduler/subscriptions", "organizations_url": "https://api.github.com/users/The5cheduler/orgs", "repos_url": "https://api.github.com/users/The5cheduler/repos", "events_url": "https://api.github.com/users/The5cheduler/events{/privacy}", "received_events_url": "https://api.github.com/users/The5cheduler/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 6470596964, "node_id": "LA_kwDOCUB6oc8AAAABga15ZA", "url": "https://api.github.com/repos/huggingface/transformers/labels/Audio", "name": "Audio", "color": "760453", "default": false, "description": "" } ]
open
false
null
[]
null
[]
2025-09-21T06:30:15
2025-09-26T16:49:32
null
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41033", "html_url": "https://github.com/huggingface/transformers/pull/41033", "diff_url": "https://github.com/huggingface/transformers/pull/41033.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41033.patch", "merged_at": null }
Fix #40986 Refactors the feature extraction logic for both `GraniteSpeechFeatureExtractor` and `WhisperFeatureExtractor` into separate `nn.Module` subclasses. This encapsulates the feature extraction computation in a way that is compatible with `torch.export`. A new method, `to_exportable_module()`, was added to both feature extractor classes to return an instance of these new modules. The original `__call__` and `_torch_extract_fbank_features` methods were updated to use these exportable modules. Finally, new tests were added to verify that both feature extractors can be successfully exported using `torch.export`. # What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41033/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41033/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41032
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41032/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41032/comments
https://api.github.com/repos/huggingface/transformers/issues/41032/events
https://github.com/huggingface/transformers/pull/41032
3,437,852,840
PR_kwDOCUB6oc6przFJ
41,032
fix(trainer): Avoid moving model with device_map
{ "login": "The5cheduler", "id": 46714886, "node_id": "MDQ6VXNlcjQ2NzE0ODg2", "avatar_url": "https://avatars.githubusercontent.com/u/46714886?v=4", "gravatar_id": "", "url": "https://api.github.com/users/The5cheduler", "html_url": "https://github.com/The5cheduler", "followers_url": "https://api.github.com/users/The5cheduler/followers", "following_url": "https://api.github.com/users/The5cheduler/following{/other_user}", "gists_url": "https://api.github.com/users/The5cheduler/gists{/gist_id}", "starred_url": "https://api.github.com/users/The5cheduler/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/The5cheduler/subscriptions", "organizations_url": "https://api.github.com/users/The5cheduler/orgs", "repos_url": "https://api.github.com/users/The5cheduler/repos", "events_url": "https://api.github.com/users/The5cheduler/events{/privacy}", "received_events_url": "https://api.github.com/users/The5cheduler/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T05:55:58
2025-09-29T14:32:09
2025-09-29T14:31:42
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41032", "html_url": "https://github.com/huggingface/transformers/pull/41032", "diff_url": "https://github.com/huggingface/transformers/pull/41032.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41032.patch", "merged_at": "2025-09-29T14:31:42" }
Fix #41013 When a model is loaded with `device_map="auto"` and is too large to fit on a single GPU, `accelerate` will offload some layers to the CPU or disk. The `Trainer` would previously attempt to move the entire model to the specified device, causing a `RuntimeError` because a model dispatched with `accelerate` hooks cannot be moved. This commit fixes the issue by adding a check in `_move_model_to_device` to see if the model has an `hf_device_map` attribute. If it does, the device placement is assumed to be handled by `accelerate`, and the `model.to(device)` call is skipped. A regression test is added to ensure the `Trainer` can be initialized with a model that has a `hf_device_map` that simulates offloading without raising an error. # What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "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/41032/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41032/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41031
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41031/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41031/comments
https://api.github.com/repos/huggingface/transformers/issues/41031/events
https://github.com/huggingface/transformers/pull/41031
3,437,772,920
PR_kwDOCUB6oc6prkWV
41,031
Fix typos in English/Chinese documentation
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T03:37:22
2025-09-22T11:33:46
2025-09-22T11:31:46
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41031", "html_url": "https://github.com/huggingface/transformers/pull/41031", "diff_url": "https://github.com/huggingface/transformers/pull/41031.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41031.patch", "merged_at": "2025-09-22T11:31:46" }
# What does this PR do? Fix typos and fix other formatting errors. ## 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. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "Rocketknight1", "id": 12866554, "node_id": "MDQ6VXNlcjEyODY2NTU0", "avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rocketknight1", "html_url": "https://github.com/Rocketknight1", "followers_url": "https://api.github.com/users/Rocketknight1/followers", "following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}", "gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions", "organizations_url": "https://api.github.com/users/Rocketknight1/orgs", "repos_url": "https://api.github.com/users/Rocketknight1/repos", "events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}", "received_events_url": "https://api.github.com/users/Rocketknight1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41031/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41031/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41030
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41030/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41030/comments
https://api.github.com/repos/huggingface/transformers/issues/41030/events
https://github.com/huggingface/transformers/pull/41030
3,437,732,326
PR_kwDOCUB6oc6prbz0
41,030
Remove optax
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T02:41:12
2025-09-22T11:33:53
2025-09-22T11:30:39
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41030", "html_url": "https://github.com/huggingface/transformers/pull/41030", "diff_url": "https://github.com/huggingface/transformers/pull/41030.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41030.patch", "merged_at": "2025-09-22T11:30:39" }
# What does this PR do? `optax` is dependency of `flax`.
{ "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/41030/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41030/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41029
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41029/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41029/comments
https://api.github.com/repos/huggingface/transformers/issues/41029/events
https://github.com/huggingface/transformers/pull/41029
3,437,721,485
PR_kwDOCUB6oc6prZlf
41,029
Remove doc of tf and flax
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T02:22:24
2025-09-22T12:52:57
2025-09-22T12:42:26
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41029", "html_url": "https://github.com/huggingface/transformers/pull/41029", "diff_url": "https://github.com/huggingface/transformers/pull/41029.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41029.patch", "merged_at": "2025-09-22T12:42:26" }
# What does this PR do? Remove remaining text of tensor flow and flax inside `<tf> </tf>` and `<flax> </flax>` from documentation. ## 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. - [X] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41029/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41029/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41028
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41028/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41028/comments
https://api.github.com/repos/huggingface/transformers/issues/41028/events
https://github.com/huggingface/transformers/pull/41028
3,437,699,407
PR_kwDOCUB6oc6prVU1
41,028
Fix typing of tuples
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-21T01:42:35
2025-09-22T11:33:59
2025-09-22T11:29:08
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41028", "html_url": "https://github.com/huggingface/transformers/pull/41028", "diff_url": "https://github.com/huggingface/transformers/pull/41028.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41028.patch", "merged_at": "2025-09-22T11:29:07" }
# What does this PR do? Use `tuple[T,...]` to indicate tuples of the same element type `T`.
{ "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/41028/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41028/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41027
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41027/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41027/comments
https://api.github.com/repos/huggingface/transformers/issues/41027/events
https://github.com/huggingface/transformers/pull/41027
3,437,577,034
PR_kwDOCUB6oc6pq_Hq
41,027
docs: update speech recognition examples
{ "login": "tayo4christ", "id": 58476114, "node_id": "MDQ6VXNlcjU4NDc2MTE0", "avatar_url": "https://avatars.githubusercontent.com/u/58476114?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tayo4christ", "html_url": "https://github.com/tayo4christ", "followers_url": "https://api.github.com/users/tayo4christ/followers", "following_url": "https://api.github.com/users/tayo4christ/following{/other_user}", "gists_url": "https://api.github.com/users/tayo4christ/gists{/gist_id}", "starred_url": "https://api.github.com/users/tayo4christ/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tayo4christ/subscriptions", "organizations_url": "https://api.github.com/users/tayo4christ/orgs", "repos_url": "https://api.github.com/users/tayo4christ/repos", "events_url": "https://api.github.com/users/tayo4christ/events{/privacy}", "received_events_url": "https://api.github.com/users/tayo4christ/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-20T22:10:36
2025-09-30T08:38:31
2025-09-30T08:38:31
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41027", "html_url": "https://github.com/huggingface/transformers/pull/41027", "diff_url": "https://github.com/huggingface/transformers/pull/41027.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41027.patch", "merged_at": "2025-09-30T08:38:31" }
This PR modernizes the ASR examples and improves cross-platform onboarding. ## What’s changed - **Pin CTC example commands** to Hub datasets (e.g., `mozilla-foundation/common_voice_17_0`) instead of `common_voice` local scripts. - **Add a Whisper section tip** clarifying that `--dataset_name` should point to a Hub dataset to avoid “dataset scripts are no longer supported” errors. - **Add a short Windows helper note** (PowerShell venv activation; formatter/linter commands without `make`). - Minor copyedits for clarity. ## Why Recent `datasets` versions deprecated local dataset scripts. Using Hub IDs is the supported path and: - Prevents setup failures across environments (especially Windows), - Reduces support overhead, - Keeps docs future-proof and consistent. ## Files touched - `examples/pytorch/speech-recognition/README.md` - CTC commands now use `mozilla-foundation/common_voice_17_0` (retained existing `--dataset_config_name` values). - Whisper section includes a one-liner tip about Hub datasets. - Added a short Windows (PowerShell) note near the existing OMP note. ## How I tested - Verified the updated commands on Windows (PowerShell, Python 3.12) in a clean venv. - Ran Black/Ruff on the changed paths. ## Related Fixes #40977 ## Checklist - [x] Docs/examples updated - [x] Format/lint pass on changed files (Black/Ruff) ## Reviewers @stevhliu (docs) @eustlb (speech)
{ "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/41027/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41027/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41026
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41026/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41026/comments
https://api.github.com/repos/huggingface/transformers/issues/41026/events
https://github.com/huggingface/transformers/issues/41026
3,437,371,868
I_kwDOCUB6oc7M4iHc
41,026
Attention sinks are not applied correctly in `integrations.flex_attention`
{ "login": "jonny-so", "id": 3903806, "node_id": "MDQ6VXNlcjM5MDM4MDY=", "avatar_url": "https://avatars.githubusercontent.com/u/3903806?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonny-so", "html_url": "https://github.com/jonny-so", "followers_url": "https://api.github.com/users/jonny-so/followers", "following_url": "https://api.github.com/users/jonny-so/following{/other_user}", "gists_url": "https://api.github.com/users/jonny-so/gists{/gist_id}", "starred_url": "https://api.github.com/users/jonny-so/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jonny-so/subscriptions", "organizations_url": "https://api.github.com/users/jonny-so/orgs", "repos_url": "https://api.github.com/users/jonny-so/repos", "events_url": "https://api.github.com/users/jonny-so/events{/privacy}", "received_events_url": "https://api.github.com/users/jonny-so/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-20T18:03:27
2025-09-29T14:33:05
2025-09-29T14:33:05
NONE
null
null
null
null
The `score_mod` function passed to `flex_attention` should operate on the pre-softmax attention scores, but the snippet below appears to be applying the attention biases (`s_aux`) and computing the **_post_**-softmax scores. https://github.com/huggingface/transformers/blob/67097bf34055c55b886dc92014fd628c9a70e168/src/transformers/integrations/flex_attention.py#L275-L280 I don't think it is possible to apply (gpt-oss-style) attention sinks using the `score_mod` alone, but you can do it by passing `return_lse=True` to `flex_attention` and renormalising using the extra return value. If someone can point me to where unit tests for this code should live I'm happy to PR a fix.
{ "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/41026/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/41026/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/41025
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41025/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41025/comments
https://api.github.com/repos/huggingface/transformers/issues/41025/events
https://github.com/huggingface/transformers/pull/41025
3,437,282,088
PR_kwDOCUB6oc6pqDlM
41,025
Adding support for Qwen3Omni
{ "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 }
[ { "id": 1843244711, "node_id": "MDU6TGFiZWwxODQzMjQ0NzEx", "url": "https://api.github.com/repos/huggingface/transformers/labels/New%20model", "name": "New model", "color": "fbca04", "default": false, "description": "" } ]
closed
false
null
[]
null
[]
2025-09-20T16:16:58
2025-09-22T08:46:41
2025-09-21T21:46:27
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41025", "html_url": "https://github.com/huggingface/transformers/pull/41025", "diff_url": "https://github.com/huggingface/transformers/pull/41025.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41025.patch", "merged_at": "2025-09-21T21:46:27" }
## Qwen3-Omni here! This PR introduces support for the upcoming **Qwen3-Omni** models, including **Instruct and Thinking versions.** As the next generation of the Qwen-Omni family, Qwen3-Omni brings new architecture, multilingual and reasoning ability to omni model, achieving superior performance across complex multimodal tasks. Special thanks to @ArthurZucker, and @zucchini-nlp for their valuable feedback and thorough reviews! 🙏
{ "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/41025/reactions", "total_count": 75, "+1": 31, "-1": 0, "laugh": 0, "hooray": 13, "confused": 0, "heart": 2, "rocket": 29, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41025/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41024
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41024/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41024/comments
https://api.github.com/repos/huggingface/transformers/issues/41024/events
https://github.com/huggingface/transformers/pull/41024
3,437,044,956
PR_kwDOCUB6oc6ppYGq
41,024
Deprecate `max_size` in ConditionalDetrImageProcessor with warning
{ "login": "vaishnavigavi", "id": 69896977, "node_id": "MDQ6VXNlcjY5ODk2OTc3", "avatar_url": "https://avatars.githubusercontent.com/u/69896977?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vaishnavigavi", "html_url": "https://github.com/vaishnavigavi", "followers_url": "https://api.github.com/users/vaishnavigavi/followers", "following_url": "https://api.github.com/users/vaishnavigavi/following{/other_user}", "gists_url": "https://api.github.com/users/vaishnavigavi/gists{/gist_id}", "starred_url": "https://api.github.com/users/vaishnavigavi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vaishnavigavi/subscriptions", "organizations_url": "https://api.github.com/users/vaishnavigavi/orgs", "repos_url": "https://api.github.com/users/vaishnavigavi/repos", "events_url": "https://api.github.com/users/vaishnavigavi/events{/privacy}", "received_events_url": "https://api.github.com/users/vaishnavigavi/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-20T11:25:27
2025-09-25T09:48:07
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41024", "html_url": "https://github.com/huggingface/transformers/pull/41024", "diff_url": "https://github.com/huggingface/transformers/pull/41024.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41024.patch", "merged_at": null }
# What does this PR do? Deprecates the `max_size` parameter in `ConditionalDetrImageProcessor` with a proper warning message and guides users to use the new `size={'longest_edge': <int>}` format instead. ## Why this change? This aligns the ConditionalDetrImageProcessor with other processors (like DETR) and provides a clearer migration path for users. The current `max_size` parameter is deprecated and should be replaced with the more explicit `size` parameter format. ## Changes Made - Added deprecation warning in `ConditionalDetrImageProcessor.__init__()` that warns users about the deprecated `max_size` parameter - Updated warning message to guide users to use `size={'longest_edge': <int>}` instead - Updated docstring in `from_dict` method to document the deprecation - Simplified parameter handling by ignoring `max_size` instead of trying to use it - Added test case to verify the deprecation warning works and processor still functions correctly ## Before submitting - [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? This affects vision models and image processing, so tagging: @amyeroberts @qubvel
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41024/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41024/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41023
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41023/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41023/comments
https://api.github.com/repos/huggingface/transformers/issues/41023/events
https://github.com/huggingface/transformers/issues/41023
3,437,015,054
I_kwDOCUB6oc7M3LAO
41,023
modular_qwen2_5_vl.py冗余代码,影响代码整洁和引入歧义
{ "login": "xiangqian19831224", "id": 23026083, "node_id": "MDQ6VXNlcjIzMDI2MDgz", "avatar_url": "https://avatars.githubusercontent.com/u/23026083?v=4", "gravatar_id": "", "url": "https://api.github.com/users/xiangqian19831224", "html_url": "https://github.com/xiangqian19831224", "followers_url": "https://api.github.com/users/xiangqian19831224/followers", "following_url": "https://api.github.com/users/xiangqian19831224/following{/other_user}", "gists_url": "https://api.github.com/users/xiangqian19831224/gists{/gist_id}", "starred_url": "https://api.github.com/users/xiangqian19831224/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xiangqian19831224/subscriptions", "organizations_url": "https://api.github.com/users/xiangqian19831224/orgs", "repos_url": "https://api.github.com/users/xiangqian19831224/repos", "events_url": "https://api.github.com/users/xiangqian19831224/events{/privacy}", "received_events_url": "https://api.github.com/users/xiangqian19831224/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-20T10:39:08
2025-10-29T08:03:10
2025-10-29T08:03:10
NONE
null
null
null
null
### System Info 建议: 应该删除 理由: 1.请看我注释中的TODO部分,modular_qwen2_5_vl.py的功能基本上在modeling_qwen2_5_vl.py有最新实现 2.qwen2.5-vl的开源代码,没有用到modular_qwen2_5_vl.py 3.transformer中只是旧代码,可能是qwen2.5开发过程中的中间历史文件 4.该文件影响代码质量,引入疑惑 5.如果是这样,请确保代码的整洁与高质量 # coding=utf-8 # Copyright 2025 The Qwen Team and The HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to GPT-NeoX and OPT used by the Meta AI team that trained the model. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """PyTorch Qwen2.5-VL model.""" from dataclasses import dataclass from typing import List, Optional, Tuple, Union import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint from torch.nn import CrossEntropyLoss from transformers.models.qwen2_vl.configuration_qwen2_vl import Qwen2VLConfig from transformers.models.qwen2_vl.modeling_qwen2_vl import ( PatchEmbed, PatchMerger, Qwen2RMSNorm, Qwen2VLCausalLMOutputWithPast, Qwen2VLForConditionalGeneration, Qwen2VLModel, Qwen2VLPreTrainedModel, VisionAttention, VisionRotaryEmbedding, VisionSdpaAttention, ) from transformers.models.qwen2_vl.processing_qwen2_vl import Qwen2VLImagesKwargs, Qwen2VLProcessor from ...activations import ACT2FN from ...configuration_utils import PretrainedConfig from ...feature_extraction_utils import BatchFeature from ...image_utils import ImageInput, VideoInput from ...modeling_flash_attention_utils import is_flash_attn_available from ...processing_utils import ProcessingKwargs, Unpack, VideosKwargs from ...tokenization_utils_base import PreTokenizedInput, TextInput from ...utils import logging if is_flash_attn_available(): from ...modeling_flash_attention_utils import apply_rotary_emb, flash_attn_varlen_func logger = logging.get_logger(__name__) # TODO modeling_qwen2_5_vl.py实现过了 一样 def apply_rotary_pos_emb_flashatt( q: torch.Tensor, k: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor ) -> Tuple[torch.Tensor, torch.Tensor]: """ 输入: q: query 向量,形状通常是 [batch, seq_len, num_heads, head_dim] k: key 向量,形状同上 cos, sin: 预计算好的余弦、正弦位置编码张量,形状通常是 [seq_len, 1, head_dim] 或 [batch, seq_len, head_dim] 返回值: 返回旋转位置编码后的 query 和 key """ # cos.chunk(2, dim=-1) 表示在最后一维把 cos 切成两份,只取前一份 # RoPE 通常把 偶数维度和奇数维度配对 起来进行旋转,而这里只取一半, # 是因为 apply_rotary_emb 内部会自动处理这对 (cos, sin) 与向量分解 # .contiguous() 保证内存布局是连续的,方便后面计算 cos = cos.chunk(2, dim=-1)[0].contiguous() sin = sin.chunk(2, dim=-1)[0].contiguous() # apply_rotary_emb 负责真正执行旋转编码 # .float():防止半精度/混合精度下三角函数运算精度不够 # type_as(q):再把结果转回和 q 一样的数据类型(比如 fp16/bf16 q_embed = apply_rotary_emb(q.float(), cos.float(), sin.float()).type_as(q) k_embed = apply_rotary_emb(k.float(), cos.float(), sin.float()).type_as(k) return q_embed, k_embed class Qwen2_5_VLVisionConfig(PretrainedConfig): """ 它主要用于保存模型结构超参数(hyperparameters),在初始化视觉模块时提供配置 构造参数 depth=32 Transformer block 的层数,即视觉编码器的深度 hidden_size=3584 隐藏层维度,每个 patch embedding/token 的表示维度 hidden_act="silu" 激活函数,SiLU(Swish)常用于 Transformer intermediate_size=3420 FFN(前馈网络)中间层的维度,通常比 hidden_size 大 num_heads=16 多头注意力机制的头数 in_channels=3 输入图像通道数,RGB 图像为 3 patch_size=14 将图像切分为 patch 的大小,每个 patch 是 14x14 spatial_merge_size=2 空间合并参数,用于逐层减少 token 数(类似 pooling,提升计算效率) temporal_patch_size=2 处理视频时的时间维度 patch 大小,例如把 2 帧合成 1 个 token tokens_per_second=4 视频采样率控制,每秒生成多少个视觉 token window_size=112 局部注意力的窗口大小,用于计算时的限制范围 举例 如果 patch_size=14,一张输入图像假设大小为 224 × 224 每个 patch = 14×14 总共 patch 数 = (224/14)² = 16 × 16 = 256 tokens 现在 window_size=112,意思是窗口覆盖 112 × 112 的原始像素区域: 每个窗口包含 (112/14)² = 8 × 8 = 64 tokens 注意力只在这 64 个 token 内计算,而不是 256 个 token 全部互算 这样复杂度从 256² 降到 64²,显著减少计算量 out_hidden_size=3584 输出 embedding 维度,通常与 hidden_size 相同,但也可能不同,用于和语言模型对齐 fullatt_block_indexes=[7, 15, 23, 31] 指定哪些层使用 全局注意力(full attention),其他层可能使用局部窗口注意力(windowed attention)以节省计算量 """ model_type = "qwen2_5_vl" base_config_key = "vision_config" def __init__( self, depth=32, hidden_size=3584, hidden_act="silu", intermediate_size=3420, num_heads=16, in_channels=3, patch_size=14, spatial_merge_size=2, temporal_patch_size=2, tokens_per_second=4, window_size=112, out_hidden_size=3584, fullatt_block_indexes=[7, 15, 23, 31], **kwargs, ): super().__init__(**kwargs) self.depth = depth self.hidden_size = hidden_size self.hidden_act = hidden_act self.intermediate_size = intermediate_size self.num_heads = num_heads self.in_channels = in_channels self.patch_size = patch_size self.spatial_merge_size = spatial_merge_size self.temporal_patch_size = temporal_patch_size self.tokens_per_second = tokens_per_second self.window_size = window_size self.fullatt_block_indexes = fullatt_block_indexes self.out_hidden_size = out_hidden_size class Qwen2_5_VLConfig(Qwen2VLConfig): model_type = "qwen2_5_vl" sub_configs = {"vision_config": Qwen2_5_VLVisionConfig} class Qwen2_5_VLMLP(nn.Module): def __init__(self, config, bias: bool = False): super().__init__() self.hidden_size = config.hidden_size self.intermediate_size = config.intermediate_size self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=bias) self.up_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=bias) self.down_proj = nn.Linear(self.intermediate_size, self.hidden_size, bias=bias) self.act_fn = ACT2FN[config.hidden_act] def forward(self, hidden_state): return self.down_proj(self.act_fn(self.gate_proj(hidden_state)) * self.up_proj(hidden_state)) # TODO PatchEmbed 依赖qwen2-vl的实现 # modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VisionPatchEmbed(PatchEmbed): pass # TODO PatchEmbed 依赖qwen2-vl的实现 # modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VisionRotaryEmbedding(VisionRotaryEmbedding): pass # TODO PatchEmbed 依赖qwen2-vl的实现 # modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VLPatchMerger(PatchMerger): def __init__(self, dim: int, context_dim: int, spatial_merge_size: int = 2) -> None: super().__init__(dim, context_dim, spatial_merge_size) self.ln_q = Qwen2RMSNorm(context_dim, eps=1e-6) class Qwen2_5_VLVisionFlashAttention2(nn.Module): def __init__(self, dim: int, num_heads: int = 16) -> None: super().__init__() self.num_heads = num_heads self.qkv = nn.Linear(dim, dim * 3, bias=True) self.proj = nn.Linear(dim, dim) def forward( self, hidden_states: torch.Tensor, cu_seqlens: torch.Tensor, rotary_pos_emb: Optional[torch.Tensor] = None, position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None, ) -> torch.Tensor: """ 输入参数: hidden_states: 输入的 token/patch 表示 注意这里代码使用的是把 batch 内所有样本的 token 拼接在一起的变长表示(见 cu_seqlens) 因此 hidden_states 的第 0 维是所有 tokens 的总和,形状通常是 (total_seq_len, dim) cu_seqlens: cumulative sequence lengths,长度为 batch_size + 1 第一个元素通常是 0,最后一个是 total_seq_len。用于变长(varlen)FlashAttention rotary_pos_emb:旧接口的 RoPE 值(可能是 theta/角度值),可选 position_embeddings:新接口,期望是 (cos, sin) 的 Tuple(预计算好的 cos 与 sin 矩阵);二者互斥/替代 返回值: output: (total_tokens, num_heads * head_dim) 当前实现下,每个句子在 q/k 上的 RoPE 不是从 0 开始,而是沿拼接序列连续旋转 """ seq_length = hidden_states.shape[0] # self.qkv(hidden_states):对 (seq_length, dim) 应用线性层,输出形状 (seq_length, 3*dim) # .reshape(seq_length, 3, self.num_heads, -1):将最后一维拆成 3 × num_heads × head_dim, # 其中 head_dim = dim // num_heads(最后用 -1 自动推断) # 结果形状 (seq_length, 3, num_heads, head_dim) # 注意:此处要求 dim 能被 num_heads 整除,否则 head_dim 不是整数,会报错或结果不符合预期 # .permute(1, 0, 2, 3):把维度顺序改为 (3, seq_length, num_heads, head_dim),即把 q/k/v 的轴放到最前面,便于拆分 # .unbind(0):沿第 0 维(长度为 3 的那一维)拆出三个张量,分别对应 q、k、v # 拆出的每个张量形状为 (seq_length, num_heads, head_dim) # 最后通过解包赋给 q, k, v。 # 形状总结:q.shape == k.shape == v.shape == (seq_length, num_heads, head_dim) q, k, v = self.qkv(hidden_states).reshape(seq_length, 3, self.num_heads, -1).permute(1, 0, 2, 3).unbind(0) # 判断是否有 position_embeddings(外部预计算好的 cos/sin 对) # 如果没有,走兼容旧接口的代码路径(使用 rotary_pos_emb) if position_embeddings is None: logger.warning_once( "The attention layers in this model are transitioning from computing the RoPE embeddings internally " "through `rotary_pos_emb` (2D tensor of RoPE theta values), to using externally computed " "`position_embeddings` (Tuple of tensors, containing cos and sin). In v4.54 `rotary_pos_emb` will be " "removed and `position_embeddings` will be mandatory." ) # 旧接口下把 rotary_pos_emb 拼接自身一次(在最后一个维度上) # 解释与原因:通常 rotary_pos_emb 可能只包含 half-dim 的角度/频率值(或一种表示) # 为方便得到与 head_dim 对齐的 cos/sin,此处通过复制来扩展维度(使其与 q/k 的最后维度匹配) emb = torch.cat((rotary_pos_emb, rotary_pos_emb), dim=-1) cos = emb.cos() sin = emb.sin() else: cos, sin = position_embeddings # 1.q.unsqueeze(0): # 把 q 从 (seq_length, num_heads, head_dim) 变为 (1, seq_length, num_heads, head_dim), # 即在最前面加一个 batch 维(因为 apply_rotary_pos_emb_flashatt 的实现可能期望有 batch 维) # 2.k.unsqueeze(0): 同 k # 3.apply_rotary_pos_emb_flashatt: TODO需要研究过去看看 # 它预计会使用提供的 cos 和 sin 对 q,k 做 RoPE(交错旋转/复数映射等) # 它返回变换后的 (q,k),形状仍为 (1, seq_length, num_heads, head_dim) q, k = apply_rotary_pos_emb_flashatt(q.unsqueeze(0), k.unsqueeze(0), cos, sin) q = q.squeeze(0) k = k.squeeze(0) max_seqlen = (cu_seqlens[1:] - cu_seqlens[:-1]).max().item() # output: (total_tokens, num_heads * head_dim) attn_output = flash_attn_varlen_func(q, k, v, cu_seqlens, cu_seqlens, max_seqlen, max_seqlen).reshape( seq_length, -1 ) attn_output = self.proj(attn_output) return attn_output # TODO PatchEmbed 依赖qwen2-vl的实现 # modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VLVisionAttention(VisionAttention): pass # TODO PatchEmbed 依赖qwen2-vl的实现 # modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VLVisionSdpaAttention(VisionSdpaAttention): pass # eager: 即时模式注意力 直接按照普通 PyTorch 操作计算注意力,没有特殊优化;每一步操作立即执行 # flash_attention_2: 高效实现的注意力(利用 GPU 内存优化和并行计算),适合处理长序列或变长序列 # sdpa: 标准 Transformer 中的 Scaled Dot-Product Attention,按 Q·Kᵀ / √d → softmax → V 的流程计算 QWEN2_5_VL_VISION_ATTENTION_CLASSES = { "eager": Qwen2_5_VLVisionAttention, "flash_attention_2": Qwen2_5_VLVisionFlashAttention2, "sdpa": Qwen2_5_VLVisionSdpaAttention, } # TODO 重复实现: modeling_qwen2_5_vl.py实现过了,一摸一样 class Qwen2_5_VLVisionBlock(nn.Module): def __init__(self, config, attn_implementation: str = "sdpa") -> None: super().__init__() self.norm1 = Qwen2RMSNorm(config.hidden_size, eps=1e-6) self.norm2 = Qwen2RMSNorm(config.hidden_size, eps=1e-6) self.attn = QWEN2_5_VL_VISION_ATTENTION_CLASSES[attn_implementation]( config.hidden_size, num_heads=config.num_heads ) self.mlp = Qwen2_5_VLMLP(config, bias=True) def forward( self, hidden_states: torch.Tensor, cu_seqlens: torch.Tensor, rotary_pos_emb: Optional[torch.Tensor] = None, position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None, ) -> torch.Tensor: hidden_states = hidden_states + self.attn( self.norm1(hidden_states), cu_seqlens=cu_seqlens, rotary_pos_emb=rotary_pos_emb, position_embeddings=position_embeddings, ) hidden_states = hidden_states + self.mlp(self.norm2(hidden_states)) return hidden_states # TODO PatchEmbed 依赖qwen2-vl的实现 # modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VLPreTrainedModel(Qwen2VLPreTrainedModel): pass # TODO modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VisionTransformerPretrainedModel(Qwen2_5_VLPreTrainedModel): config_class = Qwen2_5_VLVisionConfig _no_split_modules = ["Qwen2_5_VLVisionBlock"] def __init__(self, config, *inputs, **kwargs) -> None: super().__init__(config, *inputs, **kwargs) self.spatial_merge_size = config.spatial_merge_size self.patch_size = config.patch_size self.fullatt_block_indexes = config.fullatt_block_indexes self.window_size = config.window_size self.spatial_merge_unit = self.spatial_merge_size * self.spatial_merge_size self.patch_embed = Qwen2_5_VisionPatchEmbed( patch_size=config.patch_size, temporal_patch_size=config.temporal_patch_size, in_channels=config.in_channels, embed_dim=config.hidden_size, ) head_dim = config.hidden_size // config.num_heads self.rotary_pos_emb = Qwen2_5_VisionRotaryEmbedding(head_dim // 2) self.blocks = nn.ModuleList( [Qwen2_5_VLVisionBlock(config, config._attn_implementation) for _ in range(config.depth)] ) self.merger = Qwen2_5_VLPatchMerger( dim=config.out_hidden_size, context_dim=config.hidden_size, spatial_merge_size=config.spatial_merge_size, ) self.gradient_checkpointing = False def rot_pos_emb(self, grid_thw): pos_ids = [] for t, h, w in grid_thw: hpos_ids = torch.arange(h).unsqueeze(1).expand(-1, w) hpos_ids = hpos_ids.reshape( h // self.spatial_merge_size, self.spatial_merge_size, w // self.spatial_merge_size, self.spatial_merge_size, ) hpos_ids = hpos_ids.permute(0, 2, 1, 3) hpos_ids = hpos_ids.flatten() wpos_ids = torch.arange(w).unsqueeze(0).expand(h, -1) wpos_ids = wpos_ids.reshape( h // self.spatial_merge_size, self.spatial_merge_size, w // self.spatial_merge_size, self.spatial_merge_size, ) wpos_ids = wpos_ids.permute(0, 2, 1, 3) wpos_ids = wpos_ids.flatten() pos_ids.append(torch.stack([hpos_ids, wpos_ids], dim=-1).repeat(t, 1)) pos_ids = torch.cat(pos_ids, dim=0) max_grid_size = grid_thw[:, 1:].max() rotary_pos_emb_full = self.rotary_pos_emb(max_grid_size) rotary_pos_emb = rotary_pos_emb_full[pos_ids].flatten(1) return rotary_pos_emb def get_window_index(self, grid_thw): window_index: list = [] cu_window_seqlens: list = [0] window_index_id = 0 vit_merger_window_size = self.window_size // self.spatial_merge_size // self.patch_size for grid_t, grid_h, grid_w in grid_thw: llm_grid_h, llm_grid_w = ( grid_h // self.spatial_merge_size, grid_w // self.spatial_merge_size, ) index = torch.arange(grid_t * llm_grid_h * llm_grid_w).reshape(grid_t, llm_grid_h, llm_grid_w) pad_h = vit_merger_window_size - llm_grid_h % vit_merger_window_size pad_w = vit_merger_window_size - llm_grid_w % vit_merger_window_size num_windows_h = (llm_grid_h + pad_h) // vit_merger_window_size num_windows_w = (llm_grid_w + pad_w) // vit_merger_window_size index_padded = F.pad(index, (0, pad_w, 0, pad_h), "constant", -100) index_padded = index_padded.reshape( grid_t, num_windows_h, vit_merger_window_size, num_windows_w, vit_merger_window_size, ) index_padded = index_padded.permute(0, 1, 3, 2, 4).reshape( grid_t, num_windows_h * num_windows_w, vit_merger_window_size, vit_merger_window_size, ) seqlens = (index_padded != -100).sum([2, 3]).reshape(-1) index_padded = index_padded.reshape(-1) index_new = index_padded[index_padded != -100] window_index.append(index_new + window_index_id) cu_seqlens_tmp = seqlens.cumsum(0) * self.spatial_merge_unit + cu_window_seqlens[-1] cu_window_seqlens.extend(cu_seqlens_tmp.tolist()) window_index_id += (grid_t * llm_grid_h * llm_grid_w).item() window_index = torch.cat(window_index, dim=0) return window_index, cu_window_seqlens def forward(self, hidden_states: torch.Tensor, grid_thw: torch.Tensor) -> torch.Tensor: """ Args: hidden_states (`torch.Tensor` of shape `(seq_len, hidden_size)`): The final hidden states of the model. grid_thw (`torch.Tensor` of shape `(num_images_or_videos, 3)`): The temporal, height and width of feature shape of each image in LLM. Returns: `torch.Tensor`: hidden_states. """ hidden_states = self.patch_embed(hidden_states) rotary_pos_emb = self.rot_pos_emb(grid_thw) window_index, cu_window_seqlens = self.get_window_index(grid_thw) cu_window_seqlens = torch.tensor( cu_window_seqlens, device=hidden_states.device, dtype=grid_thw.dtype if torch.jit.is_tracing() else torch.int32, ) cu_window_seqlens = torch.unique_consecutive(cu_window_seqlens) seq_len, _ = hidden_states.size() hidden_states = hidden_states.reshape(seq_len // self.spatial_merge_unit, self.spatial_merge_unit, -1) hidden_states = hidden_states[window_index, :, :] hidden_states = hidden_states.reshape(seq_len, -1) rotary_pos_emb = rotary_pos_emb.reshape(seq_len // self.spatial_merge_unit, self.spatial_merge_unit, -1) rotary_pos_emb = rotary_pos_emb[window_index, :, :] rotary_pos_emb = rotary_pos_emb.reshape(seq_len, -1) emb = torch.cat((rotary_pos_emb, rotary_pos_emb), dim=-1) position_embeddings = (emb.cos(), emb.sin()) cu_seqlens = torch.repeat_interleave(grid_thw[:, 1] * grid_thw[:, 2], grid_thw[:, 0]).cumsum( dim=0, # Select dtype based on the following factors: # - FA2 requires that cu_seqlens_q must have dtype int32 # - torch.onnx.export requires that cu_seqlens_q must have same dtype as grid_thw # See https://github.com/huggingface/transformers/pull/34852 for more information dtype=grid_thw.dtype if torch.jit.is_tracing() else torch.int32, ) cu_seqlens = F.pad(cu_seqlens, (1, 0), value=0) for layer_num, blk in enumerate(self.blocks): if layer_num in self.fullatt_block_indexes: cu_seqlens_now = cu_seqlens else: cu_seqlens_now = cu_window_seqlens if self.gradient_checkpointing and self.training: hidden_states = self._gradient_checkpointing_func( blk.__call__, hidden_states, cu_seqlens_now, None, position_embeddings ) else: hidden_states = blk(hidden_states, cu_seqlens=cu_seqlens_now, position_embeddings=position_embeddings) hidden_states = self.merger(hidden_states) reverse_indices = torch.argsort(window_index) hidden_states = hidden_states[reverse_indices, :] return hidden_states # TODO modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VLModel(Qwen2VLModel): pass # TODO modeling_qwen2_5_vl.py实现过了 但是不一样 @dataclass class Qwen2_5_VLCausalLMOutputWithPast(Qwen2VLCausalLMOutputWithPast): pass # TODO modeling_qwen2_5_vl.py实现过了 但是不一样 class Qwen2_5_VLForConditionalGeneration(Qwen2VLForConditionalGeneration): config_class = Qwen2_5_VLConfig _no_split_modules = ["Qwen2_5_VLDecoderLayer", "Qwen2_5_VLVisionBlock"] def __init__(self, config): super().__init__(config) self.visual = Qwen2_5_VisionTransformerPretrainedModel._from_config(config.vision_config) def get_rope_index( self, input_ids: Optional[torch.LongTensor] = None, image_grid_thw: Optional[torch.LongTensor] = None, video_grid_thw: Optional[torch.LongTensor] = None, second_per_grid_ts: Optional[torch.Tensor] = None, attention_mask: Optional[torch.Tensor] = None, ) -> Tuple[torch.Tensor, torch.Tensor]: """ Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation: Each embedding sequence contains vision embedding and text embedding or just contains text embedding. For pure text embedding sequence, the rotary position embedding has no difference with modern LLMs. Examples: input_ids: [T T T T T], here T is for text. temporal position_ids: [0, 1, 2, 3, 4] height position_ids: [0, 1, 2, 3, 4] width position_ids: [0, 1, 2, 3, 4] For vision and text embedding sequence, we calculate 3D rotary position embedding for vision part and 1D rotary position embedding for text part. Examples: Temporal (Time): 3 patches, representing different segments of the video in time. Height: 2 patches, dividing each frame vertically. Width: 2 patches, dividing each frame horizontally. We also have some important parameters: fps (Frames Per Second): The video's frame rate, set to 1. This means one frame is processed each second. tokens_per_second: This is a crucial parameter. It dictates how many "time-steps" or "temporal tokens" are conceptually packed into a one-second interval of the video. In this case, we have 25 tokens per second. So each second of the video will be represented with 25 separate time points. It essentially defines the temporal granularity. temporal_patch_size: The number of frames that compose one temporal patch. Here, it's 2 frames. interval: The step size for the temporal position IDs, calculated as tokens_per_second * temporal_patch_size / fps. In this case, 25 * 2 / 1 = 50. This means that each temporal patch will be have a difference of 50 in the temporal position IDs. input_ids: [V V V V V V V V V V V V T T T T T], here V is for vision. vision temporal position_ids: [0, 0, 0, 0, 50, 50, 50, 50, 100, 100, 100, 100] vision height position_ids: [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1] vision width position_ids: [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1] text temporal position_ids: [101, 102, 103, 104, 105] text height position_ids: [101, 102, 103, 104, 105] text width position_ids: [101, 102, 103, 104, 105] Here we calculate the text start position_ids as the max vision position_ids plus 1. Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide it. image_grid_thw (`torch.LongTensor` of shape `(num_images, 3)`, *optional*): The temporal, height and width of feature shape of each image in LLM. video_grid_thw (`torch.LongTensor` of shape `(num_videos, 3)`, *optional*): The temporal, height and width of feature shape of each video in LLM. second_per_grid_ts (`torch.Tensor` of shape `(num_videos)`, *optional*): The time interval (in seconds) for each grid along the temporal dimension in the 3D position IDs. attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*): Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`: - 1 for tokens that are **not masked**, - 0 for tokens that are **masked**. Returns: position_ids (`torch.LongTensor` of shape `(3, batch_size, sequence_length)`) mrope_position_deltas (`torch.Tensor` of shape `(batch_size)`) """ spatial_merge_size = self.config.vision_config.spatial_merge_size image_token_id = self.config.image_token_id video_token_id = self.config.video_token_id vision_start_token_id = self.config.vision_start_token_id mrope_position_deltas = [] if input_ids is not None and (image_grid_thw is not None or video_grid_thw is not None): total_input_ids = input_ids if attention_mask is None: attention_mask = torch.ones_like(total_input_ids) position_ids = torch.ones( 3, input_ids.shape[0], input_ids.shape[1], dtype=input_ids.dtype, device=input_ids.device, ) image_index, video_index = 0, 0 attention_mask = attention_mask.to(total_input_ids.device) for i, input_ids in enumerate(total_input_ids): input_ids = input_ids[attention_mask[i] == 1] image_nums, video_nums = 0, 0 vision_start_indices = torch.argwhere(input_ids == vision_start_token_id).squeeze(1) vision_tokens = input_ids[vision_start_indices + 1] image_nums = (vision_tokens == image_token_id).sum() video_nums = (vision_tokens == video_token_id).sum() input_tokens = input_ids.tolist() llm_pos_ids_list: list = [] st = 0 remain_images, remain_videos = image_nums, video_nums for _ in range(image_nums + video_nums): if image_token_id in input_tokens and remain_images > 0: ed_image = input_tokens.index(image_token_id, st) else: ed_image = len(input_tokens) + 1 if video_token_id in input_tokens and remain_videos > 0: ed_video = input_tokens.index(video_token_id, st) else: ed_video = len(input_tokens) + 1 if ed_image < ed_video: t, h, w = ( image_grid_thw[image_index][0], image_grid_thw[image_index][1], image_grid_thw[image_index][2], ) second_per_grid_t = 0 image_index += 1 remain_images -= 1 ed = ed_image else: t, h, w = ( video_grid_thw[video_index][0], video_grid_thw[video_index][1], video_grid_thw[video_index][2], ) if second_per_grid_ts is not None: second_per_grid_t = second_per_grid_ts[video_index] else: second_per_grid_t = 1.0 video_index += 1 remain_videos -= 1 ed = ed_video llm_grid_t, llm_grid_h, llm_grid_w = ( t.item(), h.item() // spatial_merge_size, w.item() // spatial_merge_size, ) text_len = ed - st st_idx = llm_pos_ids_list[-1].max() + 1 if len(llm_pos_ids_list) > 0 else 0 llm_pos_ids_list.append(torch.arange(text_len).view(1, -1).expand(3, -1) + st_idx) range_tensor = torch.arange(llm_grid_t).view(-1, 1) expanded_range = range_tensor.expand(-1, llm_grid_h * llm_grid_w) time_tensor = expanded_range * second_per_grid_t * self.config.vision_config.tokens_per_second time_tensor_long = time_tensor.long() t_index = time_tensor_long.flatten() h_index = torch.arange(llm_grid_h).view(1, -1, 1).expand(llm_grid_t, -1, llm_grid_w).flatten() w_index = torch.arange(llm_grid_w).view(1, 1, -1).expand(llm_grid_t, llm_grid_h, -1).flatten() llm_pos_ids_list.append(torch.stack([t_index, h_index, w_index]) + text_len + st_idx) st = ed + llm_grid_t * llm_grid_h * llm_grid_w if st < len(input_tokens): st_idx = llm_pos_ids_list[-1].max() + 1 if len(llm_pos_ids_list) > 0 else 0 text_len = len(input_tokens) - st llm_pos_ids_list.append(torch.arange(text_len).view(1, -1).expand(3, -1) + st_idx) llm_positions = torch.cat(llm_pos_ids_list, dim=1).reshape(3, -1) position_ids[..., i, attention_mask[i] == 1] = llm_positions.to(position_ids.device) mrope_position_deltas.append(llm_positions.max() + 1 - len(total_input_ids[i])) mrope_position_deltas = torch.tensor(mrope_position_deltas, device=input_ids.device).unsqueeze(1) return position_ids, mrope_position_deltas else: if attention_mask is not None: position_ids = attention_mask.long().cumsum(-1) - 1 position_ids.masked_fill_(attention_mask == 0, 1) position_ids = position_ids.unsqueeze(0).expand(3, -1, -1).to(attention_mask.device) max_position_ids = position_ids.max(0, keepdim=False)[0].max(-1, keepdim=True)[0] mrope_position_deltas = max_position_ids + 1 - attention_mask.shape[-1] else: position_ids = ( torch.arange(input_ids.shape[1], device=input_ids.device) .view(1, 1, -1) .expand(3, input_ids.shape[0], -1) ) mrope_position_deltas = torch.zeros( [input_ids.shape[0], 1], device=input_ids.device, dtype=input_ids.dtype, ) return position_ids, mrope_position_deltas def forward( self, input_ids: Optional[torch.LongTensor] = None, attention_mask: Optional[torch.Tensor] = None, position_ids: Optional[torch.LongTensor] = None, past_key_values: Optional[List[torch.FloatTensor]] = None, inputs_embeds: Optional[torch.FloatTensor] = None, labels: Optional[torch.LongTensor] = None, use_cache: Optional[bool] = None, output_attentions: Optional[bool] = None, output_hidden_states: Optional[bool] = None, return_dict: Optional[bool] = None, pixel_values: Optional[torch.Tensor] = None, pixel_values_videos: Optional[torch.FloatTensor] = None, image_grid_thw: Optional[torch.LongTensor] = None, video_grid_thw: Optional[torch.LongTensor] = None, rope_deltas: Optional[torch.LongTensor] = None, cache_position: Optional[torch.LongTensor] = None, second_per_grid_ts: Optional[torch.Tensor] = None, ) -> Union[Tuple, Qwen2_5_VLCausalLMOutputWithPast]: r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked language modeling loss. Indices should either be in `[0, ..., config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored (masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`. Returns: Example: ```python >>> from PIL import Image >>> import requests >>> from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration >>> model = Qwen2_5_VLForConditionalGeneration.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct") >>> processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct") >>> messages = [ { "role": "user", "content": [ {"type": "image"}, {"type": "text", "text": "What is shown in this image?"}, ], }, ] >>> url = "https://www.ilankelman.org/stopsigns/australia.jpg" >>> image = Image.open(requests.get(url, stream=True).raw) >>> text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) >>> inputs = processor(text=[text], images=[image], vision_infos=[vision_infos]) >>> # Generate >>> generate_ids = model.generate(inputs.input_ids, max_length=30) >>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0] "The image shows a street scene with a red stop sign in the foreground. In the background, there is a large red gate with Chinese characters ..." ```""" output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions output_hidden_states = ( output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states ) return_dict = return_dict if return_dict is not None else self.config.use_return_dict if inputs_embeds is None: inputs_embeds = self.model.embed_tokens(input_ids) if pixel_values is not None: pixel_values = pixel_values.type(self.visual.dtype) image_embeds = self.visual(pixel_values, grid_thw=image_grid_thw) n_image_tokens = (input_ids == self.config.image_token_id).sum().item() n_image_features = image_embeds.shape[0] if n_image_tokens != n_image_features: raise ValueError( f"Image features and image tokens do not match: tokens: {n_image_tokens}, features {n_image_features}" ) mask = input_ids == self.config.image_token_id mask_unsqueezed = mask.unsqueeze(-1) mask_expanded = mask_unsqueezed.expand_as(inputs_embeds) image_mask = mask_expanded.to(inputs_embeds.device) image_embeds = image_embeds.to(inputs_embeds.device, inputs_embeds.dtype) inputs_embeds = inputs_embeds.masked_scatter(image_mask, image_embeds) if pixel_values_videos is not None: pixel_values_videos = pixel_values_videos.type(self.visual.dtype) video_embeds = self.visual(pixel_values_videos, grid_thw=video_grid_thw) n_video_tokens = (input_ids == self.config.video_token_id).sum().item() n_video_features = video_embeds.shape[0] if n_video_tokens != n_video_features: raise ValueError( f"Video features and video tokens do not match: tokens: {n_video_tokens}, features {n_video_features}" ) mask = input_ids == self.config.video_token_id mask_unsqueezed = mask.unsqueeze(-1) mask_expanded = mask_unsqueezed.expand_as(inputs_embeds) video_mask = mask_expanded.to(inputs_embeds.device) video_embeds = video_embeds.to(inputs_embeds.device, inputs_embeds.dtype) inputs_embeds = inputs_embeds.masked_scatter(video_mask, video_embeds) if attention_mask is not None: attention_mask = attention_mask.to(inputs_embeds.device) # if we get 4D attention mask we cannot calculate rope deltas anymore. TODO @raushan fixme if position_ids is None and (attention_mask is None or attention_mask.ndim == 2): # calculate RoPE index once per generation in the pre-fill stage only if ( (cache_position is not None and cache_position[0] == 0) or self.rope_deltas is None or (past_key_values is None or past_key_values.get_seq_length() == 0) ): position_ids, rope_deltas = self.get_rope_index( input_ids, image_grid_thw, video_grid_thw, second_per_grid_ts, attention_mask, ) self.rope_deltas = rope_deltas # then use the prev pre-calculated rope-deltas to get the correct position ids else: batch_size, seq_length, _ = inputs_embeds.shape delta = ( (cache_position[0] + self.rope_deltas).to(inputs_embeds.device) if cache_position is not None else 0 ) position_ids = torch.arange(seq_length, device=inputs_embeds.device) position_ids = position_ids.view(1, -1).expand(batch_size, -1) if cache_position is not None: # otherwise `deltas` is an int `0` delta = delta.repeat_interleave(batch_size // delta.shape[0], dim=0) position_ids = position_ids.add(delta) position_ids = position_ids.unsqueeze(0).expand(3, -1, -1) outputs = self.model( input_ids=None, position_ids=position_ids, attention_mask=attention_mask, past_key_values=past_key_values, inputs_embeds=inputs_embeds, use_cache=use_cache, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict, cache_position=cache_position, ) hidden_states = outputs[0] logits = self.lm_head(hidden_states) loss = None if labels is not None: # Upcast to float if we need to compute the loss to avoid potential precision issues logits = logits.float() # Shift so that tokens < n predict n shift_logits = logits[..., :-1, :].contiguous() shift_labels = labels[..., 1:].contiguous() # Flatten the tokens loss_fct = CrossEntropyLoss() shift_logits = shift_logits.view(-1, self.config.vocab_size) shift_labels = shift_labels.view(-1) # Enable model parallelism shift_labels = shift_labels.to(shift_logits.device) loss = loss_fct(shift_logits, shift_labels) if not return_dict: output = (logits,) + outputs[1:] return (loss,) + output if loss is not None else output return Qwen2_5_VLCausalLMOutputWithPast( loss=loss, logits=logits, past_key_values=outputs.past_key_values, hidden_states=outputs.hidden_states, attentions=outputs.attentions, rope_deltas=self.rope_deltas, ) def prepare_inputs_for_generation( self, input_ids, past_key_values=None, attention_mask=None, inputs_embeds=None, cache_position=None, position_ids=None, use_cache=True, pixel_values=None, pixel_values_videos=None, image_grid_thw=None, video_grid_thw=None, second_per_grid_ts=None, **kwargs, ): # Overwritten -- in specific circumstances we don't want to forward image inputs to the model model_inputs = super().prepare_inputs_for_generation( input_ids, past_key_values=past_key_values, attention_mask=attention_mask, inputs_embeds=inputs_embeds, cache_position=cache_position, position_ids=position_ids, pixel_values=pixel_values, pixel_values_videos=pixel_values_videos, image_grid_thw=image_grid_thw, video_grid_thw=video_grid_thw, second_per_grid_ts=second_per_grid_ts, use_cache=use_cache, **kwargs, ) # Qwen2-5-VL position_ids are prepareed with rope_deltas in forward model_inputs["position_ids"] = None if cache_position[0] != 0: model_inputs["pixel_values"] = None model_inputs["pixel_values_videos"] = None return model_inputs class Qwen2_5_VLVideosProcessorKwargs(VideosKwargs, total=False): # fps 字段表示视频的帧率 fps: Union[List[float], float] class Qwen2_5_VLImagesKwargs(Qwen2VLImagesKwargs): pass class Qwen2_5_VLProcessorKwargs(ProcessingKwargs, total=False): images_kwargs: Qwen2_5_VLImagesKwargs videos_kwargs: Qwen2_5_VLVideosProcessorKwargs _defaults = { "text_kwargs": { "padding": False, }, "videos_kwargs": {"fps": 2.0}, } class Qwen2_5_VLProcessor(Qwen2VLProcessor): r""" Constructs a Qwen2.5-VL processor which wraps a Qwen2.5-VL image processor and a Qwen2 tokenizer into a single processor. [`Qwen2_5_VLProcessor`] offers all the functionalities of [`Qwen2VLImageProcessor`] and [`Qwen2TokenizerFast`]. See the [`~Qwen2_5_VLProcessor.__call__`] and [`~Qwen2_5_VLProcessor.decode`] for more information. Args: image_processor ([`Qwen2VLImageProcessor`], *optional*): The image processor is a required input. tokenizer ([`Qwen2TokenizerFast`], *optional*): The tokenizer is a required input. chat_template (`str`, *optional*): A Jinja template which will be used to convert lists of messages in a chat into a tokenizable string. """ image_processor_class = "AutoImageProcessor" @property def model_input_names(self): tokenizer_input_names = self.tokenizer.model_input_names image_processor_input_names = self.image_processor.model_input_names names_from_processor = list(dict.fromkeys(tokenizer_input_names + image_processor_input_names)) return names_from_processor + ["second_per_grid_ts"] def __call__( self, images: ImageInput = None, text: Union[TextInput, PreTokenizedInput, List[TextInput], List[PreTokenizedInput]] = None, videos: VideoInput = None, **kwargs: Unpack[Qwen2_5_VLProcessorKwargs], ) -> BatchFeature: """ Main method to prepare for the model one or several sequences(s) and image(s). This method forwards the `text` and `kwargs` arguments to Qwen2TokenizerFast's [`~Qwen2TokenizerFast.__call__`] if `text` is not `None` to encode the text. To prepare the vision inputs, this method forwards the `vision_infos` and `kwrags` arguments to Qwen2VLImageProcessor's [`~Qwen2VLImageProcessor.__call__`] if `vision_infos` is not `None`. Args: images (`PIL.Image.Image`, `np.ndarray`, `torch.Tensor`, `List[PIL.Image.Image]`, `List[np.ndarray]`, `List[torch.Tensor]`): The image or batch of images to be prepared. Each image can be a PIL image, NumPy array or PyTorch tensor. Both channels-first and channels-last formats are supported. text (`str`, `List[str]`, `List[List[str]]`): The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set `is_split_into_words=True` (to lift the ambiguity with a batch of sequences). videos (`np.ndarray`, `torch.Tensor`, `List[np.ndarray]`, `List[torch.Tensor]`): The image or batch of videos to be prepared. Each video can be a 4D NumPy array or PyTorch tensor, or a nested list of 3D frames. Both channels-first and channels-last formats are supported. return_tensors (`str` or [`~utils.TensorType`], *optional*): If set, will return tensors of a particular framework. Acceptable values are: - `'tf'`: Return TensorFlow `tf.constant` objects. - `'pt'`: Return PyTorch `torch.Tensor` objects. - `'np'`: Return NumPy `np.ndarray` objects. - `'jax'`: Return JAX `jnp.ndarray` objects. Returns: [`BatchFeature`]: A [`BatchFeature`] with the following fields: - **input_ids** -- List of token ids to be fed to a model. Returned when `text` is not `None`. - **attention_mask** -- List of indices specifying which tokens should be attended to by the model (when `return_attention_mask=True` or if *"attention_mask"* is in `self.model_input_names` and if `text` is not `None`). - **pixel_values** -- Pixel values to be fed to a model. Returned when `images` is not `None`. - **pixel_values_videos** -- Pixel values of videos to be fed to a model. Returned when `videos` is not `None`. - **image_grid_thw** -- List of image 3D grid in LLM. Returned when `images` is not `None`. - **video_grid_thw** -- List of video 3D grid in LLM. Returned when `videos` is not `None`. - **second_per_grid_ts** -- List of video seconds per time grid. Returned when `videos` is not `None`. """ output_kwargs = self._merge_kwargs( Qwen2_5_VLProcessorKwargs, tokenizer_init_kwargs=self.tokenizer.init_kwargs, **kwargs, ) if images is not None: image_inputs = self.image_processor(images=images, videos=None, **output_kwargs["images_kwargs"]) image_grid_thw = image_inputs["image_grid_thw"] else: image_inputs = {} image_grid_thw = None if videos is not None: videos_inputs = self.image_processor(images=None, videos=videos, **output_kwargs["images_kwargs"]) video_grid_thw = videos_inputs["video_grid_thw"] fps = output_kwargs["videos_kwargs"].pop("fps", 2.0) if isinstance(fps, (int, float)): second_per_grid_ts = [self.image_processor.temporal_patch_size / fps] * len(video_grid_thw) elif hasattr(fps, "__len__") and len(fps) == len(video_grid_thw): second_per_grid_ts = [self.image_processor.temporal_patch_size / tmp for tmp in fps] else: raise ValueError( f"The length of fps ({len(fps) if hasattr(fps, '__len__') else fps}) must be equal to the length of video_grid_thw ({len(video_grid_thw)}) or fps should be a single number." ) videos_inputs.update({"second_per_grid_ts": second_per_grid_ts}) else: videos_inputs = {} video_grid_thw = None if not isinstance(text, list): text = [text] if image_grid_thw is not None: merge_length = self.image_processor.merge_size ** 2 index = 0 for i in range(len(text)): while self.image_token in text[i]: text[i] = text[i].replace( self.image_token, "<|placeholder|>" * (image_grid_thw[index].prod() // merge_length), 1, ) index += 1 text[i] = text[i].replace("<|placeholder|>", self.image_token) if video_grid_thw is not None: merge_length = self.image_processor.merge_size ** 2 index = 0 for i in range(len(text)): while self.video_token in text[i]: text[i] = text[i].replace( self.video_token, "<|placeholder|>" * (video_grid_thw[index].prod() // merge_length), 1, ) index += 1 text[i] = text[i].replace("<|placeholder|>", self.video_token) text_inputs = self.tokenizer(text, **output_kwargs["text_kwargs"]) return BatchFeature(data={**text_inputs, **image_inputs, **videos_inputs}) __all__ = [ "Qwen2_5_VLConfig", "Qwen2_5_VLForConditionalGeneration", "Qwen2_5_VLModel", "Qwen2_5_VLPreTrainedModel", "Qwen2_5_VLProcessor", ] ### Who can help? @vanpelt ### 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 删除无用代码 ### Expected behavior 删除无用代码
{ "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41023/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41023/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/41022
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41022/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41022/comments
https://api.github.com/repos/huggingface/transformers/issues/41022/events
https://github.com/huggingface/transformers/pull/41022
3,436,906,853
PR_kwDOCUB6oc6po9od
41,022
🌐 [i18n-KO] Translated `backbones.md` to Korean
{ "login": "yijun-lee", "id": 119404328, "node_id": "U_kgDOBx33KA", "avatar_url": "https://avatars.githubusercontent.com/u/119404328?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yijun-lee", "html_url": "https://github.com/yijun-lee", "followers_url": "https://api.github.com/users/yijun-lee/followers", "following_url": "https://api.github.com/users/yijun-lee/following{/other_user}", "gists_url": "https://api.github.com/users/yijun-lee/gists{/gist_id}", "starred_url": "https://api.github.com/users/yijun-lee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yijun-lee/subscriptions", "organizations_url": "https://api.github.com/users/yijun-lee/orgs", "repos_url": "https://api.github.com/users/yijun-lee/repos", "events_url": "https://api.github.com/users/yijun-lee/events{/privacy}", "received_events_url": "https://api.github.com/users/yijun-lee/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-20T08:24:27
2025-09-22T02:59:56
null
CONTRIBUTOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41022", "html_url": "https://github.com/huggingface/transformers/pull/41022", "diff_url": "https://github.com/huggingface/transformers/pull/41022.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41022.patch", "merged_at": null }
# What does this PR do? Translated the `backbones.md` file of the documentation to Korean. Thank you in advance for your review. Part of https://github.com/huggingface/transformers/issues/20179 ## Before reviewing - [x] Check for missing / redundant translations (번역 누락/중복 검사) - [x] Grammar Check (맞춤법 검사) - [x] Review or Add new terms to glossary (용어 확인 및 추가) - [x] Check Inline TOC (e.g. `[[lowercased-header]]`) - [x] Check live-preview for gotchas (live-preview로 정상작동 확인) ## Who can review? (Initial) <!-- 1. 위 체크가 모두 완료된 뒤에만 KREW 팀원들에게 리뷰를 요청하는 아래 주석을 노출해주세요!--> May you please review this PR? <!-- @jungnerd, @luckyvickyricky, @chelsseeey, @skwh54, @maximizemaxwell, @D15M4S --> <!-- @harheem, @nsbg, @Youngdong2, @xhaktm00, @judy-choi --> <!-- @4N3MONE, @Kim-Ju-won, @ahnjj, @FacerAin, @ssum21, @TaskerJang, @HyunZ118 --> <!-- @yijun-lee, @chhaewxn, @AhnJoonSung, @seopp, @pyapyapya --> @AhnJoonSung, @nsbg, @Kim-Ju-won, @FacerAin, @judy-choi, @HyunZ118, @jungnerd ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? (Final) <!-- 2. KREW 팀원들의 리뷰가 끝난 후에 아래 주석을 노출해주세요! --> <!-- @stevhliu May you please review this PR? -->
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41022/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41022/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41021
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41021/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41021/comments
https://api.github.com/repos/huggingface/transformers/issues/41021/events
https://github.com/huggingface/transformers/pull/41021
3,436,905,475
PR_kwDOCUB6oc6po9WJ
41,021
🌐 [i18n-KO] Translated `video_processors.md` to Korean
{ "login": "AhnJoonSung", "id": 53860803, "node_id": "MDQ6VXNlcjUzODYwODAz", "avatar_url": "https://avatars.githubusercontent.com/u/53860803?v=4", "gravatar_id": "", "url": "https://api.github.com/users/AhnJoonSung", "html_url": "https://github.com/AhnJoonSung", "followers_url": "https://api.github.com/users/AhnJoonSung/followers", "following_url": "https://api.github.com/users/AhnJoonSung/following{/other_user}", "gists_url": "https://api.github.com/users/AhnJoonSung/gists{/gist_id}", "starred_url": "https://api.github.com/users/AhnJoonSung/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AhnJoonSung/subscriptions", "organizations_url": "https://api.github.com/users/AhnJoonSung/orgs", "repos_url": "https://api.github.com/users/AhnJoonSung/repos", "events_url": "https://api.github.com/users/AhnJoonSung/events{/privacy}", "received_events_url": "https://api.github.com/users/AhnJoonSung/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-20T08:23:26
2025-10-18T05:42:43
null
CONTRIBUTOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41021", "html_url": "https://github.com/huggingface/transformers/pull/41021", "diff_url": "https://github.com/huggingface/transformers/pull/41021.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41021.patch", "merged_at": null }
# What does this PR do? Translated the `video_processors.md` file of the documentation to Korean. Thank you in advance for your review. Part of https://github.com/huggingface/transformers/issues/20179 ## Before reviewing - [x] Check for missing / redundant translations (번역 누락/중복 검사) - [x] Grammar Check (맞춤법 검사) - [x] Review or Add new terms to glossary (용어 확인 및 추가) - [x] Check Inline TOC (e.g. `[[lowercased-header]]`) - [x] Check live-preview for gotchas (live-preview로 정상작동 확인) ## Who can review? (Initial) May you please review this PR? @jungnerd, @yijun-lee, @Kim-Ju-won, @FacerAin, @judy-choi, @maximizemaxwell, @nsbg, @HyunZ118 ## Before submitting - [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests), Pull Request section? - [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? (Final) <!-- 2. KREW 팀원들의 리뷰가 끝난 후에 아래 주석을 노출해주세요! --> @stevhliu May you please review this PR?
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41021/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41021/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41020
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41020/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41020/comments
https://api.github.com/repos/huggingface/transformers/issues/41020/events
https://github.com/huggingface/transformers/issues/41020
3,436,871,790
I_kwDOCUB6oc7M2oBu
41,020
Config rope_scaling and text_config.rope_scaling might be the same or different dict objects
{ "login": "albertvillanova", "id": 8515462, "node_id": "MDQ6VXNlcjg1MTU0NjI=", "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "gravatar_id": "", "url": "https://api.github.com/users/albertvillanova", "html_url": "https://github.com/albertvillanova", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "repos_url": "https://api.github.com/users/albertvillanova/repos", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-20T07:46:23
2025-09-30T17:23:45
2025-09-30T17:23:45
MEMBER
null
null
null
null
### System Info - `transformers` version: 4.57.0.dev0 - Platform: Linux-5.15.0-153-generic-x86_64-with-glibc2.31 - Python version: 3.12.9 - Huggingface_hub version: 0.34.4 - Safetensors version: 0.6.2 - Accelerate version: 1.4.0 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (accelerator?): 2.8.0+cu128 (NA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: no ### Who can help? _No response_ ### Information - [ ] The official example scripts - [ ] 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 After investigation of an issue in `trl`, I found a weird behavior of `transformers` config `rope_scaling`: the `config.rope_scaling` (at the root config level) and `config.text_config.rope_scaling` (under `text_config`) might be the same or different dict objects depending on whether we pass `text_config` param to `AutoConfig.from_pretrained` - if we don't pass `text_config` param, the 2 `rope_scaling` point to the same dict object - if we pass `text_config` param, the 2 `rope_scaling` are different dict objects ```python In [1]: from transformers import AutoConfig In [2]: model_id = "Qwen/Qwen2.5-VL-3B-Instruct" In [3]: config1 = AutoConfig.from_pretrained(model_id) In [4]: config1.text_config.rope_scaling Out[4]: {'type': 'default', 'mrope_section': [16, 24, 24], 'rope_type': 'default'} In [5]: config1.rope_scaling Out[5]: {'type': 'default', 'mrope_section': [16, 24, 24], 'rope_type': 'default'} In [6]: id(config1.text_config.rope_scaling) Out[6]: 140211029392000 In [7]: id(config1.rope_scaling) Out[7]: 140211029392000 # Both are the same dict object In [8]: config2 = AutoConfig.from_pretrained(model_id, text_config={}) In [9]:config2.text_config.rope_scaling Out[9]: {'type': 'default', 'mrope_section': [16, 24, 24], 'rope_type': 'default'} In [10]: config2.rope_scaling Out[10]: {'type': 'default', 'mrope_section': [16, 24, 24], 'rope_type': 'default'} In [11]: id(config2.text_config.rope_scaling) Out[11]: 140210801100608 In [12]: id(config2.rope_scaling) Out[12]: 140211029786688 # Both are different dict objects ``` Is this expected? We discovered this while investigating why changing (after initialization) the `config.text_config.rope_scaling` will or will not change the `config.rope_scaling` as well. See related comment in `trl` PR: - https://github.com/huggingface/trl/pull/4101#issuecomment-3305590742 ### Expected behavior - Either they should be the same dict object in any case - Or they should be different dict objects in any case
{ "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/41020/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41020/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/41019
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41019/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41019/comments
https://api.github.com/repos/huggingface/transformers/issues/41019/events
https://github.com/huggingface/transformers/pull/41019
3,436,869,382
PR_kwDOCUB6oc6po3U4
41,019
docs(tokenization): Add clarification for train_new_from_iterator
{ "login": "lilin-1", "id": 177207022, "node_id": "U_kgDOCo_27g", "avatar_url": "https://avatars.githubusercontent.com/u/177207022?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lilin-1", "html_url": "https://github.com/lilin-1", "followers_url": "https://api.github.com/users/lilin-1/followers", "following_url": "https://api.github.com/users/lilin-1/following{/other_user}", "gists_url": "https://api.github.com/users/lilin-1/gists{/gist_id}", "starred_url": "https://api.github.com/users/lilin-1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lilin-1/subscriptions", "organizations_url": "https://api.github.com/users/lilin-1/orgs", "repos_url": "https://api.github.com/users/lilin-1/repos", "events_url": "https://api.github.com/users/lilin-1/events{/privacy}", "received_events_url": "https://api.github.com/users/lilin-1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-20T07:42:39
2025-09-22T10:16:37
2025-09-22T10:16:37
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41019", "html_url": "https://github.com/huggingface/transformers/pull/41019", "diff_url": "https://github.com/huggingface/transformers/pull/41019.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41019.patch", "merged_at": null }
# Add a note to the documentation clarifying that the train_new_from_iterator method in the 🤗 Tokenizers library uses the BPE algorithm to construct the vocabulary, not a true WordPiece implementation. ## What does this PR do? This PR improves the documentation of the `train_new_from_iterator` method in `tokenization_utils_fast.py` by adding an explicit note to clarify its underlying vocabulary construction logic. Specifically, a line is added to the method's docstring: `Note that the train_new_from_iterator() method in the 🤗 Tokenizers library uses BPE to construct the vocabulary, not a true WordPiece implementation.` ### Motivation & Context The change addresses two key pain points observed in practical use and community contexts: 1. **End-user misunderstanding**: When relying solely on existing documentation, users (including the contributor's team) may expect the method to generate a WordPiece vocabulary (e.g., when working with WordPiece-based tokenizers like `BertTokenizerFast`), but instead receive a BPE-based vocabulary—leading to unintended discrepancies in workflow. 2. **Community confusion**: Multiple research papers reference "using WordPiece via the 🤗 Tokenizers library" without distinguishing that `train_new_from_iterator` relies on BPE under the hood. This note helps align documentation with real-world usage and reduces academic/developmental ambiguity. The clarification is consistent with details provided in the [Hugging Face LLM Course](https://huggingface.co/course/chapter6/5), which explicitly states that the 🤗 Tokenizers library uses BPE for training (rather than WordPiece) due to incomplete clarity on WordPiece's internal mechanisms. Fixes # (N/A – this is a proactive documentation improvement, not tied to an existing 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. *Note: This is a proactive documentation update based on observed user/community confusion, not pre-discussed in an issue/forum.* - [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? *Note: No new tests are required, as this change only modifies documentation (no code logic updates).* ## Who can review? Tag relevant reviewers below (fewer than 3 people): - @ArthurZucker (relevant to tokenizer-related changes, per template guidance) - @stevhliu (relevant to documentation improvements, per template guidance)
{ "login": "lilin-1", "id": 177207022, "node_id": "U_kgDOCo_27g", "avatar_url": "https://avatars.githubusercontent.com/u/177207022?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lilin-1", "html_url": "https://github.com/lilin-1", "followers_url": "https://api.github.com/users/lilin-1/followers", "following_url": "https://api.github.com/users/lilin-1/following{/other_user}", "gists_url": "https://api.github.com/users/lilin-1/gists{/gist_id}", "starred_url": "https://api.github.com/users/lilin-1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lilin-1/subscriptions", "organizations_url": "https://api.github.com/users/lilin-1/orgs", "repos_url": "https://api.github.com/users/lilin-1/repos", "events_url": "https://api.github.com/users/lilin-1/events{/privacy}", "received_events_url": "https://api.github.com/users/lilin-1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41019/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41019/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41018
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41018/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41018/comments
https://api.github.com/repos/huggingface/transformers/issues/41018/events
https://github.com/huggingface/transformers/pull/41018
3,436,760,409
PR_kwDOCUB6oc6pofik
41,018
[testing] Fix `qwen2_audio`
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-20T06:31:07
2025-09-22T10:45:32
2025-09-22T10:45:31
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41018", "html_url": "https://github.com/huggingface/transformers/pull/41018", "diff_url": "https://github.com/huggingface/transformers/pull/41018.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41018.patch", "merged_at": "2025-09-22T10:45:31" }
# What does this PR do? complete broken qwen2_audio ...
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41018/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41018/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41017
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41017/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41017/comments
https://api.github.com/repos/huggingface/transformers/issues/41017/events
https://github.com/huggingface/transformers/pull/41017
3,436,408,813
PR_kwDOCUB6oc6pnTXy
41,017
🚨 [V5] Remove deprecated training arguments
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-20T01:50:23
2025-09-24T10:10:35
2025-09-24T10:01:28
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41017", "html_url": "https://github.com/huggingface/transformers/pull/41017", "diff_url": "https://github.com/huggingface/transformers/pull/41017.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41017.patch", "merged_at": "2025-09-24T10:01:28" }
# What does this PR do? Remove deprecated training arguments from `TrainingArguments`
{ "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/41017/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41017/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41016
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41016/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41016/comments
https://api.github.com/repos/huggingface/transformers/issues/41016/events
https://github.com/huggingface/transformers/pull/41016
3,435,797,676
PR_kwDOCUB6oc6plLmF
41,016
Add efficient logits_to_keep masking to ZambaForCausalLM for constrained generation
{ "login": "Aniketsy", "id": 148300120, "node_id": "U_kgDOCNbhWA", "avatar_url": "https://avatars.githubusercontent.com/u/148300120?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Aniketsy", "html_url": "https://github.com/Aniketsy", "followers_url": "https://api.github.com/users/Aniketsy/followers", "following_url": "https://api.github.com/users/Aniketsy/following{/other_user}", "gists_url": "https://api.github.com/users/Aniketsy/gists{/gist_id}", "starred_url": "https://api.github.com/users/Aniketsy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Aniketsy/subscriptions", "organizations_url": "https://api.github.com/users/Aniketsy/orgs", "repos_url": "https://api.github.com/users/Aniketsy/repos", "events_url": "https://api.github.com/users/Aniketsy/events{/privacy}", "received_events_url": "https://api.github.com/users/Aniketsy/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-19T20:24:38
2025-10-01T12:08:36
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41016", "html_url": "https://github.com/huggingface/transformers/pull/41016", "diff_url": "https://github.com/huggingface/transformers/pull/41016.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41016.patch", "merged_at": null }
#40984 This PR updates the `ZambaForCausalLM` forward method to efficiently mask logits using the `logits_to_keep` argument. It supports both top-k and index-based selection, setting all other logits to `-inf` after projection. Please let me know if my approach or fix needs any improvements . I’m open to feedback and happy to make changes based on suggestions. Thankyou !
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41016/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41016/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41015
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41015/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41015/comments
https://api.github.com/repos/huggingface/transformers/issues/41015/events
https://github.com/huggingface/transformers/pull/41015
3,435,672,874
PR_kwDOCUB6oc6pkwWt
41,015
Embed interactive timeline in docs
{ "login": "yonigozlan", "id": 74535834, "node_id": "MDQ6VXNlcjc0NTM1ODM0", "avatar_url": "https://avatars.githubusercontent.com/u/74535834?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yonigozlan", "html_url": "https://github.com/yonigozlan", "followers_url": "https://api.github.com/users/yonigozlan/followers", "following_url": "https://api.github.com/users/yonigozlan/following{/other_user}", "gists_url": "https://api.github.com/users/yonigozlan/gists{/gist_id}", "starred_url": "https://api.github.com/users/yonigozlan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yonigozlan/subscriptions", "organizations_url": "https://api.github.com/users/yonigozlan/orgs", "repos_url": "https://api.github.com/users/yonigozlan/repos", "events_url": "https://api.github.com/users/yonigozlan/events{/privacy}", "received_events_url": "https://api.github.com/users/yonigozlan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T19:35:41
2025-09-30T01:36:08
2025-09-30T01:36:08
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41015", "html_url": "https://github.com/huggingface/transformers/pull/41015", "diff_url": "https://github.com/huggingface/transformers/pull/41015.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41015.patch", "merged_at": "2025-09-30T01:36:08" }
# What does this PR do? As the title says
{ "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/41015/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41015/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41014
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41014/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41014/comments
https://api.github.com/repos/huggingface/transformers/issues/41014/events
https://github.com/huggingface/transformers/pull/41014
3,435,589,815
PR_kwDOCUB6oc6pkddq
41,014
Update after #41007
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T19:09:38
2025-09-19T19:55:48
2025-09-19T19:55:46
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41014", "html_url": "https://github.com/huggingface/transformers/pull/41014", "diff_url": "https://github.com/huggingface/transformers/pull/41014.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41014.patch", "merged_at": "2025-09-19T19:55:46" }
# What does this PR do? Kudos to @vasqu to point out it's a missing torch.no_grad() https://github.com/huggingface/transformers/pull/41007#discussion_r2363556135 https://github.com/huggingface/transformers/pull/41007#discussion_r2364096801
{ "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/41014/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41014/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41013
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41013/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41013/comments
https://api.github.com/repos/huggingface/transformers/issues/41013/events
https://github.com/huggingface/transformers/issues/41013
3,435,486,915
I_kwDOCUB6oc7MxV7D
41,013
Runtime errors when trying to call Trainer() on a model that exceeds GPU vRAM
{ "login": "ag-TJNII", "id": 69820911, "node_id": "MDQ6VXNlcjY5ODIwOTEx", "avatar_url": "https://avatars.githubusercontent.com/u/69820911?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ag-TJNII", "html_url": "https://github.com/ag-TJNII", "followers_url": "https://api.github.com/users/ag-TJNII/followers", "following_url": "https://api.github.com/users/ag-TJNII/following{/other_user}", "gists_url": "https://api.github.com/users/ag-TJNII/gists{/gist_id}", "starred_url": "https://api.github.com/users/ag-TJNII/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ag-TJNII/subscriptions", "organizations_url": "https://api.github.com/users/ag-TJNII/orgs", "repos_url": "https://api.github.com/users/ag-TJNII/repos", "events_url": "https://api.github.com/users/ag-TJNII/events{/privacy}", "received_events_url": "https://api.github.com/users/ag-TJNII/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-19T18:40:51
2025-09-29T14:31:43
2025-09-29T14:31:43
NONE
null
null
null
null
### System Info - `transformers` version: 4.56.1 - Platform: Linux-6.12.43+deb13-amd64-x86_64-with-glibc2.41 - Python version: 3.13.5 - Huggingface_hub version: 0.35.0 - Safetensors version: 0.6.2 - Accelerate version: 1.10.1 - Accelerate config: - compute_environment: LOCAL_MACHINE - distributed_type: NO - mixed_precision: no - use_cpu: False - debug: False - num_processes: 1 - machine_rank: 0 - num_machines: 1 - gpu_ids: all - 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 (accelerator?): 2.8.0+cu128 (CUDA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: <fill in> - Using GPU in script?: Yes - GPU type: NVIDIA GeForce RTX 5060 Ti ### Who can help? @zach-huggingface @SunMarc ### 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 based on the quickstart instructions, but is not an officially published script. Models referenced are `git clone`s of the following models: - https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B - https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B ``` #!/usr/bin/env python3 # Simplification of the example at https://huggingface.co/docs/transformers/quicktour import os import argparse from pathlib import Path from transformers import AutoModelForCausalLM, TrainingArguments, Trainer def main(): parser = argparse.ArgumentParser(description="Fine-tune a LLM on HTML files using LoRA.") parser.add_argument("--model", type=Path, required=True, help="Directory containing pretrained HuggingFace model") args = parser.parse_args() model = AutoModelForCausalLM.from_pretrained(args.model, dtype="auto", device_map="auto") training_args = TrainingArguments( output_dir="/tmp/spool", per_device_train_batch_size=1, num_train_epochs=1, ) Trainer( model=model, args=training_args, ) print("Success") if __name__ == "__main__": main() ``` ``` $ ./trainer_example.py --model /host/models/DeepSeek-R1-Distill-Qwen-1.5B Success $ ./trainer_example.py --model /host/models/DeepSeek-R1-Distill-Qwen-14B Loading checkpoint shards: <Snip TUI status bar> Some parameters are on the meta device because they were offloaded to the cpu. You shouldn't move a model that is dispatched using accelerate hooks. Traceback (most recent call last): File "/host/trainer/build_files/app/./trainer_example.py", line 30, in <module> main() ~~~~^^ File "/host/trainer/build_files/app/./trainer_example.py", line 22, in main Trainer( ~~~~~~~^ model=model, ^^^^^^^^^^^^ args=training_args, ^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/dist-packages/transformers/utils/deprecation.py", line 172, in wrapped_func return func(*args, **kwargs) File "/usr/local/lib/python3.13/dist-packages/transformers/trainer.py", line 620, in __init__ self._move_model_to_device(model, args.device) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/dist-packages/transformers/trainer.py", line 913, in _move_model_to_device model = model.to(device) File "/usr/local/lib/python3.13/dist-packages/accelerate/big_modeling.py", line 462, in wrapper raise RuntimeError("You can't move a model that has some modules offloaded to cpu or disk.") RuntimeError: You can't move a model that has some modules offloaded to cpu or disk. ``` Calling via `accelerate launch` did not impact the error. ### Expected behavior The exception is about an internal action being taken by the library. As a user of the library I'm not sure what action I need to take to resolve this or what config I need to change. The exception should ideally be caught by the code trying to do the move and mitigate it, or bubble it up in a way the user can identify which inputs are causing the error. From reading the docs offloading should allow this to work. There's still a high probability of user error here, but I can't suss it out from the exceptions I'm getting back, and that's a issue. If this is user error then I think the bug is how the error is presented to the top level code. Thank you for your work here. I was able to train a small model without needing a deep understanding of what was going on. That's really cool!
{ "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/41013/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41013/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/41012
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41012/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41012/comments
https://api.github.com/repos/huggingface/transformers/issues/41012/events
https://github.com/huggingface/transformers/pull/41012
3,435,366,111
PR_kwDOCUB6oc6pjwuJ
41,012
Fix benchmark runner argument name
{ "login": "ahadnagy", "id": 21314428, "node_id": "MDQ6VXNlcjIxMzE0NDI4", "avatar_url": "https://avatars.githubusercontent.com/u/21314428?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ahadnagy", "html_url": "https://github.com/ahadnagy", "followers_url": "https://api.github.com/users/ahadnagy/followers", "following_url": "https://api.github.com/users/ahadnagy/following{/other_user}", "gists_url": "https://api.github.com/users/ahadnagy/gists{/gist_id}", "starred_url": "https://api.github.com/users/ahadnagy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ahadnagy/subscriptions", "organizations_url": "https://api.github.com/users/ahadnagy/orgs", "repos_url": "https://api.github.com/users/ahadnagy/repos", "events_url": "https://api.github.com/users/ahadnagy/events{/privacy}", "received_events_url": "https://api.github.com/users/ahadnagy/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T18:07:54
2025-09-20T08:53:57
2025-09-20T08:53:56
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41012", "html_url": "https://github.com/huggingface/transformers/pull/41012", "diff_url": "https://github.com/huggingface/transformers/pull/41012.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41012.patch", "merged_at": "2025-09-20T08:53:56" }
# What does this PR do? Fix a small mistake in the invocation of the benchmark runner script. ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "ahadnagy", "id": 21314428, "node_id": "MDQ6VXNlcjIxMzE0NDI4", "avatar_url": "https://avatars.githubusercontent.com/u/21314428?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ahadnagy", "html_url": "https://github.com/ahadnagy", "followers_url": "https://api.github.com/users/ahadnagy/followers", "following_url": "https://api.github.com/users/ahadnagy/following{/other_user}", "gists_url": "https://api.github.com/users/ahadnagy/gists{/gist_id}", "starred_url": "https://api.github.com/users/ahadnagy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ahadnagy/subscriptions", "organizations_url": "https://api.github.com/users/ahadnagy/orgs", "repos_url": "https://api.github.com/users/ahadnagy/repos", "events_url": "https://api.github.com/users/ahadnagy/events{/privacy}", "received_events_url": "https://api.github.com/users/ahadnagy/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41012/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41012/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41011
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41011/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41011/comments
https://api.github.com/repos/huggingface/transformers/issues/41011/events
https://github.com/huggingface/transformers/pull/41011
3,435,091,978
PR_kwDOCUB6oc6pi5r7
41,011
Fix Glm4v test
{ "login": "Cyrilvallez", "id": 71554963, "node_id": "MDQ6VXNlcjcxNTU0OTYz", "avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Cyrilvallez", "html_url": "https://github.com/Cyrilvallez", "followers_url": "https://api.github.com/users/Cyrilvallez/followers", "following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}", "gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}", "starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions", "organizations_url": "https://api.github.com/users/Cyrilvallez/orgs", "repos_url": "https://api.github.com/users/Cyrilvallez/repos", "events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}", "received_events_url": "https://api.github.com/users/Cyrilvallez/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T16:51:17
2025-09-23T10:08:51
2025-09-19T16:54:26
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41011", "html_url": "https://github.com/huggingface/transformers/pull/41011", "diff_url": "https://github.com/huggingface/transformers/pull/41011.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41011.patch", "merged_at": "2025-09-19T16:54:26" }
# What does this PR do?
{ "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/41011/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41011/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41010
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41010/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41010/comments
https://api.github.com/repos/huggingface/transformers/issues/41010/events
https://github.com/huggingface/transformers/pull/41010
3,434,869,506
PR_kwDOCUB6oc6piIOu
41,010
[`Kernels Attention`] Change fallback logic to error out on explicit kernels request and include FA3
{ "login": "vasqu", "id": 73884904, "node_id": "MDQ6VXNlcjczODg0OTA0", "avatar_url": "https://avatars.githubusercontent.com/u/73884904?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vasqu", "html_url": "https://github.com/vasqu", "followers_url": "https://api.github.com/users/vasqu/followers", "following_url": "https://api.github.com/users/vasqu/following{/other_user}", "gists_url": "https://api.github.com/users/vasqu/gists{/gist_id}", "starred_url": "https://api.github.com/users/vasqu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vasqu/subscriptions", "organizations_url": "https://api.github.com/users/vasqu/orgs", "repos_url": "https://api.github.com/users/vasqu/repos", "events_url": "https://api.github.com/users/vasqu/events{/privacy}", "received_events_url": "https://api.github.com/users/vasqu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T15:40:36
2025-09-29T15:11:04
2025-09-29T15:10:59
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41010", "html_url": "https://github.com/huggingface/transformers/pull/41010", "diff_url": "https://github.com/huggingface/transformers/pull/41010.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41010.patch", "merged_at": "2025-09-29T15:10:59" }
As per title. Atm, we just fallback to sdpa/eager even when a kernel was explicitly requested and it caused some hidden states when I ran tests for the bert refactor (not good!). Imo, just as any other attention type, we should error out when the explicit request cannot be met. Fallbacks are just more confusing in that case. Additional change: - Flash attention 3 was originally not considered in this fallback option. Let's do this here as well (?) Test via `tests/utils/test_modeling_utils.py -k TestAttentionImplementation` (requires different deps, e.g. kernels + no flash, no kernels + no flash, ...) cc @ArthurZucker @Cyrilvallez
{ "login": "vasqu", "id": 73884904, "node_id": "MDQ6VXNlcjczODg0OTA0", "avatar_url": "https://avatars.githubusercontent.com/u/73884904?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vasqu", "html_url": "https://github.com/vasqu", "followers_url": "https://api.github.com/users/vasqu/followers", "following_url": "https://api.github.com/users/vasqu/following{/other_user}", "gists_url": "https://api.github.com/users/vasqu/gists{/gist_id}", "starred_url": "https://api.github.com/users/vasqu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vasqu/subscriptions", "organizations_url": "https://api.github.com/users/vasqu/orgs", "repos_url": "https://api.github.com/users/vasqu/repos", "events_url": "https://api.github.com/users/vasqu/events{/privacy}", "received_events_url": "https://api.github.com/users/vasqu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41010/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41010/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41009
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41009/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41009/comments
https://api.github.com/repos/huggingface/transformers/issues/41009/events
https://github.com/huggingface/transformers/pull/41009
3,434,856,230
PR_kwDOCUB6oc6piFWT
41,009
Add Lexa-Delta model support
{ "login": "hovhannisians", "id": 51156797, "node_id": "MDQ6VXNlcjUxMTU2Nzk3", "avatar_url": "https://avatars.githubusercontent.com/u/51156797?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hovhannisians", "html_url": "https://github.com/hovhannisians", "followers_url": "https://api.github.com/users/hovhannisians/followers", "following_url": "https://api.github.com/users/hovhannisians/following{/other_user}", "gists_url": "https://api.github.com/users/hovhannisians/gists{/gist_id}", "starred_url": "https://api.github.com/users/hovhannisians/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hovhannisians/subscriptions", "organizations_url": "https://api.github.com/users/hovhannisians/orgs", "repos_url": "https://api.github.com/users/hovhannisians/repos", "events_url": "https://api.github.com/users/hovhannisians/events{/privacy}", "received_events_url": "https://api.github.com/users/hovhannisians/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-19T15:36:42
2025-09-22T12:03:16
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41009", "html_url": "https://github.com/huggingface/transformers/pull/41009", "diff_url": "https://github.com/huggingface/transformers/pull/41009.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41009.patch", "merged_at": null }
This PR introduces **Lexa-Delta**, a new large language model developed by **Robi Labs**, as a first-class model in the 🤗 Transformers library. ### What’s included * **Configuration**: `LexaDeltaConfig` (`model_type="lexa_delta"`) * **Model**: `LexaDeltaForCausalLM`, inheriting from `GptOssForCausalLM` * **Tokenizer**: `LexaDeltaTokenizerFast` (inherits from `PreTrainedTokenizerFast`) * **Docs**: `docs/source/en/model_doc/lexa_delta.md` with usage examples and architecture details * **Auto-registry**: Added `lexa_delta` to `configuration_auto.py`, `modeling_auto.py`, and `tokenization_auto.py` ### Motivation Lexa-Delta is designed as an independent model type under Robi Labs, while reusing GPT-OSS architecture internally. This allows developers to: * Load models with `AutoModelForCausalLM.from_pretrained("RobiLabs/Lexa-Delta")` * Use `lexa_delta` config/tokenizer classes directly * Extend future work on the Lexa family of models without relying on GPT-OSS naming ### Example Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer model = AutoModelForCausalLM.from_pretrained("RobiLabs/Lexa-Delta") tokenizer = AutoTokenizer.from_pretrained("RobiLabs/Lexa-Delta") inputs = tokenizer("Hello, Lexa!", return_tensors="pt") outputs = model.generate(**inputs) print(tokenizer.decode(outputs[0])) ``` ### Next Steps * Add unit tests under `tests/models/lexa_delta/` * Community review for merge
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41009/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41009/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41008
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41008/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41008/comments
https://api.github.com/repos/huggingface/transformers/issues/41008/events
https://github.com/huggingface/transformers/pull/41008
3,434,622,924
PR_kwDOCUB6oc6phRcP
41,008
Patch more `unittest.case.TestCase.assertXXX` methods
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T14:31:54
2025-09-19T14:41:05
2025-09-19T14:38:12
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41008", "html_url": "https://github.com/huggingface/transformers/pull/41008", "diff_url": "https://github.com/huggingface/transformers/pull/41008.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41008.patch", "merged_at": "2025-09-19T14:38:12" }
# What does this PR do? Extend #40727 will merge directly
{ "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/41008/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41008/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41007
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41007/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41007/comments
https://api.github.com/repos/huggingface/transformers/issues/41007/events
https://github.com/huggingface/transformers/pull/41007
3,434,567,750
PR_kwDOCUB6oc6phFP0
41,007
Fix `PhimoeIntegrationTest`
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T14:18:52
2025-09-19T18:57:28
2025-09-19T16:43:47
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41007", "html_url": "https://github.com/huggingface/transformers/pull/41007", "diff_url": "https://github.com/huggingface/transformers/pull/41007.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41007.patch", "merged_at": "2025-09-19T16:43:47" }
# What does this PR do? This test just get the pytest process being killed due to CPU OOM. ``` tests/models/phimoe/test_modeling_phimoe.py::PhimoeIntegrationTest::test_model_phimoe_instruct_logits -------------------------------- live log call --------------------------------- WARNING transformers.modeling_rope_utils:modeling_rope_utils.py:418 Unrecognized keys in `rope_scaling` for 'rope_type'='longrope': {'short_mscale', 'long_mscale'} WARNING transformers.modeling_rope_utils:logging.py:328 This model has set a `original_max_position_embeddings` field, to be used together with `max_position_embeddings` to determine a scaling factor. Please set the `factor` field of `rope_scaling`with this ratio instead -- we recommend the use of this field over `original_max_position_embeddings`, as it is compatible with most model architectures. Killed ``` Change to > dtype="auto", device_map="auto" helps, but `test_phimoe_instruct_with_static_cache` still get GPU OOM even with super short inputs. So I also change that test to use a dummy model. There is nothing we can do.
{ "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/41007/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41007/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41006
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41006/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41006/comments
https://api.github.com/repos/huggingface/transformers/issues/41006/events
https://github.com/huggingface/transformers/pull/41006
3,434,525,599
PR_kwDOCUB6oc6pg732
41,006
[ESM] add accepts_loss_kwargs=False to EsmPreTrainedModel
{ "login": "pstjohn", "id": 2576846, "node_id": "MDQ6VXNlcjI1NzY4NDY=", "avatar_url": "https://avatars.githubusercontent.com/u/2576846?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pstjohn", "html_url": "https://github.com/pstjohn", "followers_url": "https://api.github.com/users/pstjohn/followers", "following_url": "https://api.github.com/users/pstjohn/following{/other_user}", "gists_url": "https://api.github.com/users/pstjohn/gists{/gist_id}", "starred_url": "https://api.github.com/users/pstjohn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pstjohn/subscriptions", "organizations_url": "https://api.github.com/users/pstjohn/orgs", "repos_url": "https://api.github.com/users/pstjohn/repos", "events_url": "https://api.github.com/users/pstjohn/events{/privacy}", "received_events_url": "https://api.github.com/users/pstjohn/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T14:07:48
2025-09-30T12:07:27
2025-09-30T12:06:47
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41006", "html_url": "https://github.com/huggingface/transformers/pull/41006", "diff_url": "https://github.com/huggingface/transformers/pull/41006.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41006.patch", "merged_at": "2025-09-30T12:06:47" }
#40370 added a `**kwargs` to the ESM-2 model's forward pass, which means this model now triggers [these lines](https://github.com/huggingface/transformers/blob/6d2bb1e04db6c8d193549d4b0c99d2182837c0ad/src/transformers/trainer.py#L4127-L4132) in the HF trainer, making losses inconsistent between single and multi-device training. ```python if ( self.args.average_tokens_across_devices and (self.model_accepts_loss_kwargs or self.compute_loss_func) and num_items_in_batch is not None ): loss *= self.accelerator.num_processes ``` We can avoid this by setting the `accepts_loss_kwargs` flag to False in the model definition. CC @zucchini-nlp, @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/41006/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41006/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41005
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41005/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41005/comments
https://api.github.com/repos/huggingface/transformers/issues/41005/events
https://github.com/huggingface/transformers/issues/41005
3,434,495,370
I_kwDOCUB6oc7Mtj2K
41,005
Are we have Qwen3VL Official Model Published by Alibaba
{ "login": "Dineshkumar-Anandan-ZS0367", "id": 105219055, "node_id": "U_kgDOBkWD7w", "avatar_url": "https://avatars.githubusercontent.com/u/105219055?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367", "html_url": "https://github.com/Dineshkumar-Anandan-ZS0367", "followers_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/followers", "following_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/following{/other_user}", "gists_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/gists{/gist_id}", "starred_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/subscriptions", "organizations_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/orgs", "repos_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/repos", "events_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/events{/privacy}", "received_events_url": "https://api.github.com/users/Dineshkumar-Anandan-ZS0367/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 1843244711, "node_id": "MDU6TGFiZWwxODQzMjQ0NzEx", "url": "https://api.github.com/repos/huggingface/transformers/labels/New%20model", "name": "New model", "color": "fbca04", "default": false, "description": "" } ]
closed
false
null
[]
null
[]
2025-09-19T13:59:34
2025-09-20T10:00:04
2025-09-20T10:00:04
NONE
null
null
null
null
### Model description Reference - https://huggingface.co/docs/transformers/main/en/model_doc/qwen3_vl#transformers.Qwen3VLForConditionalGeneration If not when can we expect any guess?
{ "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/41005/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41005/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/41004
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41004/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41004/comments
https://api.github.com/repos/huggingface/transformers/issues/41004/events
https://github.com/huggingface/transformers/pull/41004
3,434,442,781
PR_kwDOCUB6oc6pgpwa
41,004
docs: improved RoPE function Docstrings
{ "login": "RyanMullins", "id": 868555, "node_id": "MDQ6VXNlcjg2ODU1NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/868555?v=4", "gravatar_id": "", "url": "https://api.github.com/users/RyanMullins", "html_url": "https://github.com/RyanMullins", "followers_url": "https://api.github.com/users/RyanMullins/followers", "following_url": "https://api.github.com/users/RyanMullins/following{/other_user}", "gists_url": "https://api.github.com/users/RyanMullins/gists{/gist_id}", "starred_url": "https://api.github.com/users/RyanMullins/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RyanMullins/subscriptions", "organizations_url": "https://api.github.com/users/RyanMullins/orgs", "repos_url": "https://api.github.com/users/RyanMullins/repos", "events_url": "https://api.github.com/users/RyanMullins/events{/privacy}", "received_events_url": "https://api.github.com/users/RyanMullins/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T13:45:30
2025-09-22T12:21:16
2025-09-22T12:21:16
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41004", "html_url": "https://github.com/huggingface/transformers/pull/41004", "diff_url": "https://github.com/huggingface/transformers/pull/41004.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41004.patch", "merged_at": "2025-09-22T12:21:16" }
# What does this PR do? expands the details of the RoPE function docstrings to better convey which fields are possible, which are required, and what they are used for in the functions. ## 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. @gante @Cyrilvallez
{ "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/41004/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41004/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41003
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41003/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41003/comments
https://api.github.com/repos/huggingface/transformers/issues/41003/events
https://github.com/huggingface/transformers/pull/41003
3,433,972,177
PR_kwDOCUB6oc6pfDSc
41,003
[tests] gpt2 + `CausalLMModelTester`
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T11:16:28
2025-09-23T17:07:13
2025-09-23T17:07:06
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41003", "html_url": "https://github.com/huggingface/transformers/pull/41003", "diff_url": "https://github.com/huggingface/transformers/pull/41003.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41003.patch", "merged_at": "2025-09-23T17:07:06" }
# What does this PR do? This PR is an example of a non-super-standard decoder-only model with `CausalLMModelTester`: with a few extra definitions, we can reuse most of the improved testing logic. 👉 If this pattern is approved, I'll open a separate PR for other decoder-only models 🤗
{ "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/41003/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41003/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41002
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41002/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41002/comments
https://api.github.com/repos/huggingface/transformers/issues/41002/events
https://github.com/huggingface/transformers/pull/41002
3,433,934,408
PR_kwDOCUB6oc6pe6_b
41,002
fix dict like init for ModelOutput
{ "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-09-19T11:03:23
2025-09-19T14:14:45
2025-09-19T14:14:44
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41002", "html_url": "https://github.com/huggingface/transformers/pull/41002", "diff_url": "https://github.com/huggingface/transformers/pull/41002.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41002.patch", "merged_at": "2025-09-19T14:14:44" }
# What does this PR do? This PR fixes `ModelOutput` dict-like init as this doesn't work if you don't specify the first attribute. In our case the loss value wasn't cleared. ### Reproducer ```python from transformers.modeling_outputs import CausalLMOutputWithPast import torch lm_output = CausalLMOutputWithPast({"logits":torch.ones(2, 3, 4)}) ``` before: ``` CausalLMOutputWithPast(loss={'logits': tensor([[[1., 1., 1., 1.], [1., 1., 1., 1.], [1., 1., 1., 1.]], [[1., 1., 1., 1.], [1., 1., 1., 1.], [1., 1., 1., 1.]]])}, logits=tensor([[[1., 1., 1., 1.], [1., 1., 1., 1.], [1., 1., 1., 1.]], [[1., 1., 1., 1.], [1., 1., 1., 1.], [1., 1., 1., 1.]]]), past_key_values=None, hidden_states=None, attentions=None) ``` after ``` CausalLMOutputWithPast(loss=None, logits=tensor([[[1., 1., 1., 1.], [1., 1., 1., 1.], [1., 1., 1., 1.]], [[1., 1., 1., 1.], [1., 1., 1., 1.], [1., 1., 1., 1.]]]), past_key_values=None, hidden_states=None, attentions=None) ````
{ "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/41002/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41002/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/41001
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41001/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41001/comments
https://api.github.com/repos/huggingface/transformers/issues/41001/events
https://github.com/huggingface/transformers/pull/41001
3,433,890,418
PR_kwDOCUB6oc6pexnU
41,001
Refactor `tokenization` in `transformers`
{ "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 }
[ { "id": 9105758243, "node_id": "LA_kwDOCUB6oc8AAAACHr7YIw", "url": "https://api.github.com/repos/huggingface/transformers/labels/for_v5?", "name": "for_v5?", "color": "35BC94", "default": false, "description": "" } ]
open
false
null
[]
null
[]
2025-09-19T10:46:46
2025-10-13T02:12:57
null
COLLABORATOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41001", "html_url": "https://github.com/huggingface/transformers/pull/41001", "diff_url": "https://github.com/huggingface/transformers/pull/41001.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41001.patch", "merged_at": null }
# What does this PR do? The goal of this PR is to get rid of the old and biased "slow vs fast" definition, simplify the code, unbloat the API and have something simple and stable. We don't want to break stuff, so will try not to. Related to #40938
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/41001/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/41001/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/41000
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/41000/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/41000/comments
https://api.github.com/repos/huggingface/transformers/issues/41000/events
https://github.com/huggingface/transformers/pull/41000
3,433,867,933
PR_kwDOCUB6oc6pesyo
41,000
Make `EfficientLoFTRModelTest` faster
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T10:40:30
2025-09-19T12:51:06
2025-09-19T12:51:05
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/41000", "html_url": "https://github.com/huggingface/transformers/pull/41000", "diff_url": "https://github.com/huggingface/transformers/pull/41000.diff", "patch_url": "https://github.com/huggingface/transformers/pull/41000.patch", "merged_at": "2025-09-19T12:51:05" }
# What does this PR do? `4m` -> `6.69s` Mostly, from some `test_eager_matches_sdpa_inference`, we get `20s` --> `1s`
{ "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/41000/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/41000/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40999
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40999/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40999/comments
https://api.github.com/repos/huggingface/transformers/issues/40999/events
https://github.com/huggingface/transformers/pull/40999
3,433,756,073
PR_kwDOCUB6oc6peUp9
40,999
[docs] rm stray tf/flax autodocs references
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T10:10:19
2025-09-19T11:04:21
2025-09-19T11:04:12
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40999", "html_url": "https://github.com/huggingface/transformers/pull/40999", "diff_url": "https://github.com/huggingface/transformers/pull/40999.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40999.patch", "merged_at": "2025-09-19T11:04:12" }
# What does this PR do? - Removes stray TF/FLAX `[[autodocs]]` references. All languages can now be built (tested locally) - Removes the `ms`, `te`, and `tr` languages: - `ms` only contained the index, was not being built in our CI, and was a very incorrect `toc_tree` - `te` only contained an outdated index and quicktour (many TF references, need a full rewrite) - `tr` only contained an outdated index (many TF references, need a full rewrite)
{ "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/40999/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40999/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40998
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40998/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40998/comments
https://api.github.com/repos/huggingface/transformers/issues/40998/events
https://github.com/huggingface/transformers/pull/40998
3,433,701,561
PR_kwDOCUB6oc6peI25
40,998
🚨 [v5] remove generate output retrocompatibility aliases
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T09:52:09
2025-09-19T14:56:46
2025-09-19T14:36:13
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40998", "html_url": "https://github.com/huggingface/transformers/pull/40998", "diff_url": "https://github.com/huggingface/transformers/pull/40998.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40998.patch", "merged_at": "2025-09-19T14:36:13" }
# What does this PR do? See title :)
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40998/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40998/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40997
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40997/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40997/comments
https://api.github.com/repos/huggingface/transformers/issues/40997/events
https://github.com/huggingface/transformers/pull/40997
3,433,681,056
PR_kwDOCUB6oc6peEaH
40,997
🚨 [v5] remove deprecated entry point
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T09:45:15
2025-09-19T14:57:02
2025-09-19T14:40:27
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40997", "html_url": "https://github.com/huggingface/transformers/pull/40997", "diff_url": "https://github.com/huggingface/transformers/pull/40997.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40997.patch", "merged_at": "2025-09-19T14:40:27" }
# What does this PR do? Removes the `transformers-cli` entrypoint, which is deprecated in favor of `transformers`
{ "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/40997/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40997/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40996
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40996/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40996/comments
https://api.github.com/repos/huggingface/transformers/issues/40996/events
https://github.com/huggingface/transformers/pull/40996
3,433,520,164
PR_kwDOCUB6oc6pdhln
40,996
Remove [[autodoc]] refs to TF/Flax objects
{ "login": "Cyrilvallez", "id": 71554963, "node_id": "MDQ6VXNlcjcxNTU0OTYz", "avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Cyrilvallez", "html_url": "https://github.com/Cyrilvallez", "followers_url": "https://api.github.com/users/Cyrilvallez/followers", "following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}", "gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}", "starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions", "organizations_url": "https://api.github.com/users/Cyrilvallez/orgs", "repos_url": "https://api.github.com/users/Cyrilvallez/repos", "events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}", "received_events_url": "https://api.github.com/users/Cyrilvallez/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T08:58:18
2025-09-19T09:28:36
2025-09-19T09:28:34
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40996", "html_url": "https://github.com/huggingface/transformers/pull/40996", "diff_url": "https://github.com/huggingface/transformers/pull/40996.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40996.patch", "merged_at": "2025-09-19T09:28:34" }
# What does this PR do? Should bring back to doc builder cc @gante @vasqu
{ "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/40996/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40996/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40995
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40995/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40995/comments
https://api.github.com/repos/huggingface/transformers/issues/40995/events
https://github.com/huggingface/transformers/pull/40995
3,433,496,872
PR_kwDOCUB6oc6pdceA
40,995
feat(trainer): Add support for multiple datasets and domain-specific loss
{ "login": "harshaljanjani", "id": 75426551, "node_id": "MDQ6VXNlcjc1NDI2NTUx", "avatar_url": "https://avatars.githubusercontent.com/u/75426551?v=4", "gravatar_id": "", "url": "https://api.github.com/users/harshaljanjani", "html_url": "https://github.com/harshaljanjani", "followers_url": "https://api.github.com/users/harshaljanjani/followers", "following_url": "https://api.github.com/users/harshaljanjani/following{/other_user}", "gists_url": "https://api.github.com/users/harshaljanjani/gists{/gist_id}", "starred_url": "https://api.github.com/users/harshaljanjani/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/harshaljanjani/subscriptions", "organizations_url": "https://api.github.com/users/harshaljanjani/orgs", "repos_url": "https://api.github.com/users/harshaljanjani/repos", "events_url": "https://api.github.com/users/harshaljanjani/events{/privacy}", "received_events_url": "https://api.github.com/users/harshaljanjani/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-19T08:51:48
2025-10-10T16:55:46
null
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40995", "html_url": "https://github.com/huggingface/transformers/pull/40995", "diff_url": "https://github.com/huggingface/transformers/pull/40995.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40995.patch", "merged_at": null }
## What does this PR do? This has been a long-standing feature request, and I’d love to hear your thoughts on how I approached resolving it. I’ve tested the implementation on the GLUE benchmark and added unit tests for the new logic; happy to make any changes based on feedback! Just a bit of description: I’ve tried two distinct strategies for handling multiple datasets, with the `multi_dataset_strategy` arg: 1. `sampling` (default): Here, each training step samples a batch from one of the datasets. The sampling can be configured to be proportional to the dataset sizes (`proportional`) or to cycle through them (`round_robin`). 2. `aggregate`: In this mode, each training step fetches one batch from every dataset, computes a domain-specific loss for each, and then aggregates these losses into a single value for backprop. Best, Harshal Might close #30725 and thereby complete #33345. ## Before submitting * [x] Did you read the [contributor guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? * [x] Did you update the documentation with your changes? See the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). * [x] Did you add the necessary tests? ## Who can review? I’m not sure exactly who to tag here, so I’m pinging @qubvel and @ArthurZucker.
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40995/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/40995/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/40994
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40994/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40994/comments
https://api.github.com/repos/huggingface/transformers/issues/40994/events
https://github.com/huggingface/transformers/pull/40994
3,433,468,760
PR_kwDOCUB6oc6pdWRn
40,994
Check model inputs - hidden states
{ "login": "zucchini-nlp", "id": 100715397, "node_id": "U_kgDOBgDLhQ", "avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zucchini-nlp", "html_url": "https://github.com/zucchini-nlp", "followers_url": "https://api.github.com/users/zucchini-nlp/followers", "following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}", "gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}", "starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions", "organizations_url": "https://api.github.com/users/zucchini-nlp/orgs", "repos_url": "https://api.github.com/users/zucchini-nlp/repos", "events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}", "received_events_url": "https://api.github.com/users/zucchini-nlp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T08:44:06
2025-10-06T09:48:52
2025-10-06T09:48:52
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40994", "html_url": "https://github.com/huggingface/transformers/pull/40994", "diff_url": "https://github.com/huggingface/transformers/pull/40994.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40994.patch", "merged_at": "2025-10-06T09:48:52" }
# What does this PR do? Fixes https://github.com/huggingface/transformers/issues/40964 In most vision models the `output.hidden_states` are the hiddens right after encoder blocks, i.e. before the last layernorm. Therefore for these models `output.hidden_states != output.last_hidden_state` Currently `check_model_inputs` assumes that last hidden state is the correct one to return which is true for language models only. This PR adds a kwarg for `check_model_inputs` which decides whether to replace last hidden state or not TBH, i think the way it is done in LMs is the ultimate correct version and we probably need to "break" vision models. But I can't think of a way to obtain pre-norm last hidden states which are needed for some VLMs
{ "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/40994/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40994/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40993
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40993/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40993/comments
https://api.github.com/repos/huggingface/transformers/issues/40993/events
https://github.com/huggingface/transformers/issues/40993
3,433,418,635
I_kwDOCUB6oc7Mpc-L
40,993
HfArgumentParser cannot parse TRL Config
{ "login": "caoyang-sufe", "id": 135610001, "node_id": "U_kgDOCBU-kQ", "avatar_url": "https://avatars.githubusercontent.com/u/135610001?v=4", "gravatar_id": "", "url": "https://api.github.com/users/caoyang-sufe", "html_url": "https://github.com/caoyang-sufe", "followers_url": "https://api.github.com/users/caoyang-sufe/followers", "following_url": "https://api.github.com/users/caoyang-sufe/following{/other_user}", "gists_url": "https://api.github.com/users/caoyang-sufe/gists{/gist_id}", "starred_url": "https://api.github.com/users/caoyang-sufe/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/caoyang-sufe/subscriptions", "organizations_url": "https://api.github.com/users/caoyang-sufe/orgs", "repos_url": "https://api.github.com/users/caoyang-sufe/repos", "events_url": "https://api.github.com/users/caoyang-sufe/events{/privacy}", "received_events_url": "https://api.github.com/users/caoyang-sufe/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-19T08:29:48
2025-09-19T09:06:20
2025-09-19T09:06:20
NONE
null
null
null
null
### System Info transformers==4.56.1 trl==0.17.0 I used to apply code below ```python from transformers import HfArgumentParser from trl import ( ScriptArguments, ModelConfig, SFTConfig ) parser = HfArgumentParser((ScriptArguments, SFTConfig, ModelConfig)) script_arguments, trainer_config, model_config = parser.parse_args_into_dataclasses() ``` to parse training args, but after updating transformers to 4.56, it does not work: ``` Traceback (most recent call last): File "D:\mytest.py", line 5, in <module> parser = HfArgumentParser((ScriptArguments, SFTConfig, ModelConfig)) File "E:\Anaconda3\envs\myopenai\lib\site-packages\transformers\hf_argparser.py", line 143, in __init__ self._add_dataclass_arguments(dtype) File "E:\Anaconda3\envs\myopenai\lib\site-packages\transformers\hf_argparser.py", line 260, in _add_dataclass_arguments raise RuntimeError( RuntimeError: Type resolution failed for <class 'trl.trainer.sft_config.SFTConfig'>. Try declaring the class in global scope or removing line of `from __future__ import annotations` which opts in Postponed Evaluation of Annotations (PEP 563) ``` How to fix it? ### 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 Run ```python from transformers import HfArgumentParser from trl import ( ScriptArguments, ModelConfig, SFTConfig ) parser = HfArgumentParser((ScriptArguments, SFTConfig, ModelConfig)) script_arguments, trainer_config, model_config = parser.parse_args_into_dataclasses() ``` ### Expected behavior It should be work
{ "login": "caoyang-sufe", "id": 135610001, "node_id": "U_kgDOCBU-kQ", "avatar_url": "https://avatars.githubusercontent.com/u/135610001?v=4", "gravatar_id": "", "url": "https://api.github.com/users/caoyang-sufe", "html_url": "https://github.com/caoyang-sufe", "followers_url": "https://api.github.com/users/caoyang-sufe/followers", "following_url": "https://api.github.com/users/caoyang-sufe/following{/other_user}", "gists_url": "https://api.github.com/users/caoyang-sufe/gists{/gist_id}", "starred_url": "https://api.github.com/users/caoyang-sufe/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/caoyang-sufe/subscriptions", "organizations_url": "https://api.github.com/users/caoyang-sufe/orgs", "repos_url": "https://api.github.com/users/caoyang-sufe/repos", "events_url": "https://api.github.com/users/caoyang-sufe/events{/privacy}", "received_events_url": "https://api.github.com/users/caoyang-sufe/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40993/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40993/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/40992
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40992/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40992/comments
https://api.github.com/repos/huggingface/transformers/issues/40992/events
https://github.com/huggingface/transformers/pull/40992
3,432,781,709
PR_kwDOCUB6oc6pa_R7
40,992
[testing] test `num_hidden_layers` being small in model tester
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-19T04:56:30
2025-09-19T09:45:09
2025-09-19T09:45:07
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40992", "html_url": "https://github.com/huggingface/transformers/pull/40992", "diff_url": "https://github.com/huggingface/transformers/pull/40992.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40992.patch", "merged_at": "2025-09-19T09:45:07" }
# What does this PR do? Follow up of #40982 Let's still try to check if the number of layers is small. I don't have enough to dive into all exceptional cases, but for new models, let's try to be careful.
{ "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/40992/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40992/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40991
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40991/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40991/comments
https://api.github.com/repos/huggingface/transformers/issues/40991/events
https://github.com/huggingface/transformers/pull/40991
3,432,531,945
PR_kwDOCUB6oc6paIBC
40,991
Add LWDetr model
{ "login": "sbucaille", "id": 24275548, "node_id": "MDQ6VXNlcjI0Mjc1NTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/24275548?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sbucaille", "html_url": "https://github.com/sbucaille", "followers_url": "https://api.github.com/users/sbucaille/followers", "following_url": "https://api.github.com/users/sbucaille/following{/other_user}", "gists_url": "https://api.github.com/users/sbucaille/gists{/gist_id}", "starred_url": "https://api.github.com/users/sbucaille/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sbucaille/subscriptions", "organizations_url": "https://api.github.com/users/sbucaille/orgs", "repos_url": "https://api.github.com/users/sbucaille/repos", "events_url": "https://api.github.com/users/sbucaille/events{/privacy}", "received_events_url": "https://api.github.com/users/sbucaille/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-19T02:54:30
2025-10-29T16:47:46
null
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40991", "html_url": "https://github.com/huggingface/transformers/pull/40991", "diff_url": "https://github.com/huggingface/transformers/pull/40991.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40991.patch", "merged_at": null }
# What does this PR do? Adds LWDetr model. In #36895 I started working on adding RFDetr, but after putting some work I realized that it relies a LOT on LWDetr. Adding RFDetr will essentially replace the ViT encoder by Dino, so the biggest part of the work is on the implementation of LWDetr, which could also be a good alternative for people to use for their use cases. ## Who can review? Still work in progress but since @yonigozlan asked for an update here it is. All the inference code is implemented. A lot of refactoring/renaming is still needed and I'm writing the tests to be able to do that safely. In the meantime you can check the code and let me know if you have comments. @qubvel
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40991/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40991/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/40990
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40990/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40990/comments
https://api.github.com/repos/huggingface/transformers/issues/40990/events
https://github.com/huggingface/transformers/issues/40990
3,432,292,570
I_kwDOCUB6oc7MlKDa
40,990
Extremely high perplexity on openai/gpt-oss-20b with WikiText-2 (raw)
{ "login": "kuantuna", "id": 66808459, "node_id": "MDQ6VXNlcjY2ODA4NDU5", "avatar_url": "https://avatars.githubusercontent.com/u/66808459?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kuantuna", "html_url": "https://github.com/kuantuna", "followers_url": "https://api.github.com/users/kuantuna/followers", "following_url": "https://api.github.com/users/kuantuna/following{/other_user}", "gists_url": "https://api.github.com/users/kuantuna/gists{/gist_id}", "starred_url": "https://api.github.com/users/kuantuna/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kuantuna/subscriptions", "organizations_url": "https://api.github.com/users/kuantuna/orgs", "repos_url": "https://api.github.com/users/kuantuna/repos", "events_url": "https://api.github.com/users/kuantuna/events{/privacy}", "received_events_url": "https://api.github.com/users/kuantuna/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-19T00:40:14
2025-09-27T00:28:00
2025-09-22T10:07:32
NONE
null
null
null
null
### System Info - `transformers` version: 4.56.1 - Platform: Linux-6.5.0-1025-gcp-x86_64-with-glibc2.35 - Python version: 3.11.10 - Huggingface_hub version: 0.35.0 - Safetensors version: 0.6.2 - Accelerate version: 1.10.1 - Accelerate config: not found - DeepSpeed version: 0.17.3+cu126.pt27.v0.17.3.recogni2 - PyTorch version (accelerator?): 2.7.1+cu126 (CUDA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: no - Using GPU in script?: yes - GPU type: NVIDIA A100-SXM4-40GB ### Who can help? @ArthurZucker @Cyrilvallez ### 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 Script: ```python #!/usr/bin/env python import math import torch from datasets import load_dataset from transformers import AutoModelForCausalLM, AutoTokenizer # Config MODEL_NAME = "openai/gpt-oss-20b" SPLIT = "test" # WikiText-2 (raw) test split CONTEXT_LENGTH = 2048 # evaluation window size DTYPE = torch.bfloat16 DEVICE_MAP = "auto" def main(): # Load tokenizer & model tok = AutoTokenizer.from_pretrained(MODEL_NAME) model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, torch_dtype=DTYPE, device_map=DEVICE_MAP).eval() # Load dataset and build one long token stream (no special tokens) ds = load_dataset("wikitext", "wikitext-2-raw-v1", split=SPLIT) encs = tok([row["text"] for row in ds], add_special_tokens=False) flat_ids = [tid for seq in encs["input_ids"] for tid in seq] ids = torch.tensor(flat_ids, dtype=torch.long) # Keep first 10% of tokens n_keep = max(1, int(0.10 * ids.numel())) ids = ids[:n_keep] # Keep only full CONTEXT_LENGTH windows n_windows = ids.numel() // CONTEXT_LENGTH if n_windows == 0: raise ValueError(f"Not enough tokens ({ids.numel()}) for a single {CONTEXT_LENGTH}-token window.") ids = ids[: n_windows * CONTEXT_LENGTH].view(n_windows, CONTEXT_LENGTH) # Forward passes total_nll, total_tokens = 0.0, 0 with torch.no_grad(): for i in range(n_windows): x = ids[i : i + 1].to(model.device) # [1, L] out = model(input_ids=x, labels=x) # HF shifts labels internally contrib = x.size(1) - 1 # L-1 positions contribute total_nll += out.loss.item() * contrib # sum NLL total_tokens += contrib avg_nll = total_nll / total_tokens ppl = math.exp(avg_nll) # Detailed prints print("\n=== Repro Config ===") print(f"model_name: {MODEL_NAME}") print(f"split: {SPLIT}") print(f"context_length: {CONTEXT_LENGTH}") print(f"dtype: {DTYPE}") print(f"device_map: {DEVICE_MAP}") print(f"tokens_total: {ids.numel()}") print(f"num_segments: {n_windows}") print(f"bos/eos/pad: {tok.bos_token}/{tok.eos_token}/{tok.pad_token}") print("\n=== Results ===") print(f"tokens_scored: {total_tokens}") print(f"avg_nll: {avg_nll:.6f}") print(f"perplexity: {ppl:.3f}\n") if __name__ == "__main__": main() ``` Output: ``` === Repro Config === model_name: openai/gpt-oss-20b split: test context_length: 2048 dtype: torch.bfloat16 device_map: auto tokens_total: 28672 num_segments: 14 bos/eos/pad: <|startoftext|>/<|return|>/<|endoftext|> === Results === tokens_scored: 28658 avg_nll: 5.977535 perplexity: 394.467 ``` ### Expected behavior When evaluating `openai/gpt-oss-20b` on the WikiText-2 (raw) test split with a standard perplexity script, the reported perplexity is extremely high (~394). This is surprising, as a 20B parameter GPT-class model should normally achieve much lower perplexity on this benchmark. Clarification would be helpful to determine whether this behavior indicates a bug in the Transformers integration or if GPT-OSS models are not intended to be directly evaluated as causal LMs without special formatting. Note: The model card mentions a “harmony” chat template for usage, but it is unclear whether special formatting is required when performing perplexity evaluation on a corpus like WikiText.
{ "login": "kuantuna", "id": 66808459, "node_id": "MDQ6VXNlcjY2ODA4NDU5", "avatar_url": "https://avatars.githubusercontent.com/u/66808459?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kuantuna", "html_url": "https://github.com/kuantuna", "followers_url": "https://api.github.com/users/kuantuna/followers", "following_url": "https://api.github.com/users/kuantuna/following{/other_user}", "gists_url": "https://api.github.com/users/kuantuna/gists{/gist_id}", "starred_url": "https://api.github.com/users/kuantuna/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kuantuna/subscriptions", "organizations_url": "https://api.github.com/users/kuantuna/orgs", "repos_url": "https://api.github.com/users/kuantuna/repos", "events_url": "https://api.github.com/users/kuantuna/events{/privacy}", "received_events_url": "https://api.github.com/users/kuantuna/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40990/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40990/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/40989
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40989/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40989/comments
https://api.github.com/repos/huggingface/transformers/issues/40989/events
https://github.com/huggingface/transformers/pull/40989
3,431,987,006
PR_kwDOCUB6oc6pYTZ0
40,989
enable flex attention ut cases on XPU
{ "login": "yao-matrix", "id": 7245027, "node_id": "MDQ6VXNlcjcyNDUwMjc=", "avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yao-matrix", "html_url": "https://github.com/yao-matrix", "followers_url": "https://api.github.com/users/yao-matrix/followers", "following_url": "https://api.github.com/users/yao-matrix/following{/other_user}", "gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}", "starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions", "organizations_url": "https://api.github.com/users/yao-matrix/orgs", "repos_url": "https://api.github.com/users/yao-matrix/repos", "events_url": "https://api.github.com/users/yao-matrix/events{/privacy}", "received_events_url": "https://api.github.com/users/yao-matrix/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T21:14:03
2025-09-29T15:51:16
2025-09-29T14:30:49
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40989", "html_url": "https://github.com/huggingface/transformers/pull/40989", "diff_url": "https://github.com/huggingface/transformers/pull/40989.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40989.patch", "merged_at": "2025-09-29T14:30:49" }
enable flex_attention test cases on XPU, it's supported by XPU torch now. @ydshieh , pls help review, thx very much.
{ "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/40989/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40989/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40988
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40988/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40988/comments
https://api.github.com/repos/huggingface/transformers/issues/40988/events
https://github.com/huggingface/transformers/issues/40988
3,431,951,512
I_kwDOCUB6oc7Mj2yY
40,988
Qwen Model does not free CPU Memory when moving it to GPU
{ "login": "cehongwang", "id": 123616592, "node_id": "U_kgDOB149UA", "avatar_url": "https://avatars.githubusercontent.com/u/123616592?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cehongwang", "html_url": "https://github.com/cehongwang", "followers_url": "https://api.github.com/users/cehongwang/followers", "following_url": "https://api.github.com/users/cehongwang/following{/other_user}", "gists_url": "https://api.github.com/users/cehongwang/gists{/gist_id}", "starred_url": "https://api.github.com/users/cehongwang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cehongwang/subscriptions", "organizations_url": "https://api.github.com/users/cehongwang/orgs", "repos_url": "https://api.github.com/users/cehongwang/repos", "events_url": "https://api.github.com/users/cehongwang/events{/privacy}", "received_events_url": "https://api.github.com/users/cehongwang/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-18T20:57:33
2025-10-27T08:03:08
2025-10-27T08:03:08
NONE
null
null
null
null
### System Info - `transformers` version: 4.51.3 - Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.39 - Python version: 3.12.3 - Huggingface_hub version: 0.34.5 - Safetensors version: 0.6.2 - Accelerate version: 1.3.0 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (GPU?): 2.8.0+cu128 (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?: No - GPU type: NVIDIA H200 ### Who can help? CPU usage is typically expected to be released after doing model.cuda(). This is not the case of Qwen1.5 MoE or Qwen 3 MoE. ### Information - [ ] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction Run this script ```py from transformers import AutoModelForCausalLM import torch import psutil process = psutil.Process() print("Before loading model") print(process.memory_info().rss / 1024 / 1024, "MB") model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen1.5-MoE-A2.7B-Chat", torch_dtype=torch.float16).eval() print("After loading model") print(process.memory_info().rss / 1024 / 1024, "MB") model.cuda() print("After loading model to GPU") print(process.memory_info().rss / 1024 / 1024, "MB") ``` ### Expected behavior The CPU memory should be released
{ "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/40988/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40988/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/40987
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40987/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40987/comments
https://api.github.com/repos/huggingface/transformers/issues/40987/events
https://github.com/huggingface/transformers/pull/40987
3,431,845,039
PR_kwDOCUB6oc6pX0g1
40,987
New blueberry model and tokenizer
{ "login": "dustinwloring1988", "id": 21135165, "node_id": "MDQ6VXNlcjIxMTM1MTY1", "avatar_url": "https://avatars.githubusercontent.com/u/21135165?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dustinwloring1988", "html_url": "https://github.com/dustinwloring1988", "followers_url": "https://api.github.com/users/dustinwloring1988/followers", "following_url": "https://api.github.com/users/dustinwloring1988/following{/other_user}", "gists_url": "https://api.github.com/users/dustinwloring1988/gists{/gist_id}", "starred_url": "https://api.github.com/users/dustinwloring1988/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dustinwloring1988/subscriptions", "organizations_url": "https://api.github.com/users/dustinwloring1988/orgs", "repos_url": "https://api.github.com/users/dustinwloring1988/repos", "events_url": "https://api.github.com/users/dustinwloring1988/events{/privacy}", "received_events_url": "https://api.github.com/users/dustinwloring1988/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T20:17:10
2025-09-18T20:55:06
2025-09-18T20:55:06
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40987", "html_url": "https://github.com/huggingface/transformers/pull/40987", "diff_url": "https://github.com/huggingface/transformers/pull/40987.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40987.patch", "merged_at": null }
# What does this PR do? This PR introduces the foundational elements for the new `Blueberry` model. It sets up the basic directory structure (`src/transformers/models/blueberry`) and implements the `BlueberryConfig` class. Key features of the `BlueberryConfig` include: - Definition of a small, non-MoE decoder-only transformer architecture. - Support for a hybrid NoPE/RoPE attention mechanism, controlled by the `layer_types` parameter, allowing for alternating sliding window and full attention layers. - Integration of YaRN RoPE scaling, configured via the `rope_scaling` dictionary. - Custom default parameters for various model components as specified in the project objective. This PR lays the groundwork for the full model implementation (`modeling_blueberry.py`) and tokenizer (`tokenization_blueberry.py`) which will follow. ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. @ArthurZucker @gante
{ "login": "dustinwloring1988", "id": 21135165, "node_id": "MDQ6VXNlcjIxMTM1MTY1", "avatar_url": "https://avatars.githubusercontent.com/u/21135165?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dustinwloring1988", "html_url": "https://github.com/dustinwloring1988", "followers_url": "https://api.github.com/users/dustinwloring1988/followers", "following_url": "https://api.github.com/users/dustinwloring1988/following{/other_user}", "gists_url": "https://api.github.com/users/dustinwloring1988/gists{/gist_id}", "starred_url": "https://api.github.com/users/dustinwloring1988/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dustinwloring1988/subscriptions", "organizations_url": "https://api.github.com/users/dustinwloring1988/orgs", "repos_url": "https://api.github.com/users/dustinwloring1988/repos", "events_url": "https://api.github.com/users/dustinwloring1988/events{/privacy}", "received_events_url": "https://api.github.com/users/dustinwloring1988/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40987/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40987/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40986
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40986/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40986/comments
https://api.github.com/repos/huggingface/transformers/issues/40986/events
https://github.com/huggingface/transformers/issues/40986
3,431,586,930
I_kwDOCUB6oc7Midxy
40,986
Rewrite audio feature processors to accept torch tensors
{ "login": "jackzhxng", "id": 32371937, "node_id": "MDQ6VXNlcjMyMzcxOTM3", "avatar_url": "https://avatars.githubusercontent.com/u/32371937?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jackzhxng", "html_url": "https://github.com/jackzhxng", "followers_url": "https://api.github.com/users/jackzhxng/followers", "following_url": "https://api.github.com/users/jackzhxng/following{/other_user}", "gists_url": "https://api.github.com/users/jackzhxng/gists{/gist_id}", "starred_url": "https://api.github.com/users/jackzhxng/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jackzhxng/subscriptions", "organizations_url": "https://api.github.com/users/jackzhxng/orgs", "repos_url": "https://api.github.com/users/jackzhxng/repos", "events_url": "https://api.github.com/users/jackzhxng/events{/privacy}", "received_events_url": "https://api.github.com/users/jackzhxng/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" }, { "id": 6470596964, "node_id": "LA_kwDOCUB6oc8AAAABga15ZA", "url": "https://api.github.com/repos/huggingface/transformers/labels/Audio", "name": "Audio", "color": "760453", "default": false, "description": "" } ]
open
false
null
[]
null
[]
2025-09-18T18:57:40
2025-09-19T16:58:45
null
CONTRIBUTOR
null
null
null
null
### Feature request We would like to be able to torch.export the audio feature processors such as: - [GraniteSpeechFeatureExtractor](https://github.com/huggingface/transformers/blob/5f6e278a5177d8b85945a2cdb6b776dacee34914/src/transformers/models/granite_speech/feature_extraction_granite_speech.py#L38) - [WhisperFeatureExtractor](https://github.com/huggingface/transformers/blob/5f6e278a5177d8b85945a2cdb6b776dacee34914/src/transformers/models/whisper/feature_extraction_whisper.py#L36) used for Voxtral and Whisper @ArthurZucker @zucchini-nlp @Cyrilvallez @larryliu0820 ### Motivation This allows us to torch.export the whole E2E needed to generate output for Transformers audio models. Then in ExecuTorch, we can run everything without needing to write any custom C++ code for audio preprocessing. ### Your contribution Can help with code / provide context (?)
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40986/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40986/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/40985
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40985/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40985/comments
https://api.github.com/repos/huggingface/transformers/issues/40985/events
https://github.com/huggingface/transformers/pull/40985
3,431,417,311
PR_kwDOCUB6oc6pWV-D
40,985
Cursor/create blueberry language model and tokenizer b996
{ "login": "dustinwloring1988", "id": 21135165, "node_id": "MDQ6VXNlcjIxMTM1MTY1", "avatar_url": "https://avatars.githubusercontent.com/u/21135165?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dustinwloring1988", "html_url": "https://github.com/dustinwloring1988", "followers_url": "https://api.github.com/users/dustinwloring1988/followers", "following_url": "https://api.github.com/users/dustinwloring1988/following{/other_user}", "gists_url": "https://api.github.com/users/dustinwloring1988/gists{/gist_id}", "starred_url": "https://api.github.com/users/dustinwloring1988/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dustinwloring1988/subscriptions", "organizations_url": "https://api.github.com/users/dustinwloring1988/orgs", "repos_url": "https://api.github.com/users/dustinwloring1988/repos", "events_url": "https://api.github.com/users/dustinwloring1988/events{/privacy}", "received_events_url": "https://api.github.com/users/dustinwloring1988/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T18:01:16
2025-09-18T18:04:54
2025-09-18T18:04:54
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40985", "html_url": "https://github.com/huggingface/transformers/pull/40985", "diff_url": "https://github.com/huggingface/transformers/pull/40985.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40985.patch", "merged_at": null }
# What does this PR do? This PR introduces the new "Blueberry" model to the `transformers` library. Blueberry is a small, decoder-only language model featuring a novel hybrid attention mechanism that alternates between RoPE with YaRN scaling (sliding window) and NoPE (full attention) layers. It also includes a custom GPT-2-like tokenizer with a 100K vocabulary and implements the Harmony Chat Format via a Jinja2 template. The PR adds: * `src/transformers/models/blueberry/`: Model configuration, core modeling, and tokenizer implementations. * `tests/models/blueberry/`: Unit tests for the model's architecture and tokenizer functionality, including the chat template. * `docs/source/en/model_doc/blueberry.md`: Comprehensive documentation for the model. ## 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. (This was a direct task, assuming approval) - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? @ArthurZucker
{ "login": "dustinwloring1988", "id": 21135165, "node_id": "MDQ6VXNlcjIxMTM1MTY1", "avatar_url": "https://avatars.githubusercontent.com/u/21135165?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dustinwloring1988", "html_url": "https://github.com/dustinwloring1988", "followers_url": "https://api.github.com/users/dustinwloring1988/followers", "following_url": "https://api.github.com/users/dustinwloring1988/following{/other_user}", "gists_url": "https://api.github.com/users/dustinwloring1988/gists{/gist_id}", "starred_url": "https://api.github.com/users/dustinwloring1988/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dustinwloring1988/subscriptions", "organizations_url": "https://api.github.com/users/dustinwloring1988/orgs", "repos_url": "https://api.github.com/users/dustinwloring1988/repos", "events_url": "https://api.github.com/users/dustinwloring1988/events{/privacy}", "received_events_url": "https://api.github.com/users/dustinwloring1988/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40985/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40985/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40984
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40984/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40984/comments
https://api.github.com/repos/huggingface/transformers/issues/40984/events
https://github.com/huggingface/transformers/issues/40984
3,431,415,151
I_kwDOCUB6oc7Mhz1v
40,984
Adding `logits_to_keep` to older models
{ "login": "philiproeleveld", "id": 25742753, "node_id": "MDQ6VXNlcjI1NzQyNzUz", "avatar_url": "https://avatars.githubusercontent.com/u/25742753?v=4", "gravatar_id": "", "url": "https://api.github.com/users/philiproeleveld", "html_url": "https://github.com/philiproeleveld", "followers_url": "https://api.github.com/users/philiproeleveld/followers", "following_url": "https://api.github.com/users/philiproeleveld/following{/other_user}", "gists_url": "https://api.github.com/users/philiproeleveld/gists{/gist_id}", "starred_url": "https://api.github.com/users/philiproeleveld/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/philiproeleveld/subscriptions", "organizations_url": "https://api.github.com/users/philiproeleveld/orgs", "repos_url": "https://api.github.com/users/philiproeleveld/repos", "events_url": "https://api.github.com/users/philiproeleveld/events{/privacy}", "received_events_url": "https://api.github.com/users/philiproeleveld/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 1990918270, "node_id": "MDU6TGFiZWwxOTkwOTE4Mjcw", "url": "https://api.github.com/repos/huggingface/transformers/labels/Good%20First%20Issue", "name": "Good First Issue", "color": "bbf794", "default": false, "description": "" } ]
closed
false
null
[]
null
[]
2025-09-18T18:00:30
2025-10-15T09:56:03
2025-10-15T09:56:03
CONTRIBUTOR
null
null
null
null
Hi, while working with BioGPT I came across #39016 to not compute logits of the entire sequence when it's not needed. I was wondering if you'd be open to a PR applying the same improvement to BioGPT and, while I'm at it, any other `GenerationMixin` models that would benefit from this. I understand some of these models might be a bit obsolete and some could benefit from a refactor to modular instead, but I figure while they're there it's worth doing.
{ "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/40984/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40984/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/40983
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40983/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40983/comments
https://api.github.com/repos/huggingface/transformers/issues/40983/events
https://github.com/huggingface/transformers/issues/40983
3,431,409,709
I_kwDOCUB6oc7Mhygt
40,983
[`RFC v5`] Encoder-decoder support for Bert-related models and GPT2
{ "login": "vasqu", "id": 73884904, "node_id": "MDQ6VXNlcjczODg0OTA0", "avatar_url": "https://avatars.githubusercontent.com/u/73884904?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vasqu", "html_url": "https://github.com/vasqu", "followers_url": "https://api.github.com/users/vasqu/followers", "following_url": "https://api.github.com/users/vasqu/following{/other_user}", "gists_url": "https://api.github.com/users/vasqu/gists{/gist_id}", "starred_url": "https://api.github.com/users/vasqu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vasqu/subscriptions", "organizations_url": "https://api.github.com/users/vasqu/orgs", "repos_url": "https://api.github.com/users/vasqu/repos", "events_url": "https://api.github.com/users/vasqu/events{/privacy}", "received_events_url": "https://api.github.com/users/vasqu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 9105758243, "node_id": "LA_kwDOCUB6oc8AAAACHr7YIw", "url": "https://api.github.com/repos/huggingface/transformers/labels/for_v5?", "name": "for_v5?", "color": "35BC94", "default": false, "description": "" } ]
open
false
null
[]
null
[]
2025-09-18T17:58:38
2025-10-27T09:18:12
null
CONTRIBUTOR
null
null
null
null
Background: - Encoder-decoder models have been introduced via incorporating already trained encoder- and decoder-only models. See https://huggingface.co/papers/1908.08345 - It relies on the fact that these models can be customized on the fly. Issues/Motivation: - Transformers tries to actively keep a clean code of modeling files so that users can see the direct architecture without much bloat. - With the aforementioned feature, a lot of bloat code was introduced with multiple branches which makes maintenance harder. - These models are now overloaded and dont have the essentials only anymore. Proposal: - There are 3 paths we can go from here - 1. Keep everything as is - 2. Split the modeling files properly to have a Bert encoder-only, decoder-only etc - 3. Drop support for encoder-decoder models composed of different models Nothing is set yet but I'm interested in the community's usage/view on these related features, e.g. see https://huggingface.co/docs/transformers/model_doc/encoder-decoder - suggestions are greatly appreciated! cc @ArthurZucker @Cyrilvallez @LysandreJik
{ "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/40983/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40983/timeline
null
reopened
{ "total": 0, "completed": 0, "percent_completed": 0 }
{ "blocked_by": 0, "total_blocked_by": 0, "blocking": 0, "total_blocking": 0 }
false
false
https://api.github.com/repos/huggingface/transformers/issues/40982
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40982/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40982/comments
https://api.github.com/repos/huggingface/transformers/issues/40982/events
https://github.com/huggingface/transformers/pull/40982
3,431,176,173
PR_kwDOCUB6oc6pVg6k
40,982
Remove `set_model_tester_for_less_flaky_tests`
{ "login": "Cyrilvallez", "id": 71554963, "node_id": "MDQ6VXNlcjcxNTU0OTYz", "avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Cyrilvallez", "html_url": "https://github.com/Cyrilvallez", "followers_url": "https://api.github.com/users/Cyrilvallez/followers", "following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}", "gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}", "starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions", "organizations_url": "https://api.github.com/users/Cyrilvallez/orgs", "repos_url": "https://api.github.com/users/Cyrilvallez/repos", "events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}", "received_events_url": "https://api.github.com/users/Cyrilvallez/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T16:46:14
2025-09-18T16:56:12
2025-09-18T16:56:10
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40982", "html_url": "https://github.com/huggingface/transformers/pull/40982", "diff_url": "https://github.com/huggingface/transformers/pull/40982.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40982.patch", "merged_at": "2025-09-18T16:56:10" }
# What does this PR do? As per the title. It's a very bad idea to dynamically change the whole `tester`, and brings a lot of issues for models with `layer_types`. @gante removed most of its usage already, just cleaning up what's left!
{ "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/40982/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/40982/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40981
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40981/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40981/comments
https://api.github.com/repos/huggingface/transformers/issues/40981/events
https://github.com/huggingface/transformers/pull/40981
3,430,821,120
PR_kwDOCUB6oc6pUS2p
40,981
Track the CI (model) jobs that don't produce test output files (process being killed etc.)
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T15:09:36
2025-09-18T16:27:29
2025-09-18T16:27:27
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40981", "html_url": "https://github.com/huggingface/transformers/pull/40981", "diff_url": "https://github.com/huggingface/transformers/pull/40981.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40981.patch", "merged_at": "2025-09-18T16:27:27" }
# What does this PR do? For a few CI jobs, the pytest process is killed, not producing test output files. In this case, currently, this is not tracked, so we somehow think those jobs have no failing tests. This PR try to track such situation, and show at least on slack: > 🚨 There were {self.n_jobs_errored_out} jobs errored out (not producing test output files). 🚨 When we see this on Slack, we can check the artifact `model_results.json` by searching `["error"]` to find which jobs have this issue, click the `["job_link"]` to get to the job run page for more details. Might be better to extend this work to other jobs (deepspeed, pipeline), but let's see how it works with model jobs first. <img width="906" height="337" alt="Screenshot 2025-09-18 182213" src="https://github.com/user-attachments/assets/aaa96116-36af-46b1-864f-9ff2cf1b5273" />
{ "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/40981/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40981/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40980
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40980/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40980/comments
https://api.github.com/repos/huggingface/transformers/issues/40980/events
https://github.com/huggingface/transformers/pull/40980
3,430,662,187
PR_kwDOCUB6oc6pTvoz
40,980
[tests] update `test_left_padding_compatibility` (and minimize overwrites)
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T14:33:05
2025-09-19T14:56:56
2025-09-19T14:36:26
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40980", "html_url": "https://github.com/huggingface/transformers/pull/40980", "diff_url": "https://github.com/huggingface/transformers/pull/40980.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40980.patch", "merged_at": "2025-09-19T14:36:26" }
# What does this PR do? This PR updates `test_left_padding_compatibility` so that: 1. We now test left-padding support against all model inputs, as opposed to text-only inputs. This makes the test stricter: we now test that the model behaves well with left-padded text inputs, together with other (often optional) model inputs. Example: image inputs + padded text inputs may need a corresponding padded cross-attention mask 🔒 2. No true overwrites exist in the library. We can now define custom inputs to the test, to set model-specific inputs that may need to be padded (e.g. see example above) 🧘 (requirement for #40917 -- the changes made there need the updated test for a happy CI)
{ "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/40980/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40980/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40979
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40979/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40979/comments
https://api.github.com/repos/huggingface/transformers/issues/40979/events
https://github.com/huggingface/transformers/pull/40979
3,430,529,987
PR_kwDOCUB6oc6pTSYh
40,979
Remove require_torch_bf16_gpu
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T14:01:44
2025-10-17T10:50:33
2025-10-17T10:35:19
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40979", "html_url": "https://github.com/huggingface/transformers/pull/40979", "diff_url": "https://github.com/huggingface/transformers/pull/40979.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40979.patch", "merged_at": "2025-10-17T10:35:19" }
# What does this PR do? Remove `require_torch_bf16_gpu` because it is now unused.
{ "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/40979/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40979/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40978
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40978/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40978/comments
https://api.github.com/repos/huggingface/transformers/issues/40978/events
https://github.com/huggingface/transformers/pull/40978
3,430,427,258
PR_kwDOCUB6oc6pS7sM
40,978
Ci utils
{ "login": "remi-or", "id": 83456801, "node_id": "MDQ6VXNlcjgzNDU2ODAx", "avatar_url": "https://avatars.githubusercontent.com/u/83456801?v=4", "gravatar_id": "", "url": "https://api.github.com/users/remi-or", "html_url": "https://github.com/remi-or", "followers_url": "https://api.github.com/users/remi-or/followers", "following_url": "https://api.github.com/users/remi-or/following{/other_user}", "gists_url": "https://api.github.com/users/remi-or/gists{/gist_id}", "starred_url": "https://api.github.com/users/remi-or/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/remi-or/subscriptions", "organizations_url": "https://api.github.com/users/remi-or/orgs", "repos_url": "https://api.github.com/users/remi-or/repos", "events_url": "https://api.github.com/users/remi-or/events{/privacy}", "received_events_url": "https://api.github.com/users/remi-or/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T13:36:11
2025-09-22T14:16:20
2025-09-22T14:16:19
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40978", "html_url": "https://github.com/huggingface/transformers/pull/40978", "diff_url": "https://github.com/huggingface/transformers/pull/40978.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40978.patch", "merged_at": "2025-09-22T14:16:19" }
This PR adds an util script to run tests as they would be in the CI and generate reports. This is quite useful when fixing the CI and enables devs to use something akin to `run-slow` locally. Also useful when doing big sweeping changes and we want to run the CI locally or on a new hardware. Also adds the `reports` file to the .gitignore as a QoL improvement for people that runs the CI locally a lot.
{ "login": "remi-or", "id": 83456801, "node_id": "MDQ6VXNlcjgzNDU2ODAx", "avatar_url": "https://avatars.githubusercontent.com/u/83456801?v=4", "gravatar_id": "", "url": "https://api.github.com/users/remi-or", "html_url": "https://github.com/remi-or", "followers_url": "https://api.github.com/users/remi-or/followers", "following_url": "https://api.github.com/users/remi-or/following{/other_user}", "gists_url": "https://api.github.com/users/remi-or/gists{/gist_id}", "starred_url": "https://api.github.com/users/remi-or/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/remi-or/subscriptions", "organizations_url": "https://api.github.com/users/remi-or/orgs", "repos_url": "https://api.github.com/users/remi-or/repos", "events_url": "https://api.github.com/users/remi-or/events{/privacy}", "received_events_url": "https://api.github.com/users/remi-or/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40978/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/40978/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40977
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40977/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40977/comments
https://api.github.com/repos/huggingface/transformers/issues/40977/events
https://github.com/huggingface/transformers/issues/40977
3,430,306,974
I_kwDOCUB6oc7MdlSe
40,977
Whisper Finetuning Issue
{ "login": "AbhijithMallya", "id": 91281454, "node_id": "MDQ6VXNlcjkxMjgxNDU0", "avatar_url": "https://avatars.githubusercontent.com/u/91281454?v=4", "gravatar_id": "", "url": "https://api.github.com/users/AbhijithMallya", "html_url": "https://github.com/AbhijithMallya", "followers_url": "https://api.github.com/users/AbhijithMallya/followers", "following_url": "https://api.github.com/users/AbhijithMallya/following{/other_user}", "gists_url": "https://api.github.com/users/AbhijithMallya/gists{/gist_id}", "starred_url": "https://api.github.com/users/AbhijithMallya/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AbhijithMallya/subscriptions", "organizations_url": "https://api.github.com/users/AbhijithMallya/orgs", "repos_url": "https://api.github.com/users/AbhijithMallya/repos", "events_url": "https://api.github.com/users/AbhijithMallya/events{/privacy}", "received_events_url": "https://api.github.com/users/AbhijithMallya/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 1990918270, "node_id": "MDU6TGFiZWwxOTkwOTE4Mjcw", "url": "https://api.github.com/repos/huggingface/transformers/labels/Good%20First%20Issue", "name": "Good First Issue", "color": "bbf794", "default": false, "description": "" } ]
closed
false
null
[]
null
[]
2025-09-18T13:07:44
2025-09-30T08:38:33
2025-09-30T08:38:33
NONE
null
null
null
null
Getting `RuntimeError: Dataset scripts are no longer supported, but found common_voice_11_0.py` when finetuning whisper. Reference : [Whisper Finetuning](https://github.com/huggingface/transformers/tree/main/examples/pytorch/speech-recognition#single-gpu-whisper-training) File : `examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py` Logs ``` 09/18/2025 18:32:15 - WARNING - __main__ - Process rank: 0, device: cuda:0, n_gpu: 1, distributed training: False, 16-bits training: True 09/18/2025 18:32:15 - INFO - __main__ - Training/evaluation parameters Seq2SeqTrainingArguments( _n_gpu=1, accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False}, adafactor=False, adam_beta1=0.9, adam_beta2=0.999, adam_epsilon=1e-08, auto_find_batch_size=False, average_tokens_across_devices=False, batch_eval_metrics=False, bf16=False, bf16_full_eval=False, data_seed=None, dataloader_drop_last=False, dataloader_num_workers=0, dataloader_persistent_workers=False, dataloader_pin_memory=True, dataloader_prefetch_factor=None, ddp_backend=None, ddp_broadcast_buffers=None, ddp_bucket_cap_mb=None, ddp_find_unused_parameters=None, ddp_timeout=1800, debug=[], deepspeed=None, disable_tqdm=False, do_eval=True, do_predict=False, do_train=True, eval_accumulation_steps=None, eval_delay=0, eval_do_concat_batches=True, eval_on_start=False, eval_steps=1000, eval_strategy=steps, eval_use_gather_object=False, fp16=True, fp16_backend=auto, fp16_full_eval=False, fp16_opt_level=O1, fsdp=[], fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}, fsdp_min_num_params=0, fsdp_transformer_layer_cls_to_wrap=None, full_determinism=False, generation_config=None, generation_max_length=225, generation_num_beams=None, gradient_accumulation_steps=2, gradient_checkpointing=True, gradient_checkpointing_kwargs=None, greater_is_better=None, group_by_length=False, half_precision_backend=auto, hub_always_push=False, hub_model_id=None, hub_private_repo=None, hub_revision=None, hub_strategy=every_save, hub_token=<HUB_TOKEN>, ignore_data_skip=False, include_for_metrics=[], include_inputs_for_metrics=False, include_num_input_tokens_seen=no, include_tokens_per_second=False, jit_mode_eval=False, label_names=None, label_smoothing_factor=0.0, learning_rate=1e-05, length_column_name=length, liger_kernel_config=None, load_best_model_at_end=False, local_rank=0, log_level=passive, log_level_replica=warning, log_on_each_node=True, logging_dir=./whisper-small-hi/runs/Sep18_18-32-15_M626DTRV, logging_first_step=False, logging_nan_inf_filter=True, logging_steps=25, logging_strategy=steps, lr_scheduler_kwargs={}, lr_scheduler_type=linear, max_grad_norm=1.0, max_steps=5000, metric_for_best_model=None, mp_parameters=, neftune_noise_alpha=None, no_cuda=False, num_train_epochs=3.0, optim=adamw_torch_fused, optim_args=None, optim_target_modules=None, output_dir=./whisper-small-hi, overwrite_output_dir=True, parallelism_config=None, past_index=-1, per_device_eval_batch_size=16, per_device_train_batch_size=16, predict_with_generate=True, prediction_loss_only=False, push_to_hub=False, push_to_hub_model_id=None, push_to_hub_organization=None, push_to_hub_token=<PUSH_TO_HUB_TOKEN>, ray_scope=last, remove_unused_columns=True, report_to=[], restore_callback_states_from_checkpoint=False, resume_from_checkpoint=None, run_name=None, save_on_each_node=False, save_only_model=False, save_safetensors=True, save_steps=1000, save_strategy=steps, save_total_limit=None, seed=42, skip_memory_metrics=True, sortish_sampler=False, tf32=None, torch_compile=False, torch_compile_backend=None, torch_compile_mode=None, torch_empty_cache_steps=None, torchdynamo=None, tpu_metrics_debug=False, tpu_num_cores=None, use_cpu=False, use_legacy_prediction_loop=False, use_liger_kernel=False, use_mps_device=False, warmup_ratio=0.0, warmup_steps=500, weight_decay=0.0, ) 09/18/2025 18:32:15 - INFO - __main__ - Training/evaluation parameters Seq2SeqTrainingArguments( _n_gpu=1, accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False}, adafactor=False, adam_beta1=0.9, adam_beta2=0.999, adam_epsilon=1e-08, auto_find_batch_size=False, average_tokens_across_devices=False, batch_eval_metrics=False, bf16=False, bf16_full_eval=False, data_seed=None, dataloader_drop_last=False, dataloader_num_workers=0, dataloader_persistent_workers=False, dataloader_pin_memory=True, dataloader_prefetch_factor=None, ddp_backend=None, ddp_broadcast_buffers=None, ddp_bucket_cap_mb=None, ddp_find_unused_parameters=None, ddp_timeout=1800, debug=[], deepspeed=None, disable_tqdm=False, do_eval=True, do_predict=False, do_train=True, eval_accumulation_steps=None, eval_delay=0, eval_do_concat_batches=True, eval_on_start=False, eval_steps=1000, eval_strategy=steps, eval_use_gather_object=False, fp16=True, fp16_backend=auto, fp16_full_eval=False, fp16_opt_level=O1, fsdp=[], fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}, fsdp_min_num_params=0, fsdp_transformer_layer_cls_to_wrap=None, full_determinism=False, generation_config=None, generation_max_length=225, generation_num_beams=None, gradient_accumulation_steps=2, gradient_checkpointing=True, gradient_checkpointing_kwargs=None, greater_is_better=None, group_by_length=False, half_precision_backend=auto, hub_always_push=False, hub_model_id=None, hub_private_repo=None, hub_revision=None, hub_strategy=every_save, hub_token=<HUB_TOKEN>, ignore_data_skip=False, include_for_metrics=[], include_inputs_for_metrics=False, include_num_input_tokens_seen=no, include_tokens_per_second=False, jit_mode_eval=False, label_names=None, label_smoothing_factor=0.0, learning_rate=1e-05, length_column_name=length, liger_kernel_config=None, load_best_model_at_end=False, local_rank=0, log_level=passive, log_level_replica=warning, log_on_each_node=True, logging_dir=./whisper-small-hi/runs/Sep18_18-32-15_M626DTRV, logging_first_step=False, logging_nan_inf_filter=True, logging_steps=25, logging_strategy=steps, lr_scheduler_kwargs={}, lr_scheduler_type=linear, max_grad_norm=1.0, max_steps=5000, metric_for_best_model=None, mp_parameters=, neftune_noise_alpha=None, no_cuda=False, num_train_epochs=3.0, optim=adamw_torch_fused, optim_args=None, optim_target_modules=None, output_dir=./whisper-small-hi, overwrite_output_dir=True, parallelism_config=None, past_index=-1, per_device_eval_batch_size=16, per_device_train_batch_size=16, predict_with_generate=True, prediction_loss_only=False, push_to_hub=False, push_to_hub_model_id=None, push_to_hub_organization=None, push_to_hub_token=<PUSH_TO_HUB_TOKEN>, ray_scope=last, remove_unused_columns=True, report_to=[], restore_callback_states_from_checkpoint=False, resume_from_checkpoint=None, run_name=None, save_on_each_node=False, save_only_model=False, save_safetensors=True, save_steps=1000, save_strategy=steps, save_total_limit=None, seed=42, skip_memory_metrics=True, sortish_sampler=False, tf32=None, torch_compile=False, torch_compile_backend=None, torch_compile_mode=None, torch_empty_cache_steps=None, torchdynamo=None, tpu_metrics_debug=False, tpu_num_cores=None, use_cpu=False, use_legacy_prediction_loop=False, use_liger_kernel=False, use_mps_device=False, warmup_ratio=0.0, warmup_steps=500, weight_decay=0.0, ) README.md: 14.4kB [00:00, 20.9MB/s] common_voice_11_0.py: 8.13kB [00:00, 18.2MB/s] Traceback (most recent call last): File "/data2/abhijith/transformers/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py", line 646, in <module> main() File "/data2/abhijith/transformers/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py", line 356, in main raw_datasets["train"] = load_dataset( File "/data2/abhijith/transformers/examples/pytorch/speech-recognition/.venv/lib/python3.10/site-packages/datasets/load.py", line 1392, in load_dataset builder_instance = load_dataset_builder( File "/data2/abhijith/transformers/examples/pytorch/speech-recognition/.venv/lib/python3.10/site-packages/datasets/load.py", line 1132, in load_dataset_builder dataset_module = dataset_module_factory( File "/data2/abhijith/transformers/examples/pytorch/speech-recognition/.venv/lib/python3.10/site-packages/datasets/load.py", line 1031, in dataset_module_factory raise e1 from None File "/data2/abhijith/transformers/examples/pytorch/speech-recognition/.venv/lib/python3.10/site-packages/datasets/load.py", line 989, in dataset_module_factory raise RuntimeError(f"Dataset scripts are no longer supported, but found {filename}") RuntimeError: Dataset scripts are no longer supported, but found common_voice_11_0.py ```
{ "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/40977/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40977/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/40976
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40976/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40976/comments
https://api.github.com/repos/huggingface/transformers/issues/40976/events
https://github.com/huggingface/transformers/pull/40976
3,430,276,269
PR_kwDOCUB6oc6pSaPX
40,976
Better defaults for assisted generation
{ "login": "manueldeprada", "id": 6536835, "node_id": "MDQ6VXNlcjY1MzY4MzU=", "avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4", "gravatar_id": "", "url": "https://api.github.com/users/manueldeprada", "html_url": "https://github.com/manueldeprada", "followers_url": "https://api.github.com/users/manueldeprada/followers", "following_url": "https://api.github.com/users/manueldeprada/following{/other_user}", "gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}", "starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions", "organizations_url": "https://api.github.com/users/manueldeprada/orgs", "repos_url": "https://api.github.com/users/manueldeprada/repos", "events_url": "https://api.github.com/users/manueldeprada/events{/privacy}", "received_events_url": "https://api.github.com/users/manueldeprada/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-18T13:00:20
2025-09-18T15:51:58
null
CONTRIBUTOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40976", "html_url": "https://github.com/huggingface/transformers/pull/40976", "diff_url": "https://github.com/huggingface/transformers/pull/40976.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40976.patch", "merged_at": null }
#40657 inadvertently changed an implicit algorithmic bias: candidate_generator (the assistant model) was getting logits_processor while the decoding method (main model) was getting prepared_logits_processor. This meant that the assistant was running with T=1 while the main model was using lower temp. We investigated and its good for speculation to have a hotter assistant model (so it was a good bug that we were not applying the lower temp to the assistant), <img width="703" height="720" alt="image" src="https://github.com/user-attachments/assets/bd2e5459-fed1-4227-babb-2e5eca52ef2f" /> <img width="715" height="720" alt="image" src="https://github.com/user-attachments/assets/98b3f060-1673-42cb-9b00-c46d71a339a2" /> <img width="1034" height="1055" alt="image" src="https://github.com/user-attachments/assets/c2aa4d0f-61ed-4183-963e-ba5f9768cebc" /> But it should be explicitly set and not a hidden argument forwarding consequence. This PR does that, setting it by default to 1.5. This PR also fixes: ``` FAILED tests/generation/test_utils.py::GenerationIntegrationTests::test_generated_length_assisted_generation - ValueError: Passing `MinLengthLogitsProcessor` when using `assisted_generation is disabled. Please pass in `min_length` into `.generate()` instead ``` which originates from the same change in LogitsProcessor passing.
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40976/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/40976/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/40975
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40975/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40975/comments
https://api.github.com/repos/huggingface/transformers/issues/40975/events
https://github.com/huggingface/transformers/pull/40975
3,430,265,325
PR_kwDOCUB6oc6pSXza
40,975
Use torch.autocast
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T12:57:39
2025-09-22T12:53:24
2025-09-22T12:18:24
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40975", "html_url": "https://github.com/huggingface/transformers/pull/40975", "diff_url": "https://github.com/huggingface/transformers/pull/40975.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40975.patch", "merged_at": "2025-09-22T12:18:24" }
# What does this PR do? The new API is available since PT 2.2
{ "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/40975/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40975/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40974
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40974/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40974/comments
https://api.github.com/repos/huggingface/transformers/issues/40974/events
https://github.com/huggingface/transformers/pull/40974
3,430,259,237
PR_kwDOCUB6oc6pSWcu
40,974
Testing - DO NOT review or merge
{ "login": "zucchini-nlp", "id": 100715397, "node_id": "U_kgDOBgDLhQ", "avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zucchini-nlp", "html_url": "https://github.com/zucchini-nlp", "followers_url": "https://api.github.com/users/zucchini-nlp/followers", "following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}", "gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}", "starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions", "organizations_url": "https://api.github.com/users/zucchini-nlp/orgs", "repos_url": "https://api.github.com/users/zucchini-nlp/repos", "events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}", "received_events_url": "https://api.github.com/users/zucchini-nlp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T12:56:13
2025-09-18T13:42:10
2025-09-18T13:08:23
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40974", "html_url": "https://github.com/huggingface/transformers/pull/40974", "diff_url": "https://github.com/huggingface/transformers/pull/40974.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40974.patch", "merged_at": null }
# What does this PR do? It's getting impossible to track down why CI is failing in a PR with many diffs, so I will use this one as minimalistic version
{ "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/40974/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40974/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40973
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40973/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40973/comments
https://api.github.com/repos/huggingface/transformers/issues/40973/events
https://github.com/huggingface/transformers/pull/40973
3,430,193,983
PR_kwDOCUB6oc6pSIH7
40,973
[Fix] Fix test file error
{ "login": "YangKai0616", "id": 103475281, "node_id": "U_kgDOBiroUQ", "avatar_url": "https://avatars.githubusercontent.com/u/103475281?v=4", "gravatar_id": "", "url": "https://api.github.com/users/YangKai0616", "html_url": "https://github.com/YangKai0616", "followers_url": "https://api.github.com/users/YangKai0616/followers", "following_url": "https://api.github.com/users/YangKai0616/following{/other_user}", "gists_url": "https://api.github.com/users/YangKai0616/gists{/gist_id}", "starred_url": "https://api.github.com/users/YangKai0616/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/YangKai0616/subscriptions", "organizations_url": "https://api.github.com/users/YangKai0616/orgs", "repos_url": "https://api.github.com/users/YangKai0616/repos", "events_url": "https://api.github.com/users/YangKai0616/events{/privacy}", "received_events_url": "https://api.github.com/users/YangKai0616/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T12:39:37
2025-10-09T15:30:54
2025-10-09T15:30:54
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40973", "html_url": "https://github.com/huggingface/transformers/pull/40973", "diff_url": "https://github.com/huggingface/transformers/pull/40973.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40973.patch", "merged_at": "2025-10-09T15:30:54" }
# 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 --> Fixed a minor error in the test file. Otherwise, an error will be reported: ``` cls = <enum 'OptimizerNames'> value = TrainingArguments( _n_gpu=1, accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': Tru...diction_loop=False, use_liger_kernel=False, use_mps_device=False, warmup_ratio=0.0, warmup_steps=0, weight_decay=0.0, ) @classmethod def _missing_(cls, value): > raise ValueError( f"{value} is not a valid {cls.__name__}, please select one of {list(cls._value2member_map_.keys())}" ) E ValueError: TrainingArguments( E _n_gpu=1, E accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False}, E adafactor=False, E adam_beta1=0.9, E adam_beta2=0.999, E adam_epsilon=1e-08, E auto_find_batch_size=False, E average_tokens_across_devices=False, E batch_eval_metrics=False, E bf16=False, E bf16_full_eval=False, E data_seed=None, E dataloader_drop_last=False, E dataloader_num_workers=0, E dataloader_persistent_workers=False, E dataloader_pin_memory=True, E dataloader_prefetch_factor=None, E ddp_backend=None, E ddp_broadcast_buffers=None, E ddp_bucket_cap_mb=None, E ddp_find_unused_parameters=None, E ddp_timeout=1800, E debug=[], E deepspeed=None, E disable_tqdm=False, E do_eval=False, E do_predict=False, E do_train=False, E eval_accumulation_steps=None, E eval_delay=0, E eval_do_concat_batches=True, E eval_on_start=False, E eval_steps=None, E eval_strategy=IntervalStrategy.NO, E eval_use_gather_object=False, E fp16=False, E fp16_backend=auto, E fp16_full_eval=False, E fp16_opt_level=O1, E fsdp=[], E fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}, E fsdp_min_num_params=0, E fsdp_transformer_layer_cls_to_wrap=None, E full_determinism=False, E gradient_accumulation_steps=1, E gradient_checkpointing=False, E gradient_checkpointing_kwargs=None, E greater_is_better=None, E group_by_length=False, E half_precision_backend=auto, E hub_always_push=False, E hub_model_id=None, E hub_private_repo=None, E hub_revision=None, E hub_strategy=HubStrategy.EVERY_SAVE, E hub_token=<HUB_TOKEN>, E ignore_data_skip=False, E include_for_metrics=[], E include_inputs_for_metrics=False, E include_num_input_tokens_seen=no, E include_tokens_per_second=False, E jit_mode_eval=False, E label_names=None, E label_smoothing_factor=0.0, E learning_rate=5e-05, E length_column_name=length, E liger_kernel_config=None, E load_best_model_at_end=False, E local_rank=0, E log_level=passive, E log_level_replica=warning, E log_on_each_node=True, E logging_dir=None/runs/Sep18_12-37-01_173afc988c7f, E logging_first_step=False, E logging_nan_inf_filter=True, E logging_steps=500, E logging_strategy=IntervalStrategy.STEPS, E lr_scheduler_kwargs={}, E lr_scheduler_type=SchedulerType.LINEAR, E max_grad_norm=1.0, E max_steps=-1, E metric_for_best_model=None, E mp_parameters=, E neftune_noise_alpha=None, E no_cuda=False, E num_train_epochs=3.0, E optim=OptimizerNames.ADAMW_TORCH_8BIT, E optim_args=None, E optim_target_modules=None, E output_dir=None, E overwrite_output_dir=False, E parallelism_config=None, E past_index=-1, E per_device_eval_batch_size=8, E per_device_train_batch_size=8, E prediction_loss_only=False, E push_to_hub=False, E push_to_hub_model_id=None, E push_to_hub_organization=None, E push_to_hub_token=<PUSH_TO_HUB_TOKEN>, E ray_scope=last, E remove_unused_columns=True, E report_to=['tensorboard'], E restore_callback_states_from_checkpoint=False, E resume_from_checkpoint=None, E run_name=None, E save_on_each_node=False, E save_only_model=False, E save_safetensors=True, E save_steps=500, E save_strategy=SaveStrategy.STEPS, E save_total_limit=None, E seed=42, E skip_memory_metrics=True, E tf32=None, E torch_compile=False, E torch_compile_backend=None, E torch_compile_mode=None, E torch_empty_cache_steps=None, E torchdynamo=None, E tpu_metrics_debug=False, E tpu_num_cores=None, E use_cpu=False, E use_legacy_prediction_loop=False, E use_liger_kernel=False, E use_mps_device=False, E warmup_ratio=0.0, E warmup_steps=0, E weight_decay=0.0, E ) is not a valid OptimizerNames, please select one of ['adamw_torch', 'adamw_torch_fused', 'adamw_torch_xla', 'adamw_torch_npu_fused', 'adamw_apex_fused', 'adafactor', 'adamw_anyprecision', 'adamw_torch_4bit', 'adamw_torch_8bit', 'ademamix', 'sgd', 'adagrad', 'adamw_bnb_8bit', 'adamw_8bit', 'ademamix_8bit', 'lion_8bit', 'lion_32bit', 'paged_adamw_32bit', 'paged_adamw_8bit', 'paged_ademamix_32bit', 'paged_ademamix_8bit', 'paged_lion_32bit', 'paged_lion_8bit', 'rmsprop', 'rmsprop_bnb', 'rmsprop_bnb_8bit', 'rmsprop_bnb_32bit', 'galore_adamw', 'galore_adamw_8bit', 'galore_adafactor', 'galore_adamw_layerwise', 'galore_adamw_8bit_layerwise', 'galore_adafactor_layerwise', 'lomo', 'adalomo', 'grokadamw', 'schedule_free_radam', 'schedule_free_adamw', 'schedule_free_sgd', 'apollo_adamw', 'apollo_adamw_layerwise', 'stable_adamw'] /usr/local/lib/python3.11/dist-packages/transformers/utils/generic.py:478: ValueError ``` ## Before submitting - [×] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [√] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [×] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [√] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [×] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "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/40973/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40973/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40972
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40972/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40972/comments
https://api.github.com/repos/huggingface/transformers/issues/40972/events
https://github.com/huggingface/transformers/issues/40972
3,430,170,833
I_kwDOCUB6oc7MdEDR
40,972
Error when running Qwen3_Next Qwen3-Next model
{ "login": "qsstcl", "id": 116471041, "node_id": "U_kgDOBvE1AQ", "avatar_url": "https://avatars.githubusercontent.com/u/116471041?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qsstcl", "html_url": "https://github.com/qsstcl", "followers_url": "https://api.github.com/users/qsstcl/followers", "following_url": "https://api.github.com/users/qsstcl/following{/other_user}", "gists_url": "https://api.github.com/users/qsstcl/gists{/gist_id}", "starred_url": "https://api.github.com/users/qsstcl/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qsstcl/subscriptions", "organizations_url": "https://api.github.com/users/qsstcl/orgs", "repos_url": "https://api.github.com/users/qsstcl/repos", "events_url": "https://api.github.com/users/qsstcl/events{/privacy}", "received_events_url": "https://api.github.com/users/qsstcl/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
open
false
null
[]
null
[]
2025-09-18T12:33:24
2025-10-10T16:11:38
null
NONE
null
null
null
null
### System Info Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points. - `transformers` version: 4.57.0.dev0 - Platform: Linux-6.8.0-79-generic-x86_64-with-glibc2.39 - Python version: 3.12.11 - Huggingface_hub version: 0.35.0 - Safetensors version: 0.6.2 - Accelerate version: 1.10.1 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (accelerator?): 2.8.0+cu128 (CUDA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: <fill in> - Using GPU in script?: <fill in> - GPU type: NVIDIA GeForce RTX 4090 ### Who can help? @ArthurZucker @Cyrilvallez @gante ### Information - [ ] The official example scripts - [x] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [x] My own task or dataset (give details below) ### Reproduction 1、running with test.py given by Qwen official website. ``` from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "Qwen/Qwen3-Next-80B-A3B-Instruct" custom_cache_path = "/mnt/m2_4/models/Qwen3_Next_80B_A3B" # load the tokenizer and the model from the local directory tokenizer = AutoTokenizer.from_pretrained(model_name,cache_dir=custom_cache_path) model = AutoModelForCausalLM.from_pretrained( model_name, dtype="auto", device_map="auto", cache_dir = custom_cache_path, ) # prepare the model input prompt = "Give me a short introduction to large language model." messages = [ {"role": "user", "content": prompt}, ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, ) model_inputs = tokenizer([text], return_tensors="pt").to(model.device) # conduct text completion generated_ids = model.generate( **model_inputs, max_new_tokens=16384, ) output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() content = tokenizer.decode(output_ids, skip_special_tokens=True) print("content:", content) ``` 2、the error log as follows, error when loading "mtp.***" tensor weights. <img width="924" height="695" alt="Image" src="https://github.com/user-attachments/assets/b57e7ca9-6794-4cdb-a85b-124724348e72" /> ### Expected behavior output correct answers
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40972/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40972/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/40971
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40971/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40971/comments
https://api.github.com/repos/huggingface/transformers/issues/40971/events
https://github.com/huggingface/transformers/pull/40971
3,430,002,293
PR_kwDOCUB6oc6pRd2N
40,971
Minor test addition for sdpa producing NaNs for pad tokens
{ "login": "DuyguA", "id": 8277232, "node_id": "MDQ6VXNlcjgyNzcyMzI=", "avatar_url": "https://avatars.githubusercontent.com/u/8277232?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DuyguA", "html_url": "https://github.com/DuyguA", "followers_url": "https://api.github.com/users/DuyguA/followers", "following_url": "https://api.github.com/users/DuyguA/following{/other_user}", "gists_url": "https://api.github.com/users/DuyguA/gists{/gist_id}", "starred_url": "https://api.github.com/users/DuyguA/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DuyguA/subscriptions", "organizations_url": "https://api.github.com/users/DuyguA/orgs", "repos_url": "https://api.github.com/users/DuyguA/repos", "events_url": "https://api.github.com/users/DuyguA/events{/privacy}", "received_events_url": "https://api.github.com/users/DuyguA/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T11:48:14
2025-09-23T10:00:23
2025-09-19T13:58:03
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40971", "html_url": "https://github.com/huggingface/transformers/pull/40971", "diff_url": "https://github.com/huggingface/transformers/pull/40971.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40971.patch", "merged_at": null }
The issue was fixed from PyTorch side, still I added a quick test to confirm the issue is indeed resolved. Fixes #31035 ## 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?
{ "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/40971/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40971/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40970
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40970/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40970/comments
https://api.github.com/repos/huggingface/transformers/issues/40970/events
https://github.com/huggingface/transformers/issues/40970
3,429,944,190
I_kwDOCUB6oc7McMt-
40,970
Inconsistenly sized batches of images and text (Gemma 3)
{ "login": "KarelKenens", "id": 143591762, "node_id": "U_kgDOCI8JUg", "avatar_url": "https://avatars.githubusercontent.com/u/143591762?v=4", "gravatar_id": "", "url": "https://api.github.com/users/KarelKenens", "html_url": "https://github.com/KarelKenens", "followers_url": "https://api.github.com/users/KarelKenens/followers", "following_url": "https://api.github.com/users/KarelKenens/following{/other_user}", "gists_url": "https://api.github.com/users/KarelKenens/gists{/gist_id}", "starred_url": "https://api.github.com/users/KarelKenens/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/KarelKenens/subscriptions", "organizations_url": "https://api.github.com/users/KarelKenens/orgs", "repos_url": "https://api.github.com/users/KarelKenens/repos", "events_url": "https://api.github.com/users/KarelKenens/events{/privacy}", "received_events_url": "https://api.github.com/users/KarelKenens/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-18T11:32:18
2025-09-18T13:31:51
2025-09-18T13:31:51
NONE
null
null
null
null
### System Info - `transformers` version: 4.56.1 - Platform: Windows-11-10.0.26100-SP0 - Python version: 3.13.7 - Huggingface_hub version: 0.35.0 - Safetensors version: 0.6.2 - Accelerate version: 1.10.1 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (accelerator?): 2.8.0+ - 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?: NA - GPU type: NVIDIA RTX 1000 Ada Generation Laptop GPU ### 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 ```python import numpy as np import torch from PIL import Image from transformers import AutoProcessor, Gemma3ForConditionalGeneration model_id = "google/gemma-3-4b-it" model = Gemma3ForConditionalGeneration.from_pretrained( model_id, device_map="auto", token=<token> ).eval() processor = AutoProcessor.from_pretrained( model_id, token=<token> ) messages = [ { "role": "user", "content": [ { "type": "image", "image": Image.fromarray( np.random.randint(0, 255, (512, 512, 3), dtype=np.uint8) ), }, {"type": "text", "text": "Describe this image in detail."}, ], }, {"role": "assistant", "content": [{"type": "text", "text": " "}]}, { "role": "user", "content": [ { "type": "image", "image": Image.fromarray( np.random.randint(0, 255, (512, 512, 3), dtype=np.uint8) ), }, {"type": "text", "text": "Describe this image in detail."}, ], }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device, dtype=torch.bfloat16) input_len = inputs["input_ids"].shape[-1] with torch.inference_mode(): generation = model.generate(**inputs, max_new_tokens=100, do_sample=False) generation = generation[0][input_len:] decoded = processor.decode(generation, skip_special_tokens=True) print(decoded) ``` ### Expected behavior ### Issue (Seemingly) Using `ProcessorMixin.apply_chat_template` on multi-turn conversations (e.g. more than "user" message) where multiple turns/messages contain an image. Image batches are created as a batch per "turn". I.e. one "conversation" can correspond to multiple image batches. In `Gemma3Processor` it is expected that the number of batches corresponds to the number of "conversations".
{ "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/40970/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40970/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/40969
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40969/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40969/comments
https://api.github.com/repos/huggingface/transformers/issues/40969/events
https://github.com/huggingface/transformers/pull/40969
3,429,835,448
PR_kwDOCUB6oc6pQ5L5
40,969
Fix outdated version checks of accelerator
{ "login": "cyyever", "id": 17618148, "node_id": "MDQ6VXNlcjE3NjE4MTQ4", "avatar_url": "https://avatars.githubusercontent.com/u/17618148?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyyever", "html_url": "https://github.com/cyyever", "followers_url": "https://api.github.com/users/cyyever/followers", "following_url": "https://api.github.com/users/cyyever/following{/other_user}", "gists_url": "https://api.github.com/users/cyyever/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyyever/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyyever/subscriptions", "organizations_url": "https://api.github.com/users/cyyever/orgs", "repos_url": "https://api.github.com/users/cyyever/repos", "events_url": "https://api.github.com/users/cyyever/events{/privacy}", "received_events_url": "https://api.github.com/users/cyyever/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T11:03:28
2025-09-18T11:51:06
2025-09-18T11:49:14
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40969", "html_url": "https://github.com/huggingface/transformers/pull/40969", "diff_url": "https://github.com/huggingface/transformers/pull/40969.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40969.patch", "merged_at": "2025-09-18T11:49:14" }
# What does this PR do? Because `ACCELERATE_MIN_VERSION` is 0.26
{ "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/40969/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40969/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40968
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40968/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40968/comments
https://api.github.com/repos/huggingface/transformers/issues/40968/events
https://github.com/huggingface/transformers/issues/40968
3,429,742,607
I_kwDOCUB6oc7MbbgP
40,968
An error occurred when directly deploying the Qwen3-Next 80B-A3B-Thinking model saved by the save_pretrained of transformers using vllm. However, directly deploying the original model was normal
{ "login": "zhanlun150729", "id": 34824176, "node_id": "MDQ6VXNlcjM0ODI0MTc2", "avatar_url": "https://avatars.githubusercontent.com/u/34824176?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zhanlun150729", "html_url": "https://github.com/zhanlun150729", "followers_url": "https://api.github.com/users/zhanlun150729/followers", "following_url": "https://api.github.com/users/zhanlun150729/following{/other_user}", "gists_url": "https://api.github.com/users/zhanlun150729/gists{/gist_id}", "starred_url": "https://api.github.com/users/zhanlun150729/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zhanlun150729/subscriptions", "organizations_url": "https://api.github.com/users/zhanlun150729/orgs", "repos_url": "https://api.github.com/users/zhanlun150729/repos", "events_url": "https://api.github.com/users/zhanlun150729/events{/privacy}", "received_events_url": "https://api.github.com/users/zhanlun150729/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
open
false
null
[]
null
[]
2025-09-18T10:37:28
2025-10-09T15:14:46
null
NONE
null
null
null
null
### System Info System Info ### Who can help? (zhihu_0210_bak_0403) root@nb-zhanlun-zl-0914-1-0:/home# python collect_env.py Collecting environment information... ============================== System Info ============================== OS : Ubuntu 22.04.4 LTS (x86_64) GCC version : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version : Could not collect CMake version : version 3.28.3 Libc version : glibc-2.35 ============================== PyTorch Info ============================== PyTorch version : 2.8.0+cu128 Is debug build : False CUDA used to build PyTorch : 12.8 ROCM used to build PyTorch : N/A ============================== Python Environment ============================== Python version : 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime) Python platform : Linux-5.4.0-42-generic-x86_64-with-glibc2.35 ============================== CUDA / GPU Info ============================== Is CUDA available : True CUDA runtime version : 12.4.99 CUDA_MODULE_LOADING set to : LAZY GPU models and configuration : GPU 0: NVIDIA A800-SXM4-80GB GPU 1: NVIDIA A800-SXM4-80GB GPU 2: NVIDIA A800-SXM4-80GB GPU 3: NVIDIA A800-SXM4-80GB GPU 4: NVIDIA A800-SXM4-80GB GPU 5: NVIDIA A800-SXM4-80GB GPU 6: NVIDIA A800-SXM4-80GB GPU 7: NVIDIA A800-SXM4-80GB <img width="1256" height="301" alt="Image" src="https://github.com/user-attachments/assets/4f90b53b-9296-4be5-a299-22ae9bfd1c79" /> ### 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 An error occurred when directly deploying the Qwen3-Next 80B-A3B-Thinking model saved by the save_pretrained of transformers using vllm. However, directly deploying the original model was normal <img width="901" height="206" alt="Image" src="https://github.com/user-attachments/assets/f0b0baab-5f7a-43be-bb6f-96e4323d6570" /> <img width="1691" height="832" alt="Image" src="https://github.com/user-attachments/assets/f77ed66b-226d-4c18-a9c3-cb03d2b86388" /> ### Expected behavior 正常部署,实际报错
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40968/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40968/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/40967
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40967/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40967/comments
https://api.github.com/repos/huggingface/transformers/issues/40967/events
https://github.com/huggingface/transformers/pull/40967
3,429,538,857
PR_kwDOCUB6oc6pP3jo
40,967
Update expected values for one more `test_speculative_generation` after #40949
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T09:42:42
2025-09-18T09:51:59
2025-09-18T09:47:14
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40967", "html_url": "https://github.com/huggingface/transformers/pull/40967", "diff_url": "https://github.com/huggingface/transformers/pull/40967.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40967.patch", "merged_at": "2025-09-18T09:47:14" }
# What does this PR do? Missed this one > tests/models/qwen3_moe/test_modeling_qwen3_moe.py::Qwen3MoeIntegrationTest::test_speculative_generation in #40949
{ "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/40967/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40967/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40966
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40966/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40966/comments
https://api.github.com/repos/huggingface/transformers/issues/40966/events
https://github.com/huggingface/transformers/pull/40966
3,429,466,199
PR_kwDOCUB6oc6pPoPJ
40,966
use `skip_predictor=True` in vjepa2 `get_vision_features`
{ "login": "hamishs", "id": 41787553, "node_id": "MDQ6VXNlcjQxNzg3NTUz", "avatar_url": "https://avatars.githubusercontent.com/u/41787553?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hamishs", "html_url": "https://github.com/hamishs", "followers_url": "https://api.github.com/users/hamishs/followers", "following_url": "https://api.github.com/users/hamishs/following{/other_user}", "gists_url": "https://api.github.com/users/hamishs/gists{/gist_id}", "starred_url": "https://api.github.com/users/hamishs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hamishs/subscriptions", "organizations_url": "https://api.github.com/users/hamishs/orgs", "repos_url": "https://api.github.com/users/hamishs/repos", "events_url": "https://api.github.com/users/hamishs/events{/privacy}", "received_events_url": "https://api.github.com/users/hamishs/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T09:21:19
2025-09-18T11:52:10
2025-09-18T11:51:45
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40966", "html_url": "https://github.com/huggingface/transformers/pull/40966", "diff_url": "https://github.com/huggingface/transformers/pull/40966.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40966.patch", "merged_at": "2025-09-18T11:51:45" }
# What does this PR do? `VJEPA2Model`'s `get_vision_features` method is meant to only forward pass through the encoder however it uses the model's `forward` method and omits `skip_predictor=True` meaning it also passes through the `predictor` which is wasted computation. This pr sets `skip_predictor=True` so that we only do the necessary calculations. ## 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? Maybe @pcuenca, @LysandreJik or @koustuvsinha as reviewers of the original VJEPA-2 pr?
{ "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/40966/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40966/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40965
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40965/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40965/comments
https://api.github.com/repos/huggingface/transformers/issues/40965/events
https://github.com/huggingface/transformers/pull/40965
3,429,272,667
PR_kwDOCUB6oc6pO-L3
40,965
Add captured actual outputs to CI artifacts
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T08:26:40
2025-09-18T13:40:55
2025-09-18T13:40:53
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40965", "html_url": "https://github.com/huggingface/transformers/pull/40965", "diff_url": "https://github.com/huggingface/transformers/pull/40965.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40965.patch", "merged_at": "2025-09-18T13:40:53" }
# What does this PR do? Follow up work of #40727: - In the pytest step, add the following so we get the captured actual outputs (for patched methods) > PATCH_TESTING_METHODS_TO_COLLECT_OUTPUTS=yes _PATCHED_TESTING_METHODS_OUTPUT_DIR=... - Add a new step `Captured information` to show it on the job run page - Add the link (of the new step `Captured information`) and the content of `captured_info.txt` to `model_results.json` This could help the update of expected output values faster. [Example run](https://github.com/huggingface/transformers/actions/runs/17821624855/job/50665488057#step:16:30)
{ "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/40965/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40965/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40964
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40964/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40964/comments
https://api.github.com/repos/huggingface/transformers/issues/40964/events
https://github.com/huggingface/transformers/issues/40964
3,429,104,797
I_kwDOCUB6oc7MY_yd
40,964
llava model compile output regression caused by `check_model_inputs`
{ "login": "jiqing-feng", "id": 107918818, "node_id": "U_kgDOBm614g", "avatar_url": "https://avatars.githubusercontent.com/u/107918818?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jiqing-feng", "html_url": "https://github.com/jiqing-feng", "followers_url": "https://api.github.com/users/jiqing-feng/followers", "following_url": "https://api.github.com/users/jiqing-feng/following{/other_user}", "gists_url": "https://api.github.com/users/jiqing-feng/gists{/gist_id}", "starred_url": "https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jiqing-feng/subscriptions", "organizations_url": "https://api.github.com/users/jiqing-feng/orgs", "repos_url": "https://api.github.com/users/jiqing-feng/repos", "events_url": "https://api.github.com/users/jiqing-feng/events{/privacy}", "received_events_url": "https://api.github.com/users/jiqing-feng/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null }, { "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-09-18T07:43:29
2025-10-06T09:48:53
2025-10-06T09:48:53
CONTRIBUTOR
null
null
null
null
### System Info torch 2.10.0.dev20250914+cpu transformers 4.57.0.dev0 ### Who can help? @zucchini-nlp ### Information - [ ] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction Run the following code on CPU: ```python import av import cv2 import torch import numpy as np from PIL import Image from huggingface_hub import hf_hub_download from transformers import LlavaProcessor, LlavaForConditionalGeneration model_id = "llava-hf/llava-interleave-qwen-7b-hf" processor = LlavaProcessor.from_pretrained(model_id) model = LlavaForConditionalGeneration.from_pretrained(model_id, dtype=torch.bfloat16) def read_video_pyav(container, indices): ''' Decode the video with PyAV decoder. Args: container (`av.container.input.InputContainer`): PyAV container. indices (`List[int]`): List of frame indices to decode. Returns: result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3). ''' frames = [] container.seek(0) start_index = indices[0] end_index = indices[-1] for i, frame in enumerate(container.decode(video=0)): if i > end_index: break if i >= start_index and i in indices: frames.append(frame) return np.stack([x.to_ndarray(format="rgb24") for x in frames]) def sample_frames(path, num_frames): video = cv2.VideoCapture(path) total_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT)) interval = total_frames // num_frames frames = [] for i in range(total_frames): ret, frame = video.read() pil_img = Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)) if not ret: continue if i % interval == 0: frames.append(pil_img) video.release() return frames[:num_frames] # define a chat history and use `apply_chat_template` to get correctly formatted prompt # Each value in "content" has to be a list of dicts with types ("text", "image", "video") conversation = [ { "role": "user", "content": [ {"type": "text", "text": "Why is this video funny?"}, {"type": "video"}, ], }, ] prompt = processor.apply_chat_template(conversation, add_generation_prompt=True) video_path = hf_hub_download(repo_id="raushan-testing-hf/videos-test", filename="sample_demo_1.mp4", repo_type="dataset") container = av.open(video_path) # sample uniformly 8 frames from the video, can sample more for longer videos videos = sample_frames(video_path, 6) user_prompt = conversation[0]["content"][0]["text"] toks = "<image>" * 6 prompt = ( "<|im_start|>user" + toks + f"\n{user_prompt}<|im_end|><|im_start|>assistant" ) inputs = processor(text=prompt, images=videos, return_tensors="pt").to( model.device, model.dtype ) generation_config = model.generation_config generation_config.do_sample = False generation_config.use_cache = True generation_config.temperature = 1.0 generation_config.max_new_tokens = 10 generation_config.min_new_tokens = 10 generation_config.top_p = 1.0 generation_config.cache_implementation = "static" output = model.generate(**inputs, generation_config=generation_config) print("eager model output:") print(processor.decode(output[0][2:], skip_special_tokens=True)) print("\n") model.forward = torch.compile(model.forward) output = model.generate(**inputs, generation_config=generation_config) print("compile model output:") print(processor.decode(output[0][2:], skip_special_tokens=True)) ``` ### Expected behavior Output before the PR #40342 ``` eager model output: Why is this video funny?assistant The video is humorous because the baby is wearing oversized compile model output: Why is this video funny?assistant The video is humorous because the baby is wearing oversized ``` Output after the PR #40342 ``` eager model output: Why is this video funny?assistant The video is humorous because the baby is wearing oversized compile model output: Why is this video funny?assistant The video is humorous because it shows a baby attempting ```
{ "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/40964/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40964/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/40963
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40963/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40963/comments
https://api.github.com/repos/huggingface/transformers/issues/40963/events
https://github.com/huggingface/transformers/issues/40963
3,429,044,906
I_kwDOCUB6oc7MYxKq
40,963
Qwen3-next feature dims are mismatched in torch_chunk_gated_delta_rule
{ "login": "jyC23333", "id": 110331827, "node_id": "U_kgDOBpOHsw", "avatar_url": "https://avatars.githubusercontent.com/u/110331827?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jyC23333", "html_url": "https://github.com/jyC23333", "followers_url": "https://api.github.com/users/jyC23333/followers", "following_url": "https://api.github.com/users/jyC23333/following{/other_user}", "gists_url": "https://api.github.com/users/jyC23333/gists{/gist_id}", "starred_url": "https://api.github.com/users/jyC23333/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jyC23333/subscriptions", "organizations_url": "https://api.github.com/users/jyC23333/orgs", "repos_url": "https://api.github.com/users/jyC23333/repos", "events_url": "https://api.github.com/users/jyC23333/events{/privacy}", "received_events_url": "https://api.github.com/users/jyC23333/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T07:27:50
2025-09-24T11:18:28
2025-09-24T11:18:28
NONE
null
null
null
null
@Cyrilvallez @bozheng-hit Hello, when I'm running the inference code of Qwen3-next during reviewing the `modeling_qwen3_next.py` file, I found the dimension is confused when the `hidden_states` are passed to the `torch_chunk_gated_delta_rule` function of `Qwen3NextGatedDeltaNet` class. Please refer the code here: https://github.com/huggingface/transformers/blob/main/src/transformers/models/qwen3_next/modeling_qwen3_next.py#L461 My input query is `Give me a short introduction to large language model`, the same as the official example. In this function, the shape of the input `key` is `[1, 18, 32, 128]`. Obviously this shape is `[(batch_size, seq_len, num_heads, head_k_dim)]`. Then the feature are processed by this: ``` query, key, value, beta, g = [ x.transpose(1, 2).contiguous().to(torch.float32) for x in (query, key, value, beta, g) ] ``` and the shape of `key` will be `[1, 32, 18, 128]`, However, the next line of the code is: ``` batch_size, sequence_length, num_heads, k_head_dim = key.shape ``` It seems that there is a mismatch in the code. Thanks.
{ "login": "vasqu", "id": 73884904, "node_id": "MDQ6VXNlcjczODg0OTA0", "avatar_url": "https://avatars.githubusercontent.com/u/73884904?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vasqu", "html_url": "https://github.com/vasqu", "followers_url": "https://api.github.com/users/vasqu/followers", "following_url": "https://api.github.com/users/vasqu/following{/other_user}", "gists_url": "https://api.github.com/users/vasqu/gists{/gist_id}", "starred_url": "https://api.github.com/users/vasqu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vasqu/subscriptions", "organizations_url": "https://api.github.com/users/vasqu/orgs", "repos_url": "https://api.github.com/users/vasqu/repos", "events_url": "https://api.github.com/users/vasqu/events{/privacy}", "received_events_url": "https://api.github.com/users/vasqu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40963/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40963/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/40962
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40962/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40962/comments
https://api.github.com/repos/huggingface/transformers/issues/40962/events
https://github.com/huggingface/transformers/pull/40962
3,428,963,501
PR_kwDOCUB6oc6pN6Ob
40,962
perceptron: Isaac-0.1 implementation
{ "login": "AkshatSh", "id": 9097613, "node_id": "MDQ6VXNlcjkwOTc2MTM=", "avatar_url": "https://avatars.githubusercontent.com/u/9097613?v=4", "gravatar_id": "", "url": "https://api.github.com/users/AkshatSh", "html_url": "https://github.com/AkshatSh", "followers_url": "https://api.github.com/users/AkshatSh/followers", "following_url": "https://api.github.com/users/AkshatSh/following{/other_user}", "gists_url": "https://api.github.com/users/AkshatSh/gists{/gist_id}", "starred_url": "https://api.github.com/users/AkshatSh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AkshatSh/subscriptions", "organizations_url": "https://api.github.com/users/AkshatSh/orgs", "repos_url": "https://api.github.com/users/AkshatSh/repos", "events_url": "https://api.github.com/users/AkshatSh/events{/privacy}", "received_events_url": "https://api.github.com/users/AkshatSh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-18T07:05:39
2025-10-29T17:16:54
null
NONE
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40962", "html_url": "https://github.com/huggingface/transformers/pull/40962", "diff_url": "https://github.com/huggingface/transformers/pull/40962.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40962.patch", "merged_at": null }
# Perceptron Isaac Implementation Perceptron released open weight models [Isaac-0.1](https://huggingface.co/PerceptronAI/Isaac-0.1) and [Isaac-0.1-Base](https://huggingface.co/PerceptronAI/Isaac-0.1-Base) a 2B dense model for perception.
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40962/reactions", "total_count": 7, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 7, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40962/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/40961
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40961/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40961/comments
https://api.github.com/repos/huggingface/transformers/issues/40961/events
https://github.com/huggingface/transformers/pull/40961
3,428,784,839
PR_kwDOCUB6oc6pNTWy
40,961
Revert "Update expected values for some `test_speculative_generation`"
{ "login": "Rjayaprakashnarayana", "id": 45266302, "node_id": "MDQ6VXNlcjQ1MjY2MzAy", "avatar_url": "https://avatars.githubusercontent.com/u/45266302?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rjayaprakashnarayana", "html_url": "https://github.com/Rjayaprakashnarayana", "followers_url": "https://api.github.com/users/Rjayaprakashnarayana/followers", "following_url": "https://api.github.com/users/Rjayaprakashnarayana/following{/other_user}", "gists_url": "https://api.github.com/users/Rjayaprakashnarayana/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rjayaprakashnarayana/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rjayaprakashnarayana/subscriptions", "organizations_url": "https://api.github.com/users/Rjayaprakashnarayana/orgs", "repos_url": "https://api.github.com/users/Rjayaprakashnarayana/repos", "events_url": "https://api.github.com/users/Rjayaprakashnarayana/events{/privacy}", "received_events_url": "https://api.github.com/users/Rjayaprakashnarayana/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T06:03:08
2025-09-18T08:29:01
2025-09-18T08:29:00
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40961", "html_url": "https://github.com/huggingface/transformers/pull/40961", "diff_url": "https://github.com/huggingface/transformers/pull/40961.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40961.patch", "merged_at": null }
Reverts huggingface/transformers#40949
{ "login": "Rjayaprakashnarayana", "id": 45266302, "node_id": "MDQ6VXNlcjQ1MjY2MzAy", "avatar_url": "https://avatars.githubusercontent.com/u/45266302?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rjayaprakashnarayana", "html_url": "https://github.com/Rjayaprakashnarayana", "followers_url": "https://api.github.com/users/Rjayaprakashnarayana/followers", "following_url": "https://api.github.com/users/Rjayaprakashnarayana/following{/other_user}", "gists_url": "https://api.github.com/users/Rjayaprakashnarayana/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rjayaprakashnarayana/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rjayaprakashnarayana/subscriptions", "organizations_url": "https://api.github.com/users/Rjayaprakashnarayana/orgs", "repos_url": "https://api.github.com/users/Rjayaprakashnarayana/repos", "events_url": "https://api.github.com/users/Rjayaprakashnarayana/events{/privacy}", "received_events_url": "https://api.github.com/users/Rjayaprakashnarayana/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40961/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40961/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40960
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40960/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40960/comments
https://api.github.com/repos/huggingface/transformers/issues/40960/events
https://github.com/huggingface/transformers/pull/40960
3,428,570,788
PR_kwDOCUB6oc6pMlpO
40,960
Fix/issue 40560 train tokens per second
{ "login": "Rjayaprakashnarayana", "id": 45266302, "node_id": "MDQ6VXNlcjQ1MjY2MzAy", "avatar_url": "https://avatars.githubusercontent.com/u/45266302?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rjayaprakashnarayana", "html_url": "https://github.com/Rjayaprakashnarayana", "followers_url": "https://api.github.com/users/Rjayaprakashnarayana/followers", "following_url": "https://api.github.com/users/Rjayaprakashnarayana/following{/other_user}", "gists_url": "https://api.github.com/users/Rjayaprakashnarayana/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rjayaprakashnarayana/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rjayaprakashnarayana/subscriptions", "organizations_url": "https://api.github.com/users/Rjayaprakashnarayana/orgs", "repos_url": "https://api.github.com/users/Rjayaprakashnarayana/repos", "events_url": "https://api.github.com/users/Rjayaprakashnarayana/events{/privacy}", "received_events_url": "https://api.github.com/users/Rjayaprakashnarayana/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 9258341780, "node_id": "LA_kwDOCUB6oc8AAAACJ9cVlA", "url": "https://api.github.com/repos/huggingface/transformers/labels/Code%20agent%20slop", "name": "Code agent slop", "color": "C59579", "default": false, "description": "" } ]
closed
false
null
[]
null
[]
2025-09-18T04:06:14
2025-09-18T12:14:02
2025-09-18T11:41:26
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40960", "html_url": "https://github.com/huggingface/transformers/pull/40960", "diff_url": "https://github.com/huggingface/transformers/pull/40960.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40960.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 #40560: `train_tokens_per_second` is wrong after continuing from checkpoint This PR addresses the issue where `train_tokens_per_second` shows inflated values when resuming training from a checkpoint. The bug occurred because the calculation included cumulative tokens from previous training sessions rather than just the current session. ## Changes Made - **src/transformers/trainer.py**: Reset training session start time when resuming from checkpoint - **src/transformers/trainer_utils.py**: Add runtime bounds checking to prevent division errors - **Training Loop**: Add session-specific token and sample counting for accurate metrics - **Checkpoint Resume**: Ensure speed metrics use current session data only ## Root Cause When resuming from checkpoint, the trainer was: 1. Using the original training start time instead of current session start time 2. Including cumulative token counts from all previous training sessions 3. Not properly resetting session-specific metrics ## Solution 1. Reset `_start_time` when resuming from checkpoint to current time 2. Track tokens processed in current session separately from global counts 3. Calculate metrics using session-relative data instead of cumulative totals 4. Add proper error handling for edge cases ## Testing - ✅ Reproduced original issue with test script - ✅ Verified fix resolves the problem - ✅ Tested with `run_clm.py` script - ✅ All existing tests pass ## Backward Compatibility This change is fully backward compatible. It only affects the calculation of training metrics and does not change: - Model weights or training behavior - Checkpoint format or loading - API interfaces - Configuration options ## Additional Notes This is marked as a "Good First Issue" and affects a commonly used training script (`run_clm.py`). The fix ensures that developers get accurate performance metrics when resuming training, which is important for: - Performance monitoring and optimization - Resource planning and scaling - Training progress assessment ## Before submitting - [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 --> contributed fixes by :- jayaprakashrayani@gmail.com
{ "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/40960/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40960/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40959
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40959/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40959/comments
https://api.github.com/repos/huggingface/transformers/issues/40959/events
https://github.com/huggingface/transformers/pull/40959
3,428,431,105
PR_kwDOCUB6oc6pMHrS
40,959
Fix/issue 40560 wrong train tokens per second bug
{ "login": "Rjayaprakashnarayana", "id": 45266302, "node_id": "MDQ6VXNlcjQ1MjY2MzAy", "avatar_url": "https://avatars.githubusercontent.com/u/45266302?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rjayaprakashnarayana", "html_url": "https://github.com/Rjayaprakashnarayana", "followers_url": "https://api.github.com/users/Rjayaprakashnarayana/followers", "following_url": "https://api.github.com/users/Rjayaprakashnarayana/following{/other_user}", "gists_url": "https://api.github.com/users/Rjayaprakashnarayana/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rjayaprakashnarayana/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rjayaprakashnarayana/subscriptions", "organizations_url": "https://api.github.com/users/Rjayaprakashnarayana/orgs", "repos_url": "https://api.github.com/users/Rjayaprakashnarayana/repos", "events_url": "https://api.github.com/users/Rjayaprakashnarayana/events{/privacy}", "received_events_url": "https://api.github.com/users/Rjayaprakashnarayana/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T02:44:34
2025-09-18T03:58:31
2025-09-18T03:58:13
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40959", "html_url": "https://github.com/huggingface/transformers/pull/40959", "diff_url": "https://github.com/huggingface/transformers/pull/40959.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40959.patch", "merged_at": null }
## Description Fixes #40560: `train_tokens_per_second` is wrong after continuing from checkpoint This PR addresses the issue where `train_tokens_per_second` shows inflated values when resuming training from a checkpoint. The bug occurred because the calculation included cumulative tokens from previous training sessions rather than just the current session. ## Changes Made - **src/transformers/trainer.py**: Reset training session start time when resuming from checkpoint - **src/transformers/trainer_utils.py**: Add runtime bounds checking to prevent division errors - **Training Loop**: Add session-specific token and sample counting for accurate metrics - **Checkpoint Resume**: Ensure speed metrics use current session data only ## Root Cause When resuming from checkpoint, the trainer was: 1. Using the original training start time instead of current session start time 2. Including cumulative token counts from all previous training sessions 3. Not properly resetting session-specific metrics ## Solution 1. Reset `_start_time` when resuming from checkpoint to current time 2. Track tokens processed in current session separately from global counts 3. Calculate metrics using session-relative data instead of cumulative totals 4. Add proper error handling for edge cases ## Testing - ✅ Reproduced original issue with test script - ✅ Verified fix resolves the problem - ✅ Tested with `run_clm.py` script - ✅ Added tests ## Backward Compatibility This change is fully backward compatible. It only affects the calculation of training metrics and does not change: - Model weights or training behavior - Checkpoint format or loading - API interfaces - Configuration options ## Additional Notes This is marked as a "Good First Issue" and affects a commonly used training script (`run_clm.py`). The fix ensures that developers get accurate performance metrics when resuming training, which is important for: - Performance monitoring and optimization - Resource planning and scaling - Training progress assessment # What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface, @SunMarc and @qgallouedec - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "Rjayaprakashnarayana", "id": 45266302, "node_id": "MDQ6VXNlcjQ1MjY2MzAy", "avatar_url": "https://avatars.githubusercontent.com/u/45266302?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rjayaprakashnarayana", "html_url": "https://github.com/Rjayaprakashnarayana", "followers_url": "https://api.github.com/users/Rjayaprakashnarayana/followers", "following_url": "https://api.github.com/users/Rjayaprakashnarayana/following{/other_user}", "gists_url": "https://api.github.com/users/Rjayaprakashnarayana/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rjayaprakashnarayana/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rjayaprakashnarayana/subscriptions", "organizations_url": "https://api.github.com/users/Rjayaprakashnarayana/orgs", "repos_url": "https://api.github.com/users/Rjayaprakashnarayana/repos", "events_url": "https://api.github.com/users/Rjayaprakashnarayana/events{/privacy}", "received_events_url": "https://api.github.com/users/Rjayaprakashnarayana/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40959/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40959/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40958
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40958/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40958/comments
https://api.github.com/repos/huggingface/transformers/issues/40958/events
https://github.com/huggingface/transformers/issues/40958
3,428,390,554
I_kwDOCUB6oc7MWRaa
40,958
Variety of models not working sufficiently good on tool calling as has been advertised
{ "login": "dvn8weil", "id": 190058927, "node_id": "U_kgDOC1QRrw", "avatar_url": "https://avatars.githubusercontent.com/u/190058927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dvn8weil", "html_url": "https://github.com/dvn8weil", "followers_url": "https://api.github.com/users/dvn8weil/followers", "following_url": "https://api.github.com/users/dvn8weil/following{/other_user}", "gists_url": "https://api.github.com/users/dvn8weil/gists{/gist_id}", "starred_url": "https://api.github.com/users/dvn8weil/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dvn8weil/subscriptions", "organizations_url": "https://api.github.com/users/dvn8weil/orgs", "repos_url": "https://api.github.com/users/dvn8weil/repos", "events_url": "https://api.github.com/users/dvn8weil/events{/privacy}", "received_events_url": "https://api.github.com/users/dvn8weil/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-18T02:23:37
2025-10-26T08:02:12
2025-10-26T08:02:12
NONE
null
null
null
null
### System Info - `transformers` version: 4.53.3 - Platform: Linux-6.14.0-1014-gcp-x86_64-with-glibc2.39 - Python version: 3.12.3 - Huggingface_hub version: 0.34.4 - Safetensors version: 0.6.2 - Accelerate version: not installed - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (accelerator?): 2.7.1+cu126 (CUDA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: No - Using GPU in script?: No - GPU type: NVIDIA L4 ### Who can help? I have been trying out various small/medium size models for my tool calling usecase. The models i tried out are : - mistralai/Mistral-7B-Instruct-v0.3 - ibm-granite/granite-20b-functioncalling - Team-ACE/ToolACE-2-Llama-3.1-8B - HuggingFaceTB/SmolLM3-3B I tried out these because these have been said to perform very good for tool calling capability/use-case but neither of these have worked good enough (with my setup) for my use-case which is consistent function calling , with `"tool_choice": "auto"`. On the other hand, Qwen3-12B has been working very well for me , w.r.t. tool calling capabilities. ### Information - [ ] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction I am using vLLM to run the models. Steps to reproduce the issues : - mistralai/Mistral-7B-Instruct-v0.3 : https://github.com/huggingface/transformers/issues/39852 - ibm-granite/granite-20b-functioncalling : https://github.com/huggingface/transformers/issues/40785 - HuggingFaceTB/SmolLM3-3B : https://github.com/huggingface/transformers/issues/40957 ### Expected behavior I am trying to understand if i have been setting up the models in an incorrect way. If someone can help me with understanding this, it will be really great.
{ "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/40958/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40958/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/40957
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40957/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40957/comments
https://api.github.com/repos/huggingface/transformers/issues/40957/events
https://github.com/huggingface/transformers/issues/40957
3,428,385,272
I_kwDOCUB6oc7MWQH4
40,957
Incomplete tool call arguments in HuggingFaceTB/SmolLM3-3B streaming output
{ "login": "dvn8weil", "id": 190058927, "node_id": "U_kgDOC1QRrw", "avatar_url": "https://avatars.githubusercontent.com/u/190058927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dvn8weil", "html_url": "https://github.com/dvn8weil", "followers_url": "https://api.github.com/users/dvn8weil/followers", "following_url": "https://api.github.com/users/dvn8weil/following{/other_user}", "gists_url": "https://api.github.com/users/dvn8weil/gists{/gist_id}", "starred_url": "https://api.github.com/users/dvn8weil/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dvn8weil/subscriptions", "organizations_url": "https://api.github.com/users/dvn8weil/orgs", "repos_url": "https://api.github.com/users/dvn8weil/repos", "events_url": "https://api.github.com/users/dvn8weil/events{/privacy}", "received_events_url": "https://api.github.com/users/dvn8weil/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-18T02:21:08
2025-10-26T08:02:14
2025-10-26T08:02:14
NONE
null
null
null
null
### System Info - `transformers` version: 4.53.3 - Platform: Linux-6.14.0-1014-gcp-x86_64-with-glibc2.39 - Python version: 3.12.3 - Huggingface_hub version: 0.34.4 - Safetensors version: 0.6.2 - Accelerate version: not installed - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (accelerator?): 2.7.1+cu126 (CUDA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: No - Using GPU in script?: No - GPU type: NVIDIA L4 ### 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 vllm setup : ``` vllm serve HuggingFaceTB/SmolLM3-3B \ --enable-auto-tool-choice \ --tool-call-parser=hermes --reasoning-parser=qwen3 ``` request as cURL : ``` curl --location 'http://0.0.0.0:8000/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer EMPTY' \ --data '{ "model": "HuggingFaceTB/SmolLM3-3B", "messages": [ { "role": "system", "content": "You are a concise assistant that helps with tools." }, { "role": "user", "content": "Tell me about Indian Democracy origin and then Can you add 23 and 51, and multiply 29 and 89" } ], "enable_thinking": false, "chat_template_kwargs": { "enable_thinking": false }, "stream" : true, "tools": [ { "type": "function", "function": { "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "unit": { "type": "string", "enum": [ "celsius", "fahrenheit" ] } }, "required": [ "location" ] } } }, { "type": "function", "function": { "name": "add", "description": "adds two numbers\n", "parameters": { "type": "object", "properties": { "x": { "type": "number", "description": "" }, "y": { "type": "number", "description": "" } }, "required": [ "x", "y" ] } } }, { "type": "function", "function": { "name": "multiply", "description": "multiply two numbers\n", "parameters": { "type": "object", "properties": { "x": { "type": "number", "description": "" }, "y": { "type": "number", "description": "" } }, "required": [ "x", "y" ] } } } ], "tool_choice": "auto" }' ``` ### Expected behavior Output is : ``` data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"content":null},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"id":"chatcmpl-tool-acf94c2655364429b96d82af14949d67","type":"function","index":0,"function":{"name":"get_current_weather"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"location\": \""}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"New"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Delhi"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\","}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" \""}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"unit"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" \""}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"c"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"elsius"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"id":"chatcmpl-tool-94268bea54114b139426a9d2c62b6bec","type":"function","index":1,"function":{"name":"add"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"x\":"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":" "}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"51"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"id":"chatcmpl-tool-6146714702e44bd4afbe37d822332fc9","type":"function","index":2,"function":{"name":"multiply"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":"{\"x\":"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":" "}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":"89"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"tool_calls","stop_reason":null}]} data: [DONE] ``` The tool calls are incomplete , i.e. for tool calls that require two arguments, only one is provided. For instance, this is the multiple tool call part of the output : ``` data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"id":"chatcmpl-tool-6146714702e44bd4afbe37d822332fc9","type":"function","index":2,"function":{"name":"multiply"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":"{\"x\":"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":" "}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":"89"}}]},"logprobs":null,"finish_reason":null}]} data: {"id":"chatcmpl-2eaecc77b750452fb0a1f326d07334b5","object":"chat.completion.chunk","created":1758130251,"model":"HuggingFaceTB/SmolLM3-3B","choices":[{"index":0,"delta":{"tool_calls":[{"index":2,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}]} ``` i.e. the tool call output is `multiply {x: 89}` , when it also needs the `y` parameter value
{ "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/40957/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40957/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/40956
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40956/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40956/comments
https://api.github.com/repos/huggingface/transformers/issues/40956/events
https://github.com/huggingface/transformers/pull/40956
3,428,270,035
PR_kwDOCUB6oc6pLk4y
40,956
Fix Issue #39030: AutoTokenizer.from_pretrained does not propagate token
{ "login": "brandenkmurray", "id": 8684326, "node_id": "MDQ6VXNlcjg2ODQzMjY=", "avatar_url": "https://avatars.githubusercontent.com/u/8684326?v=4", "gravatar_id": "", "url": "https://api.github.com/users/brandenkmurray", "html_url": "https://github.com/brandenkmurray", "followers_url": "https://api.github.com/users/brandenkmurray/followers", "following_url": "https://api.github.com/users/brandenkmurray/following{/other_user}", "gists_url": "https://api.github.com/users/brandenkmurray/gists{/gist_id}", "starred_url": "https://api.github.com/users/brandenkmurray/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brandenkmurray/subscriptions", "organizations_url": "https://api.github.com/users/brandenkmurray/orgs", "repos_url": "https://api.github.com/users/brandenkmurray/repos", "events_url": "https://api.github.com/users/brandenkmurray/events{/privacy}", "received_events_url": "https://api.github.com/users/brandenkmurray/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-18T01:19:27
2025-09-18T14:36:52
2025-09-18T13:22:20
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40956", "html_url": "https://github.com/huggingface/transformers/pull/40956", "diff_url": "https://github.com/huggingface/transformers/pull/40956.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40956.patch", "merged_at": "2025-09-18T13:22:20" }
# What does this PR do? Fixes #39030. Propagates token through `list_repo_templates` to `list_repo_tree`. ## Who can review? @ArthurZucker @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/40956/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40956/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40955
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40955/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40955/comments
https://api.github.com/repos/huggingface/transformers/issues/40955/events
https://github.com/huggingface/transformers/pull/40955
3,428,096,370
PR_kwDOCUB6oc6pK-3n
40,955
Fix more dates in model cards and wrong modalities in _toctree.yml
{ "login": "yonigozlan", "id": 74535834, "node_id": "MDQ6VXNlcjc0NTM1ODM0", "avatar_url": "https://avatars.githubusercontent.com/u/74535834?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yonigozlan", "html_url": "https://github.com/yonigozlan", "followers_url": "https://api.github.com/users/yonigozlan/followers", "following_url": "https://api.github.com/users/yonigozlan/following{/other_user}", "gists_url": "https://api.github.com/users/yonigozlan/gists{/gist_id}", "starred_url": "https://api.github.com/users/yonigozlan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yonigozlan/subscriptions", "organizations_url": "https://api.github.com/users/yonigozlan/orgs", "repos_url": "https://api.github.com/users/yonigozlan/repos", "events_url": "https://api.github.com/users/yonigozlan/events{/privacy}", "received_events_url": "https://api.github.com/users/yonigozlan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T23:46:00
2025-09-19T13:47:28
2025-09-19T13:47:28
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40955", "html_url": "https://github.com/huggingface/transformers/pull/40955", "diff_url": "https://github.com/huggingface/transformers/pull/40955.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40955.patch", "merged_at": "2025-09-19T13:47:28" }
Missed a few in my previous PR. Also some models were in the wrong modalities in `_toctree.yml`
{ "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/40955/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40955/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40954
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40954/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40954/comments
https://api.github.com/repos/huggingface/transformers/issues/40954/events
https://github.com/huggingface/transformers/pull/40954
3,427,969,782
PR_kwDOCUB6oc6pKjXj
40,954
Fix Issue #40913: Respect user-provided chat_template parameter in processor creation
{ "login": "qizwiz", "id": 211900, "node_id": "MDQ6VXNlcjIxMTkwMA==", "avatar_url": "https://avatars.githubusercontent.com/u/211900?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qizwiz", "html_url": "https://github.com/qizwiz", "followers_url": "https://api.github.com/users/qizwiz/followers", "following_url": "https://api.github.com/users/qizwiz/following{/other_user}", "gists_url": "https://api.github.com/users/qizwiz/gists{/gist_id}", "starred_url": "https://api.github.com/users/qizwiz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qizwiz/subscriptions", "organizations_url": "https://api.github.com/users/qizwiz/orgs", "repos_url": "https://api.github.com/users/qizwiz/repos", "events_url": "https://api.github.com/users/qizwiz/events{/privacy}", "received_events_url": "https://api.github.com/users/qizwiz/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-09-17T22:25:37
2025-09-18T08:32:09
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40954", "html_url": "https://github.com/huggingface/transformers/pull/40954", "diff_url": "https://github.com/huggingface/transformers/pull/40954.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40954.patch", "merged_at": null }
This PR fixes a bug where user-provided `chat_template` parameters were being overwritten by model defaults when creating a processor. The fix ensures that user-provided values take precedence over model defaults. Fixes #40913 ## Problem When creating a processor with a user-provided `chat_template` parameter, the value was being overwritten by the model's default chat template. This prevented users from customizing the chat template as intended. **Reproduction:** ```python from transformers import AutoProcessor processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-3B-Instruct", chat_template="test") print(processor.chat_template) # Should print "test" but prints the default template ``` ## Root Cause In `src/transformers/processing_utils.py` line 1086, the code was unconditionally setting: ```python if chat_templates: kwargs["chat_template"] = chat_templates ``` This overwrote any user-provided `chat_template` parameter. ## Solution The fix modifies the condition to only set the chat template from model files if no user-provided value exists: ```python if chat_templates and "chat_template" not in kwargs: kwargs["chat_template"] = chat_templates ``` This ensures that: 1. User-provided `chat_template` values take precedence 2. Model defaults are still used when no user value is provided 3. Backward compatibility is maintained ## Testing Added a test case that verifies: 1. User-provided chat_template values are preserved 2. Model defaults are used when no user value is provided ## Impact This is a backward-compatible bug fix that allows users to override chat templates as expected when loading processors.
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/40954/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40954/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/40953
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40953/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40953/comments
https://api.github.com/repos/huggingface/transformers/issues/40953/events
https://github.com/huggingface/transformers/issues/40953
3,427,895,973
I_kwDOCUB6oc7MUYql
40,953
gpt-oss-120b inference failed running on 16 GPUs, single node and with tp_plan="auto"
{ "login": "yuanhangsu1986", "id": 185134695, "node_id": "U_kgDOCwjuZw", "avatar_url": "https://avatars.githubusercontent.com/u/185134695?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yuanhangsu1986", "html_url": "https://github.com/yuanhangsu1986", "followers_url": "https://api.github.com/users/yuanhangsu1986/followers", "following_url": "https://api.github.com/users/yuanhangsu1986/following{/other_user}", "gists_url": "https://api.github.com/users/yuanhangsu1986/gists{/gist_id}", "starred_url": "https://api.github.com/users/yuanhangsu1986/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yuanhangsu1986/subscriptions", "organizations_url": "https://api.github.com/users/yuanhangsu1986/orgs", "repos_url": "https://api.github.com/users/yuanhangsu1986/repos", "events_url": "https://api.github.com/users/yuanhangsu1986/events{/privacy}", "received_events_url": "https://api.github.com/users/yuanhangsu1986/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T21:50:58
2025-10-26T08:02:15
2025-10-26T08:02:15
NONE
null
null
null
null
### System Info - `transformers` version: 4.57.0.dev0 - Platform: Linux-5.4.0-80-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.34.5 - Safetensors version: 0.5.3 - Accelerate version: 1.6.0 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (accelerator?): 2.6.0+cu124 (CUDA) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: <fill in> - Using GPU in script?: <fill in> - GPU type: Tesla V100-SXM3-32GB-H ### Who can help? @SunMarc @zucchini-nlp @vasqu @ArthurZucker @Cyrilvallez Running inference with TP with gpt-oss-120b model on a node with 16 GPUs. Got the following error in the cross attention layer: ``` [rank0]: File "/usr/local/lib/python3.10/dist-packages/transformers/models/gpt_oss/modeling_gpt_oss.py", line 314, in forward [rank0]: key_states = self.k_proj(hidden_states).view(hidden_shape).transpose(1, 2) [rank0]: RuntimeError: shape '[1, 89, -1, 64]' is invalid for input of size 2848 ``` It seems the projected tensor shape, which is 2848, is less than the minimum allowed by the hidden_shape. This happens due to the TP partitioning of the projection matrix. I'm wandering if changing the self.head_dim from 64 to 32 is a possible solution to this? In other words, pseudo-code: ``` k_proj = self.k_proj(hidden_states) if torch.numel(k_proj) < math.prod((*input_shape, 1, self.head_dim)): head_dim = self.head_dim / math.prod((*input_shape, 1, self.head_dim)) * torch.numel(k_proj) ... ``` One thing to note that is the GPUs we used is v100, which is why we need that many GPUs to run gpt-oss-120b. [Here ](https://huggingface.co/openai/gpt-oss-20b/discussions/61) is the official fix for running gpt-oss on older GPUs. ### 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 To reproduce: - python code gpt-oss-120b.py ``` import torch from transformers import AutoModelForCausalLM, AutoTokenizer, Mxfp4Config tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-120b") quantization_config = Mxfp4Config(dequantize=False) model_kwargs = dict(attn_implementation="eager", dtype=torch.bfloat16, use_cache=True, tp_plan="auto", quantization_config=quantization_config) model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-120b", **model_kwargs).cuda() SYSTEM_PROMPT = f"Please answer the following question in English." USER_PROMPT = "What is the capital of Australia?" messages = [ {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": USER_PROMPT}, ] input_ids = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt", ).to(model.device) gen_kwargs = {"max_new_tokens": 512, "do_sample": True, "temperature": 0.6, "top_p": None, "top_k": None} output_ids = model.generate(input_ids, **gen_kwargs) response = tokenizer.batch_decode(output_ids)[0] print(response) ``` - Launch job with torchrun ``` torchrun --nproc-per-node 16 gpt-oss-120b.py ``` ### Expected behavior Should run without error
{ "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/40953/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40953/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/40952
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40952/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40952/comments
https://api.github.com/repos/huggingface/transformers/issues/40952/events
https://github.com/huggingface/transformers/issues/40952
3,427,769,404
I_kwDOCUB6oc7MT5w8
40,952
InstructBLIP requiring eager attention specified to work properly
{ "login": "nhatkhtn", "id": 61368343, "node_id": "MDQ6VXNlcjYxMzY4MzQz", "avatar_url": "https://avatars.githubusercontent.com/u/61368343?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nhatkhtn", "html_url": "https://github.com/nhatkhtn", "followers_url": "https://api.github.com/users/nhatkhtn/followers", "following_url": "https://api.github.com/users/nhatkhtn/following{/other_user}", "gists_url": "https://api.github.com/users/nhatkhtn/gists{/gist_id}", "starred_url": "https://api.github.com/users/nhatkhtn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nhatkhtn/subscriptions", "organizations_url": "https://api.github.com/users/nhatkhtn/orgs", "repos_url": "https://api.github.com/users/nhatkhtn/repos", "events_url": "https://api.github.com/users/nhatkhtn/events{/privacy}", "received_events_url": "https://api.github.com/users/nhatkhtn/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-09-17T20:53:15
2025-09-19T08:45:39
2025-09-19T08:45:39
NONE
null
null
null
null
### System Info The model `instructblip-vicuna-7b` gives wildly different results when specifying `attn_implementation='eager'` and not specifying anything. Furthermore, when specifying eager attention, the model seems to work correctly, while not specifying gives valid but noticeably worse results. For example, when captioning a COCO image: - Running with specifying eager: "The image features a giraffe standing near a tree, with its reflection visible in the water. The giraffe is positioned in the center of the scene, with its head and neck stretched upwards towards the tree. There are several trees scattered throughout the scene, with one tree located on the left side of the image and another on the right side. The water body is located near the giraffe, with its reflection visible in the water. The overall scene appears to be a peaceful and serene setting, with the giraffe standing tall and majestic amidst the trees and water" - Running without specifying eager: "a reflection of a tree in a lake with a blue sky and clouds" System info: - `transformers` version: 4.52.4 - Platform: Linux-5.14.0-503.40.1.el9_5.x86_64-x86_64-with-glibc2.34 - Python version: 3.12.11 - Huggingface_hub version: 0.33.0 - Safetensors version: 0.5.3 - Accelerate version: 1.7.0 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (GPU?): 2.7.1+cu128 (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 B200 ### Who can help? @zucchini-nlp ### Information - [ ] The official example scripts - [x] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [x] My own task or dataset (give details below) ### Reproduction Run the following code, with and without the `attn_implementation="eager",` line ``` import requests import torch from PIL import Image from transformers import InstructBlipProcessor, InstructBlipForConditionalGeneration device = "cuda" model = InstructBlipForConditionalGeneration.from_pretrained( "Salesforce/instructblip-vicuna-7b", attn_implementation="eager", ).to(device) processor = InstructBlipProcessor.from_pretrained("Salesforce/instructblip-vicuna-7b") url1 = "http://images.cocodataset.org/val2014/COCO_val2014_000000030925.jpg" image1 = Image.open(requests.get(url1, stream=True).raw).convert("RGB") prompt = "Please help me describe the image in detail." inputs = processor(images=image1, text=prompt, return_tensors="pt", padding=True).to(device) with torch.inference_mode(): outputs = model.generate( **inputs, max_length=256, ) texts = processor.batch_decode(outputs, skip_special_tokens=True) texts ``` ### Expected behavior Since InstructBLIP does not support any attention implementation other than eager, the output when specifying attn_implementation='eager' and when not specifying anything should be the same.
{ "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/40952/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40952/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/40951
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40951/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40951/comments
https://api.github.com/repos/huggingface/transformers/issues/40951/events
https://github.com/huggingface/transformers/pull/40951
3,427,713,267
PR_kwDOCUB6oc6pJrR_
40,951
fix(timm): Catch 'Unknown model' RuntimeError in the Gemma 3n MobileNetV5 vision encoder
{ "login": "harshaljanjani", "id": 75426551, "node_id": "MDQ6VXNlcjc1NDI2NTUx", "avatar_url": "https://avatars.githubusercontent.com/u/75426551?v=4", "gravatar_id": "", "url": "https://api.github.com/users/harshaljanjani", "html_url": "https://github.com/harshaljanjani", "followers_url": "https://api.github.com/users/harshaljanjani/followers", "following_url": "https://api.github.com/users/harshaljanjani/following{/other_user}", "gists_url": "https://api.github.com/users/harshaljanjani/gists{/gist_id}", "starred_url": "https://api.github.com/users/harshaljanjani/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/harshaljanjani/subscriptions", "organizations_url": "https://api.github.com/users/harshaljanjani/orgs", "repos_url": "https://api.github.com/users/harshaljanjani/repos", "events_url": "https://api.github.com/users/harshaljanjani/events{/privacy}", "received_events_url": "https://api.github.com/users/harshaljanjani/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T20:29:13
2025-09-18T13:15:08
2025-09-18T13:09:09
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40951", "html_url": "https://github.com/huggingface/transformers/pull/40951", "diff_url": "https://github.com/huggingface/transformers/pull/40951.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40951.patch", "merged_at": "2025-09-18T13:09:08" }
A first time contributor to HF here! ## What does this PR do? - Fixes a `RuntimeError` that occurs when loading the Gemma 3n model with an outdated version of the `timm` library; it's caused by the absence of the required `mobilenetv5_300m_enc` vision model in older `timm` versions. - The newer error explicitly tells the user that the vision model for Gemma 3n is missing and provides them with the exact command to upgrade timm to a compatible version, resolving the issue. Closes #39208. cc: @ArthurZucker @qubvel ## 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] 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).
{ "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/40951/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40951/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40950
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40950/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40950/comments
https://api.github.com/repos/huggingface/transformers/issues/40950/events
https://github.com/huggingface/transformers/pull/40950
3,427,500,070
PR_kwDOCUB6oc6pI8n3
40,950
Deprecate Trackio environment variables and deploy to Spaces by default
{ "login": "qgallouedec", "id": 45557362, "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qgallouedec", "html_url": "https://github.com/qgallouedec", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "repos_url": "https://api.github.com/users/qgallouedec/repos", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T19:14:45
2025-10-27T23:13:27
2025-10-02T10:37:55
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40950", "html_url": "https://github.com/huggingface/transformers/pull/40950", "diff_url": "https://github.com/huggingface/transformers/pull/40950.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40950.patch", "merged_at": "2025-10-02T10:37:55" }
This PR - Deploys Trackio by default (instead of keeping local). See internal discussion here https://huggingface.slack.com/archives/C08SW1X12C8/p1758056496519289?thread_ts=1757706409.065919&cid=C08SW1X12C8 and - Drops environment variables in favour of explicit args. See https://github.com/gradio-app/trackio/pull/212#pullrequestreview-3234300545 ```diff - import os import numpy as np from datasets import Dataset from transformers import Trainer, AutoModelForCausalLM, TrainingArguments - os.environ["TRACKIO_PROJECT"] = "my-awesome-project" - os.environ["TRACKIO_SPACE_ID"] = "my-awesome-username/my-awesome-space" # Create a fake dataset data = np.random.randint(0, 1000, (8192, 64)).tolist() dataset = Dataset.from_dict({"input_ids": data, "labels": data}) # Train a model using the Trainer API trainer = Trainer( model=AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B"), - args=TrainingArguments(run_name="Qwen3-0.6B-training", report_to="trackio"), + args=TrainingArguments(run_name="Qwen3-0.6B-training", report_to="trackio", project="my-awesome-project", trackio_space_id="my-awesome-username/my-awesome-space"), train_dataset=dataset, ) trainer.train() ```
{ "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/40950/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40950/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40949
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40949/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40949/comments
https://api.github.com/repos/huggingface/transformers/issues/40949/events
https://github.com/huggingface/transformers/pull/40949
3,427,413,909
PR_kwDOCUB6oc6pIprV
40,949
Update expected values for some `test_speculative_generation`
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T18:47:30
2025-09-17T18:56:40
2025-09-17T18:50:38
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40949", "html_url": "https://github.com/huggingface/transformers/pull/40949", "diff_url": "https://github.com/huggingface/transformers/pull/40949.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40949.patch", "merged_at": "2025-09-17T18:50:38" }
# What does this PR do? These tests are failing after #40657. As discussed offline [here](https://huggingface.slack.com/archives/C01NE71C4F7/p1758117410373159?thread_ts=1758031736.841469&cid=C01NE71C4F7), it's expected TL:DR > The logits are updated due to changes in assistant temperature, as we move from implicit T=1 to explicit calibrated defaults. Details > turns out the PR inadvertently changed an implicit algorithmic bias: candidate_generator (the assistant model) was getting logits_processor while the decoding method (main model) was getting prepared_logits_processor. This meant that the assistant was running with T=1 while the main model was using lower temp. We investigated and its good for speculation to have a hotter assistant model (so it was a good bug that we were not applying the lower temp to the assistant), But it should be explicitly set and not a hidden argument forwarding consequence. So its correct as is for now, and in the future we will bring better defaults for assisted generation, after benchmarking a little more. <img width="904" height="575" alt="image" src="https://github.com/user-attachments/assets/b4e329ea-9b23-4629-8bba-2d1515a73289" />
{ "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/40949/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40949/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40948
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40948/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40948/comments
https://api.github.com/repos/huggingface/transformers/issues/40948/events
https://github.com/huggingface/transformers/pull/40948
3,427,385,878
PR_kwDOCUB6oc6pIjYp
40,948
Allow private Space id for Trackio
{ "login": "qgallouedec", "id": 45557362, "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qgallouedec", "html_url": "https://github.com/qgallouedec", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "repos_url": "https://api.github.com/users/qgallouedec/repos", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T18:39:46
2025-10-02T10:38:28
2025-10-02T10:38:25
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40948", "html_url": "https://github.com/huggingface/transformers/pull/40948", "diff_url": "https://github.com/huggingface/transformers/pull/40948.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40948.patch", "merged_at": "2025-10-02T10:38:25" }
requires https://github.com/gradio-app/trackio/pull/236
{ "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/40948/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40948/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40947
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40947/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40947/comments
https://api.github.com/repos/huggingface/transformers/issues/40947/events
https://github.com/huggingface/transformers/pull/40947
3,427,006,084
PR_kwDOCUB6oc6pHRSZ
40,947
Fix `Glm4vModelTest::test_eager_matches_fa2_generate`
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T16:31:31
2025-09-17T17:54:01
2025-09-17T17:54:00
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40947", "html_url": "https://github.com/huggingface/transformers/pull/40947", "diff_url": "https://github.com/huggingface/transformers/pull/40947.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40947.patch", "merged_at": "2025-09-17T17:54:00" }
# What does this PR do? This test is failing on GPU due to > FAILED tests/models/glm4v/test_modeling_glm4v.py::Glm4vModelTest::test_eager_matches_fa2_generate - RuntimeError: cu_seqlens_q must be on CUDA see [here](https://github.com/huggingface/transformers/actions/runs/17784986682/job/50551078682) We need to change from > "image_grid_thw": torch.tensor([[1, patches_per_side, patches_per_side]] * self.batch_size), to > "image_grid_thw": torch.tensor([[1, patches_per_side, patches_per_side]] * self.batch_size, device=torch_device),it
{ "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/40947/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40947/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40946
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40946/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40946/comments
https://api.github.com/repos/huggingface/transformers/issues/40946/events
https://github.com/huggingface/transformers/issues/40946
3,426,997,724
I_kwDOCUB6oc7MQ9Xc
40,946
Docs (zh-hans): Revert certain terms to English for clarity and professional consistency
{ "login": "Ri-Nai", "id": 72967260, "node_id": "MDQ6VXNlcjcyOTY3MjYw", "avatar_url": "https://avatars.githubusercontent.com/u/72967260?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Ri-Nai", "html_url": "https://github.com/Ri-Nai", "followers_url": "https://api.github.com/users/Ri-Nai/followers", "following_url": "https://api.github.com/users/Ri-Nai/following{/other_user}", "gists_url": "https://api.github.com/users/Ri-Nai/gists{/gist_id}", "starred_url": "https://api.github.com/users/Ri-Nai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Ri-Nai/subscriptions", "organizations_url": "https://api.github.com/users/Ri-Nai/orgs", "repos_url": "https://api.github.com/users/Ri-Nai/repos", "events_url": "https://api.github.com/users/Ri-Nai/events{/privacy}", "received_events_url": "https://api.github.com/users/Ri-Nai/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T16:28:40
2025-10-26T08:02:17
2025-10-26T08:02:17
CONTRIBUTOR
null
null
null
null
Hello Hugging Face Team, First of all, thank you for the great work on the `transformers` library and for providing multi-language documentation. I am writing to suggest some improvements for the Simplified Chinese README file (`i18n/README_zh-hans.md`). As a Chinese-speaking user, I believe that reverting a few specific translated terms back to their original English form would significantly improve the document's professionalism and readability for the target audience (Chinese developers). **The Core Problem:** Certain terms are either translated into an overly informal nickname or into a Chinese phrase that is less common in a technical context than the English original. This can lead to ambiguity and a less professional tone. **Specific Suggestions:** I propose the following changes: | Current Translation (原文) | Suggested Change (建议修改为) | Justification (理由) | | :--- | :--- | :--- | | `抱抱脸` | `Hugging Face` | While "抱抱脸" is a cute and friendly nickname, Chinese developers almost exclusively refer to the company and project as "Hugging Face". Using the official English name in technical documentation is more professional and aligns with community usage. | | `流水线` (or other translations) | `pipeline` | The term `pipeline` is a core concept in the library. Chinese developers are very familiar with the English term. Translating it to "流水线" (assembly line) can sometimes be awkward or less precise than simply using the original term `pipeline`, which is common practice for key technical terms in Chinese documentation. | **Why this is an improvement:** 1. **Clarity:** Using the original English for core concepts and names avoids any potential translation ambiguity. 2. **Professionalism:** It aligns the documentation with how these terms are actually used in technical discussions, tutorials, and code within the Chinese developer community. 3. **Consistency:** It maintains consistency with the code itself, where developers will encounter `pipeline`, not `流水线`. I would be happy to open a Pull Request to apply these changes if this proposal is accepted. Thank you for your consideration
{ "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/40946/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40946/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/40945
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40945/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40945/comments
https://api.github.com/repos/huggingface/transformers/issues/40945/events
https://github.com/huggingface/transformers/pull/40945
3,426,983,086
PR_kwDOCUB6oc6pHMQT
40,945
[tests] Really use small models in all fast tests
{ "login": "Cyrilvallez", "id": 71554963, "node_id": "MDQ6VXNlcjcxNTU0OTYz", "avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Cyrilvallez", "html_url": "https://github.com/Cyrilvallez", "followers_url": "https://api.github.com/users/Cyrilvallez/followers", "following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}", "gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}", "starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions", "organizations_url": "https://api.github.com/users/Cyrilvallez/orgs", "repos_url": "https://api.github.com/users/Cyrilvallez/repos", "events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}", "received_events_url": "https://api.github.com/users/Cyrilvallez/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T16:24:00
2025-09-18T17:51:09
2025-09-18T13:24:13
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40945", "html_url": "https://github.com/huggingface/transformers/pull/40945", "diff_url": "https://github.com/huggingface/transformers/pull/40945.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40945.patch", "merged_at": "2025-09-18T13:24:13" }
Use small models in all tests. Only `timm_backbone` cannot enforce it, because it cannot propagate kwargs. ALL other models should never override this tests, otherwise the CI becomes super slow. cc @ydshieh fir viz!
{ "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/40945/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40945/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40944
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40944/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40944/comments
https://api.github.com/repos/huggingface/transformers/issues/40944/events
https://github.com/huggingface/transformers/pull/40944
3,426,969,597
PR_kwDOCUB6oc6pHJUw
40,944
add more activation kernels, follow up
{ "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-09-17T16:19:53
2025-10-02T06:45:07
2025-10-02T06:45:05
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40944", "html_url": "https://github.com/huggingface/transformers/pull/40944", "diff_url": "https://github.com/huggingface/transformers/pull/40944.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40944.patch", "merged_at": "2025-10-02T06:45:05" }
# What does this PR do? Follow up to add more activation kernels to https://github.com/huggingface/transformers/pull/40890 <img width="1918" height="756" alt="image" src="https://github.com/user-attachments/assets/51acd3ae-5328-45bc-8533-9cf275e8a9ab" />
{ "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/40944/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40944/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40943
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40943/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40943/comments
https://api.github.com/repos/huggingface/transformers/issues/40943/events
https://github.com/huggingface/transformers/pull/40943
3,426,965,946
PR_kwDOCUB6oc6pHIjA
40,943
Docs(zh-hans): Refine wording for professionalism in README
{ "login": "Ri-Nai", "id": 72967260, "node_id": "MDQ6VXNlcjcyOTY3MjYw", "avatar_url": "https://avatars.githubusercontent.com/u/72967260?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Ri-Nai", "html_url": "https://github.com/Ri-Nai", "followers_url": "https://api.github.com/users/Ri-Nai/followers", "following_url": "https://api.github.com/users/Ri-Nai/following{/other_user}", "gists_url": "https://api.github.com/users/Ri-Nai/gists{/gist_id}", "starred_url": "https://api.github.com/users/Ri-Nai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Ri-Nai/subscriptions", "organizations_url": "https://api.github.com/users/Ri-Nai/orgs", "repos_url": "https://api.github.com/users/Ri-Nai/repos", "events_url": "https://api.github.com/users/Ri-Nai/events{/privacy}", "received_events_url": "https://api.github.com/users/Ri-Nai/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T16:18:34
2025-10-20T15:39:49
2025-10-20T15:39:49
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40943", "html_url": "https://github.com/huggingface/transformers/pull/40943", "diff_url": "https://github.com/huggingface/transformers/pull/40943.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40943.patch", "merged_at": "2025-10-20T15:39:49" }
# What does this PR do? This PR improves the localization quality of the Simplified Chinese README (`README_zh-hans.md`) by replacing a colloquial term with more professional vocabulary. Specifically, the informal term `魔改` (mó gǎi), which is a slang for "heavy modification," has been replaced with the standard and formal term `修改` (xiū gǎi), meaning "to modify." This subtle but important change enhances the document's professionalism and ensures the language is accessible and appropriate for a broad technical audience. <!-- Remove if not applicable --> <!-- This is a minor documentation improvement, so no associated issue is required. --> ## Before submitting - [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] 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
{ "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/40943/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40943/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40942
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40942/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40942/comments
https://api.github.com/repos/huggingface/transformers/issues/40942/events
https://github.com/huggingface/transformers/pull/40942
3,426,891,778
PR_kwDOCUB6oc6pG4tT
40,942
Raise error instead of warning when using meta device in from_pretrained
{ "login": "Cyrilvallez", "id": 71554963, "node_id": "MDQ6VXNlcjcxNTU0OTYz", "avatar_url": "https://avatars.githubusercontent.com/u/71554963?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Cyrilvallez", "html_url": "https://github.com/Cyrilvallez", "followers_url": "https://api.github.com/users/Cyrilvallez/followers", "following_url": "https://api.github.com/users/Cyrilvallez/following{/other_user}", "gists_url": "https://api.github.com/users/Cyrilvallez/gists{/gist_id}", "starred_url": "https://api.github.com/users/Cyrilvallez/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Cyrilvallez/subscriptions", "organizations_url": "https://api.github.com/users/Cyrilvallez/orgs", "repos_url": "https://api.github.com/users/Cyrilvallez/repos", "events_url": "https://api.github.com/users/Cyrilvallez/events{/privacy}", "received_events_url": "https://api.github.com/users/Cyrilvallez/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T15:54:41
2025-09-17T16:23:39
2025-09-17T16:23:37
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40942", "html_url": "https://github.com/huggingface/transformers/pull/40942", "diff_url": "https://github.com/huggingface/transformers/pull/40942.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40942.patch", "merged_at": "2025-09-17T16:23:37" }
# What does this PR do? As per the title
{ "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/40942/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40942/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/40941
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/40941/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/40941/comments
https://api.github.com/repos/huggingface/transformers/issues/40941/events
https://github.com/huggingface/transformers/pull/40941
3,426,717,786
PR_kwDOCUB6oc6pGSlq
40,941
docs(i18n): Correct the descriptive text in the README_zh-hans.md
{ "login": "lilin-1", "id": 177207022, "node_id": "U_kgDOCo_27g", "avatar_url": "https://avatars.githubusercontent.com/u/177207022?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lilin-1", "html_url": "https://github.com/lilin-1", "followers_url": "https://api.github.com/users/lilin-1/followers", "following_url": "https://api.github.com/users/lilin-1/following{/other_user}", "gists_url": "https://api.github.com/users/lilin-1/gists{/gist_id}", "starred_url": "https://api.github.com/users/lilin-1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lilin-1/subscriptions", "organizations_url": "https://api.github.com/users/lilin-1/orgs", "repos_url": "https://api.github.com/users/lilin-1/repos", "events_url": "https://api.github.com/users/lilin-1/events{/privacy}", "received_events_url": "https://api.github.com/users/lilin-1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-09-17T15:07:26
2025-09-17T15:48:38
2025-09-17T15:48:38
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/40941", "html_url": "https://github.com/huggingface/transformers/pull/40941", "diff_url": "https://github.com/huggingface/transformers/pull/40941.diff", "patch_url": "https://github.com/huggingface/transformers/pull/40941.patch", "merged_at": "2025-09-17T15:48:38" }
# What does this PR do? This PR corrects an incomplete Simplified Chinese description in the documentation by adding the missing term **"函数库" (library)**. The change ensures consistency with the Traditional Chinese version and fixes grammatical/semantic ambiguities. ### Background & Motivation The original Simplified Chinese text was incomplete, lacking a clear object to clarify the subject of the description. The corresponding **Traditional Chinese reference text** (which serves as the consistency baseline) includes the term `為 Jax、PyTorch 以及 TensorFlow 打造的先進自然語言處理函式庫` (where "函式庫" = Traditional Chinese for "library"). ### Change Details | Text Type | Original (Incomplete) | Corrected (Complete) | |---------------------|-------------------------|------------------------| | Simplified Chinese | `为 Jax、PyTorch 和 TensorFlow 打造的先进的自然语言处理` | `为 Jax、PyTorch 和 TensorFlow 打造的先进的自然语言处理函数库` | ### Key Improvements 1. **Cross-Chinese Variant Consistency**: Aligns Simplified Chinese with Traditional Chinese by matching the core term "函数库" (Simplified) ↔ "函式庫" (Traditional), eliminating translation discrepancies. 2. **Grammatical Completeness**: Fixes the original sentence’s lack of an object (the original phrase "打造的先进的自然语言处理" failed to specify *what* is "built" for the frameworks). 3. **Semantic Clarity**: Explicitly confirms the subject is an **NLP library** (not vague "NLP technology"), fully aligning with the original description’s intent. No dependencies are required for this change. <!-- Remove if not applicable --> Fixes #N/A (No corresponding issue; this is a direct documentation accuracy improvement) ## 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. *Note: Not applicable—this change addresses a direct documentation inconsistency found during review, with no prior discussion needed.* - [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). *Update made: Modified the Simplified Chinese README’s descriptive text to include "函数库".* - [ ] Did you write any new necessary tests? *Note: Not applicable—this is a documentation-only change that does not impact code logic or functionality.* ## 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 @ --> @stevhliu *(Per the template guidelines, tagged the documentation-focused reviewer for Chinese docs accuracy checks.)*
{ "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/40941/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/40941/timeline
null
null
null
null
true
true