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/38224
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38224/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38224/comments
https://api.github.com/repos/huggingface/transformers/issues/38224/events
https://github.com/huggingface/transformers/issues/38224
3,076,487,433
I_kwDOCUB6oc63X3kJ
38,224
YaRN: factor is not effective with original_max_position_embeddings
{ "login": "jklj077", "id": 17811943, "node_id": "MDQ6VXNlcjE3ODExOTQz", "avatar_url": "https://avatars.githubusercontent.com/u/17811943?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jklj077", "html_url": "https://github.com/jklj077", "followers_url": "https://api.github.com/users/jklj077/followers", "following_url": "https://api.github.com/users/jklj077/following{/other_user}", "gists_url": "https://api.github.com/users/jklj077/gists{/gist_id}", "starred_url": "https://api.github.com/users/jklj077/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jklj077/subscriptions", "organizations_url": "https://api.github.com/users/jklj077/orgs", "repos_url": "https://api.github.com/users/jklj077/repos", "events_url": "https://api.github.com/users/jklj077/events{/privacy}", "received_events_url": "https://api.github.com/users/jklj077/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-20T10:17:29
2025-08-20T14:31:19
2025-08-18T08:04:15
CONTRIBUTOR
null
null
null
null
In the [current implementation](https://github.com/huggingface/transformers/blob/f022bf93220d2c19df68647b4ddcfc5b0e91d011/src/transformers/modeling_rope_utils.py#L251-L267), it appears that the user specified `factor` is not effective when `original_max_position_embeddings` exists, which may lead to unexpected behavior. As the factor is an important parameter in YaRN, we hope it would take effect if the user does set the factor (also maintaining consistency with other frameworks, e.g., text-generation-interface, see <https://github.com/huggingface/text-generation-inference/blob/000e313a92d1ccd0bab326729a551245e0079c9f/server/text_generation_server/layers/rotary.py#L215-L244>). Related: https://github.com/QwenLM/Qwen3/issues/1424
{ "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/38224/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/38224/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/38223
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38223/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38223/comments
https://api.github.com/repos/huggingface/transformers/issues/38223/events
https://github.com/huggingface/transformers/pull/38223
3,076,419,616
PR_kwDOCUB6oc6W3E6c
38,223
[mllama] fix loading and inference
{ "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-05-20T09:56:07
2025-05-20T15:34:56
2025-05-20T15:34:56
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38223", "html_url": "https://github.com/huggingface/transformers/pull/38223", "diff_url": "https://github.com/huggingface/transformers/pull/38223.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38223.patch", "merged_at": "2025-05-20T15:34:55" }
# What does this PR do? Fixes https://github.com/huggingface/transformers/issues/38220, it's a shame we couldn't see it earlier in CI. Probably because mllama isn't available in EU 🥲 We should not repeat keys before calling attn, otherwise it is repeated twice. And remove `base_model_prefix` so the model can load old state dicts by manual remapping
{ "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/38223/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38223/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38222
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38222/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38222/comments
https://api.github.com/repos/huggingface/transformers/issues/38222/events
https://github.com/huggingface/transformers/pull/38222
3,076,401,123
PR_kwDOCUB6oc6W3A22
38,222
Fix Llama4
{ "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-05-20T09:49:20
2025-05-20T14:00:49
2025-05-20T14:00:46
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38222", "html_url": "https://github.com/huggingface/transformers/pull/38222", "diff_url": "https://github.com/huggingface/transformers/pull/38222.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38222.patch", "merged_at": "2025-05-20T14:00:46" }
# What does this PR do? As per the title. It would currently fail with `RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.`, at least when using TP. Unfortunately, flex block mask and generate got broken as well, but this will be solved by the mask refactor. Solving it here would involve a lot of duplicated efforts.
{ "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/38222/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38222/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38221
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38221/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38221/comments
https://api.github.com/repos/huggingface/transformers/issues/38221/events
https://github.com/huggingface/transformers/issues/38221
3,076,174,314
I_kwDOCUB6oc63WrHq
38,221
Llava-next-video got different results after using the new video processor
{ "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 } ]
closed
false
null
[]
null
[]
2025-05-20T08:33:22
2025-05-28T07:41:02
2025-05-28T07:41:02
CONTRIBUTOR
null
null
null
null
### System Info ``` Collecting environment information... PyTorch version: 2.8.0.dev20250519+cpu Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A OS: Ubuntu 22.04.5 LTS (x86_64) GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: Could not collect CMake version: version 4.0.0 Libc version: glibc-2.35 Python version: 3.11.12 (main, Apr 9 2025, 08:55:54) [GCC 11.4.0] (64-bit runtime) Python platform: Linux-6.11.0-21-generic-x86_64-with-glibc2.35 Is CUDA available: False CUDA runtime version: No CUDA CUDA_MODULE_LOADING set to: N/A GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 384 On-line CPU(s) list: 0-383 Vendor ID: GenuineIntel BIOS Vendor ID: Intel(R) Corporation Model name: Intel(R) Xeon(R) 6972P BIOS Model name: Intel(R) Xeon(R) 6972P CPU family: 6 Model: 173 Thread(s) per core: 2 Core(s) per socket: 96 Socket(s): 2 Stepping: 1 CPU max MHz: 3900.0000 CPU min MHz: 800.0000 BogoMIPS: 4800.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nons top_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ca t_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase ts c_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512 cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi vnmi avx512vbmi umi p pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cld emote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flu sh_l1d arch_capabilities Virtualization: VT-x L1d cache: 9 MiB (192 instances) L1i cache: 12 MiB (192 instances) L2 cache: 384 MiB (192 instances) L3 cache: 960 MiB (2 instances) NUMA node(s): 6 NUMA node0 CPU(s): 0-31,192-223 NUMA node1 CPU(s): 32-63,224-255 NUMA node2 CPU(s): 64-95,256-287 NUMA node3 CPU(s): 96-127,288-319 NUMA node4 CPU(s): 128-159,320-351 NUMA node5 CPU(s): 160-191,352-383 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS Not aff ected; BHI BHI_DIS_S Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Versions of relevant libraries: [pip3] galore-torch==1.0 [pip3] numpy==1.26.4 [pip3] onnx==1.17.0 [pip3] onnxruntime==1.21.0 [pip3] optree==0.15.0 [pip3] pytorch-msssim==1.0.0 [pip3] torch==2.8.0.dev20250519+cpu [pip3] torchao==0.11.0+git [pip3] torchaudio==2.6.0.dev20250519+cpu [pip3] torchvision==0.22.0.dev20250519+cpu [pip3] triton==3.3.0 [conda] Could not collect ``` ### Who can help? @zucchini-nlp @SunMarc ### Information - [x] The official example scripts - [ ] My own modified scripts ### Tasks - [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction Official example from [llava-hf/LLaVA-NeXT-Video-7B-hf](https://huggingface.co/llava-hf/LLaVA-NeXT-Video-7B-hf#%F0%9F%9A%80-how-to-use-the-model) ``` import av import torch import numpy as np from huggingface_hub import hf_hub_download from transformers import LlavaNextVideoProcessor, LlavaNextVideoForConditionalGeneration model_id = "llava-hf/LLaVA-NeXT-Video-7B-hf" model = LlavaNextVideoForConditionalGeneration.from_pretrained( model_id, torch_dtype=torch.float16, low_cpu_mem_usage=True, ) processor = LlavaNextVideoProcessor.from_pretrained(model_id) 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]) # 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 total_frames = container.streams.video[0].frames indices = np.arange(0, total_frames, total_frames / 8).astype(int) clip = read_video_pyav(container, indices) inputs_video = processor(text=prompt, videos=clip, padding=True, return_tensors="pt").to(model.device) output = model.generate(**inputs_video, max_new_tokens=100, do_sample=False) print(processor.decode(output[0][2:], skip_special_tokens=True)) ``` ### Expected behavior The output before #35206 ``` ER: Why is this video funny? ASSISTANT: The humor in this video comes from the unexpected and endearing nature of the situation. The baby is wearing glasses and appears to be reading a book, which is a humorous and endearing sight because babies are typically not expected to be able to read at such a young age. The glasses add a touch of whimsy and the baby's expression and actions suggest that they are deeply engrossed in the book, which is a playful and amusing portray ``` The output after #35206 ``` ER: Why is this video funny? ASSISTANT: The humor in this video comes from the unexpected and endearing situation of a young child, who appears to be a baby or toddler, attempting to read a book. The child's small size and the fact that they are reading a book that is too big for them create a comical contrast, as it's not something you would typically see a young child doing. The child's focus and determination to read the book, despite the size, adds to the humor. The ``` @zucchini-nlp Is it meet your expectations? I suppose the PR is just refactoring without changing the behaviour, right?
{ "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 }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38221/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38221/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/38220
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38220/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38220/comments
https://api.github.com/repos/huggingface/transformers/issues/38220/events
https://github.com/huggingface/transformers/issues/38220
3,075,887,644
I_kwDOCUB6oc63VlIc
38,220
mllama model loading failed after refactor
{ "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 } ]
closed
false
null
[]
null
[]
2025-05-20T06:53:14
2025-05-20T15:34:57
2025-05-20T15:34:57
CONTRIBUTOR
null
null
null
null
### System Info ``` Collecting environment information... PyTorch version: 2.8.0.dev20250519+cpu Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A OS: Ubuntu 22.04.5 LTS (x86_64) GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: Could not collect CMake version: version 4.0.0 Libc version: glibc-2.35 Python version: 3.11.12 (main, Apr 9 2025, 08:55:54) [GCC 11.4.0] (64-bit runtime) Python platform: Linux-6.11.0-21-generic-x86_64-with-glibc2.35 Is CUDA available: False CUDA runtime version: No CUDA CUDA_MODULE_LOADING set to: N/A GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 384 On-line CPU(s) list: 0-383 Vendor ID: GenuineIntel BIOS Vendor ID: Intel(R) Corporation Model name: Intel(R) Xeon(R) 6972P BIOS Model name: Intel(R) Xeon(R) 6972P CPU family: 6 Model: 173 Thread(s) per core: 2 Core(s) per socket: 96 Socket(s): 2 Stepping: 1 CPU max MHz: 3900.0000 CPU min MHz: 800.0000 BogoMIPS: 4800.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nons top_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ca t_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase ts c_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512 cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi vnmi avx512vbmi umi p pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cld emote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flu sh_l1d arch_capabilities Virtualization: VT-x L1d cache: 9 MiB (192 instances) L1i cache: 12 MiB (192 instances) L2 cache: 384 MiB (192 instances) L3 cache: 960 MiB (2 instances) NUMA node(s): 6 NUMA node0 CPU(s): 0-31,192-223 NUMA node1 CPU(s): 32-63,224-255 NUMA node2 CPU(s): 64-95,256-287 NUMA node3 CPU(s): 96-127,288-319 NUMA node4 CPU(s): 128-159,320-351 NUMA node5 CPU(s): 160-191,352-383 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS Not aff ected; BHI BHI_DIS_S Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Versions of relevant libraries: [pip3] galore-torch==1.0 [pip3] numpy==1.26.4 [pip3] onnx==1.17.0 [pip3] onnxruntime==1.21.0 [pip3] optree==0.15.0 [pip3] pytorch-msssim==1.0.0 [pip3] torch==2.8.0.dev20250519+cpu [pip3] torchao==0.11.0+git [pip3] torchaudio==2.6.0.dev20250519+cpu [pip3] torchvision==0.22.0.dev20250519+cpu [pip3] triton==3.3.0 [conda] Could not collect ``` ### Who can help? @zucchini-nlp @SunMarc ### Information - [x] The official example scripts - [ ] My own modified scripts ### Tasks - [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction Official example from [meta-llama/Llama-3.2-11B-Vision-Instruct](https://huggingface.co/meta-llama/Llama-3.2-11B-Vision-Instruct) ``` import requests import torch from PIL import Image from transformers import MllamaForConditionalGeneration, AutoProcessor model_id = "meta-llama/Llama-3.2-11B-Vision-Instruct" model = MllamaForConditionalGeneration.from_pretrained( model_id, torch_dtype=torch.bfloat16, device_map="auto", ) processor = AutoProcessor.from_pretrained(model_id) url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg" image = Image.open(requests.get(url, stream=True).raw) messages = [ {"role": "user", "content": [ {"type": "image"}, {"type": "text", "text": "If I had to write a haiku for this one, it would be: "} ]} ] input_text = processor.apply_chat_template(messages, add_generation_prompt=True) inputs = processor( image, input_text, add_special_tokens=False, return_tensors="pt" ).to(model.device) output = model.generate(**inputs, max_new_tokens=30) print(processor.decode(output[0])) ``` ### Expected behavior output before #37033 ``` WARNING:accelerate.utils.modeling:The model weights are not tied. Please use the `tie_weights` method before using the `infer_auto_device` function. <|begin_of_text|><|start_header_id|>user<|end_header_id|> <|image|>If I had to write a haiku for this one, it would be: <|eot_id|><|start_header_id|>assistant<|end_header_id|> Here is a haiku for the image: A rabbit in a coat Stands on a dirt path in front Of a stone house.<|eot_id|> ``` output after #37033 ``` WARNING:accelerate.utils.modeling:The model weights are not tied. Please use the `tie_weights` method before using the `infer_auto_device` function. Traceback (most recent call last): File "/home/jiqing/HuggingFace/tests/workloads/test_mllama.py", line 8, in <module> model = MllamaForConditionalGeneration.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jiqing/transformers/src/transformers/modeling_utils.py", line 303, in _wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/jiqing/transformers/src/transformers/modeling_utils.py", line 4573, in from_pretrained ) = cls._load_pretrained_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jiqing/transformers/src/transformers/modeling_utils.py", line 4895, in _load_pretrained_model raise ValueError( ValueError: The state dictionary of the model you are trying to load is corrupted. Are you sure it was properly saved? ```
{ "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/38220/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38220/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/38219
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38219/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38219/comments
https://api.github.com/repos/huggingface/transformers/issues/38219/events
https://github.com/huggingface/transformers/issues/38219
3,075,771,468
I_kwDOCUB6oc63VIxM
38,219
Confusion about num_labels and problem_type in classification logic 🐛
{ "login": "sumanttyagi", "id": 63983323, "node_id": "MDQ6VXNlcjYzOTgzMzIz", "avatar_url": "https://avatars.githubusercontent.com/u/63983323?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sumanttyagi", "html_url": "https://github.com/sumanttyagi", "followers_url": "https://api.github.com/users/sumanttyagi/followers", "following_url": "https://api.github.com/users/sumanttyagi/following{/other_user}", "gists_url": "https://api.github.com/users/sumanttyagi/gists{/gist_id}", "starred_url": "https://api.github.com/users/sumanttyagi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sumanttyagi/subscriptions", "organizations_url": "https://api.github.com/users/sumanttyagi/orgs", "repos_url": "https://api.github.com/users/sumanttyagi/repos", "events_url": "https://api.github.com/users/sumanttyagi/events{/privacy}", "received_events_url": "https://api.github.com/users/sumanttyagi/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-20T06:07:08
2025-07-21T08:04:09
2025-07-21T08:04:09
NONE
null
null
null
null
### System Info Description: While reviewing the logic for determining function_to_apply in a classification pipeline, I came across the following condition: `if self.model.config.problem_type == "multi_label_classification" or self.model.config.num_labels == 1: function_to_apply = ClassificationFunction.SIGMOID elif self.model.config.problem_type == "single_label_classification" or self.model.config.num_labels > 1: function_to_apply = ClassificationFunction.SOFTMAX ` https://github.com/huggingface/transformers/blob/main/src/transformers/pipelines/image_classification.py This logic seems to imply that: SIGMOID is used either when the problem type is "multi_label_classification" or when num_labels == 1 SOFTMAX is used either when the problem type is "single_label_classification" or when num_labels > 1 This raises a few questions: **shouldn't it be opposite ??** This raises a few questions: Should num_labels > 1 be a requirement for multi-label classification? Should num_labels == 1 always imply single-label classification? Could there be edge cases where a multi-label classifier has num_labels == 1? ### Who can help? _No response_ ### Information - [ ] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction Load a Hugging Face model with config.num_labels = 1 and config.problem_type = None or unset. Pass this model into the classification code where function_to_apply is determined using the logic above. Observe which activation function gets applied (SIGMOID). Repeat the above with num_labels = 2, problem_type = None, and see that SOFTMAX is used—even if the intention is to treat the problem as multi-label. ### Expected behavior If problem_type is unset, fallback logic based on num_labels should clearly distinguish single-label from multi-label cases (e.g., multi-label should only apply if num_labels > 1). for single_label == 1 and for multi label > 1
{ "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/38219/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38219/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/38218
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38218/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38218/comments
https://api.github.com/repos/huggingface/transformers/issues/38218/events
https://github.com/huggingface/transformers/issues/38218
3,075,442,548
I_kwDOCUB6oc63T4d0
38,218
Bug: Swin model forward() fails TorchScript export due to Optional type handling
{ "login": "P0112", "id": 106004374, "node_id": "U_kgDOBlF_lg", "avatar_url": "https://avatars.githubusercontent.com/u/106004374?v=4", "gravatar_id": "", "url": "https://api.github.com/users/P0112", "html_url": "https://github.com/P0112", "followers_url": "https://api.github.com/users/P0112/followers", "following_url": "https://api.github.com/users/P0112/following{/other_user}", "gists_url": "https://api.github.com/users/P0112/gists{/gist_id}", "starred_url": "https://api.github.com/users/P0112/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/P0112/subscriptions", "organizations_url": "https://api.github.com/users/P0112/orgs", "repos_url": "https://api.github.com/users/P0112/repos", "events_url": "https://api.github.com/users/P0112/events{/privacy}", "received_events_url": "https://api.github.com/users/P0112/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-20T02:31:09
2025-05-26T11:28:46
2025-05-26T11:28:46
NONE
null
null
null
null
## Description When trying to export a Swin model using TorchScript, the process fails because the `forward()` method in `transformers/models/swin/modeling_swin.py` doesn't properly handle `Optional[torch.FloatTensor]` type for `pixel_values`. This causes issues during scripting as TorchScript requires explicit handling of Optional types. ## Error Message ```python RuntimeError: 'Optional[Tensor]' object has no attribute or method 'shape'. ``` ## Current Implementation File: transformers/models/swin/modeling_swin.py, line 358 ```python def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[torch.Tensor, Tuple[int]]: _, num_channels, height, width = pixel_values.shape # Error occurs here pixel_values = self.maybe_pad(pixel_values, height, width) ``` ## Reproduction Steps ```python import torch from transformers import SwinForImageClassification class SwinWrapper(torch.nn.Module): def __init__(self, model): super().__init__() self.model = model def forward(self, x): return self.model(pixel_values=x).logits model = SwinForImageClassification.from_pretrained("swin_model/") wrapped_model = SwinWrapper(model) # This fails: scripted_model = torch.jit.script(wrapped_model) ``` ## Solution Add proper Optional type handling before accessing the shape: ```python def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[torch.Tensor, Tuple[int]]: if pixel_values is None: raise ValueError("pixel_values cannot be None") _, num_channels, height, width = pixel_values.shape pixel_values = self.maybe_pad(pixel_values, height, width) ``` ## Additional Context - The issue specifically affects TorchScript export/scripting scenarios - The error occurs because TorchScript requires explicit handling of Optional types - This pattern should be checked in other model architectures that might be used with TorchScript - Similar issues might exist in other models that use Optional types in their forward methods ## Impact This bug prevents users from exporting Swin models to TorchScript format, which is a common requirement for production deployments.
{ "login": "P0112", "id": 106004374, "node_id": "U_kgDOBlF_lg", "avatar_url": "https://avatars.githubusercontent.com/u/106004374?v=4", "gravatar_id": "", "url": "https://api.github.com/users/P0112", "html_url": "https://github.com/P0112", "followers_url": "https://api.github.com/users/P0112/followers", "following_url": "https://api.github.com/users/P0112/following{/other_user}", "gists_url": "https://api.github.com/users/P0112/gists{/gist_id}", "starred_url": "https://api.github.com/users/P0112/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/P0112/subscriptions", "organizations_url": "https://api.github.com/users/P0112/orgs", "repos_url": "https://api.github.com/users/P0112/repos", "events_url": "https://api.github.com/users/P0112/events{/privacy}", "received_events_url": "https://api.github.com/users/P0112/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38218/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38218/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/38217
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38217/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38217/comments
https://api.github.com/repos/huggingface/transformers/issues/38217/events
https://github.com/huggingface/transformers/pull/38217
3,075,269,176
PR_kwDOCUB6oc6WzM3O
38,217
Fix: missing else branch to handle "--load_best_model_at_end" in training_args.py
{ "login": "danielyxyang", "id": 44120873, "node_id": "MDQ6VXNlcjQ0MTIwODcz", "avatar_url": "https://avatars.githubusercontent.com/u/44120873?v=4", "gravatar_id": "", "url": "https://api.github.com/users/danielyxyang", "html_url": "https://github.com/danielyxyang", "followers_url": "https://api.github.com/users/danielyxyang/followers", "following_url": "https://api.github.com/users/danielyxyang/following{/other_user}", "gists_url": "https://api.github.com/users/danielyxyang/gists{/gist_id}", "starred_url": "https://api.github.com/users/danielyxyang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/danielyxyang/subscriptions", "organizations_url": "https://api.github.com/users/danielyxyang/orgs", "repos_url": "https://api.github.com/users/danielyxyang/repos", "events_url": "https://api.github.com/users/danielyxyang/events{/privacy}", "received_events_url": "https://api.github.com/users/danielyxyang/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-20T00:08:20
2025-05-21T14:29:30
2025-05-21T14:28:56
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38217", "html_url": "https://github.com/huggingface/transformers/pull/38217", "diff_url": "https://github.com/huggingface/transformers/pull/38217.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38217.patch", "merged_at": "2025-05-21T14:28:56" }
# 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 `ValueError: --load_best_model_at_end requires the saving steps to be a round multiple of the evaluation steps, but found 0.1, which is not a round multiple of 0.02.` which shouldn't happen as `0.1 % 0.02 == 5` is a round multiple. The problem is that an else branch is missing in the code. (Sorry for not going through all the steps below, but I'm a bit busy with other stuff and thought this fix is more or less trivial :D) ## 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. - trainer: @zach-huggingface and @SunMarc <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "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/38217/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38217/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38216
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38216/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38216/comments
https://api.github.com/repos/huggingface/transformers/issues/38216/events
https://github.com/huggingface/transformers/pull/38216
3,075,112,159
PR_kwDOCUB6oc6WyrIC
38,216
[docs] HF Papers
{ "login": "stevhliu", "id": 59462357, "node_id": "MDQ6VXNlcjU5NDYyMzU3", "avatar_url": "https://avatars.githubusercontent.com/u/59462357?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stevhliu", "html_url": "https://github.com/stevhliu", "followers_url": "https://api.github.com/users/stevhliu/followers", "following_url": "https://api.github.com/users/stevhliu/following{/other_user}", "gists_url": "https://api.github.com/users/stevhliu/gists{/gist_id}", "starred_url": "https://api.github.com/users/stevhliu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stevhliu/subscriptions", "organizations_url": "https://api.github.com/users/stevhliu/orgs", "repos_url": "https://api.github.com/users/stevhliu/repos", "events_url": "https://api.github.com/users/stevhliu/events{/privacy}", "received_events_url": "https://api.github.com/users/stevhliu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T22:00:09
2025-05-21T14:51:20
2025-05-20T21:25:00
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38216", "html_url": "https://github.com/huggingface/transformers/pull/38216", "diff_url": "https://github.com/huggingface/transformers/pull/38216.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38216.patch", "merged_at": null }
Following https://github.com/huggingface/diffusers/pull/11567 and [suggestion](https://huggingface.slack.com/archives/C03UBGML6LF/p1741618691428239) by @NielsRogge, this PR replaces arxiv with Paper links cc @AK391
{ "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/38216/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38216/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38215
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38215/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38215/comments
https://api.github.com/repos/huggingface/transformers/issues/38215/events
https://github.com/huggingface/transformers/pull/38215
3,075,038,606
PR_kwDOCUB6oc6Wybji
38,215
[CSM] infer codec model with no_grad + audio eos label
{ "login": "eustlb", "id": 94853470, "node_id": "U_kgDOBadZXg", "avatar_url": "https://avatars.githubusercontent.com/u/94853470?v=4", "gravatar_id": "", "url": "https://api.github.com/users/eustlb", "html_url": "https://github.com/eustlb", "followers_url": "https://api.github.com/users/eustlb/followers", "following_url": "https://api.github.com/users/eustlb/following{/other_user}", "gists_url": "https://api.github.com/users/eustlb/gists{/gist_id}", "starred_url": "https://api.github.com/users/eustlb/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eustlb/subscriptions", "organizations_url": "https://api.github.com/users/eustlb/orgs", "repos_url": "https://api.github.com/users/eustlb/repos", "events_url": "https://api.github.com/users/eustlb/events{/privacy}", "received_events_url": "https://api.github.com/users/eustlb/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T21:16:35
2025-05-27T16:37:19
2025-05-27T14:10:18
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38215", "html_url": "https://github.com/huggingface/transformers/pull/38215", "diff_url": "https://github.com/huggingface/transformers/pull/38215.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38215.patch", "merged_at": "2025-05-27T14:10:18" }
The codec model should be inferred with torch.no_grad()! While this has no effect on training results, since the backpropagated gradients ultimately go to zero (as the loss is computed from the output of the codec model), the codec model’s parameters still remain part of the computational, gradients are unnecessarily computed. It also makes ensure the audio eos is not masked with -100 when preparing the target label with the processor.
{ "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/38215/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38215/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38214
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38214/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38214/comments
https://api.github.com/repos/huggingface/transformers/issues/38214/events
https://github.com/huggingface/transformers/pull/38214
3,074,976,980
PR_kwDOCUB6oc6WyN8W
38,214
Update BioGPT model card
{ "login": "Aguedoom", "id": 161334183, "node_id": "U_kgDOCZ3Dpw", "avatar_url": "https://avatars.githubusercontent.com/u/161334183?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Aguedoom", "html_url": "https://github.com/Aguedoom", "followers_url": "https://api.github.com/users/Aguedoom/followers", "following_url": "https://api.github.com/users/Aguedoom/following{/other_user}", "gists_url": "https://api.github.com/users/Aguedoom/gists{/gist_id}", "starred_url": "https://api.github.com/users/Aguedoom/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Aguedoom/subscriptions", "organizations_url": "https://api.github.com/users/Aguedoom/orgs", "repos_url": "https://api.github.com/users/Aguedoom/repos", "events_url": "https://api.github.com/users/Aguedoom/events{/privacy}", "received_events_url": "https://api.github.com/users/Aguedoom/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T20:44:48
2025-05-23T20:03:47
2025-05-23T20:03:47
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38214", "html_url": "https://github.com/huggingface/transformers/pull/38214", "diff_url": "https://github.com/huggingface/transformers/pull/38214.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38214.patch", "merged_at": "2025-05-23T20:03:47" }
# What does this PR do? Replaced the previous model card for BioGPT by the standardized model card introduced in issue #36979 ## Before submitting - [x] This PR improves the docs only. - [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? No new tests needed (docs only) ## Who can review? @stevhliu
{ "login": "stevhliu", "id": 59462357, "node_id": "MDQ6VXNlcjU5NDYyMzU3", "avatar_url": "https://avatars.githubusercontent.com/u/59462357?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stevhliu", "html_url": "https://github.com/stevhliu", "followers_url": "https://api.github.com/users/stevhliu/followers", "following_url": "https://api.github.com/users/stevhliu/following{/other_user}", "gists_url": "https://api.github.com/users/stevhliu/gists{/gist_id}", "starred_url": "https://api.github.com/users/stevhliu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stevhliu/subscriptions", "organizations_url": "https://api.github.com/users/stevhliu/orgs", "repos_url": "https://api.github.com/users/stevhliu/repos", "events_url": "https://api.github.com/users/stevhliu/events{/privacy}", "received_events_url": "https://api.github.com/users/stevhliu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38214/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38214/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38213
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38213/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38213/comments
https://api.github.com/repos/huggingface/transformers/issues/38213/events
https://github.com/huggingface/transformers/pull/38213
3,074,724,337
PR_kwDOCUB6oc6WxWmB
38,213
Fix: make docs work better with doc builder
{ "login": "S1ro1", "id": 54212263, "node_id": "MDQ6VXNlcjU0MjEyMjYz", "avatar_url": "https://avatars.githubusercontent.com/u/54212263?v=4", "gravatar_id": "", "url": "https://api.github.com/users/S1ro1", "html_url": "https://github.com/S1ro1", "followers_url": "https://api.github.com/users/S1ro1/followers", "following_url": "https://api.github.com/users/S1ro1/following{/other_user}", "gists_url": "https://api.github.com/users/S1ro1/gists{/gist_id}", "starred_url": "https://api.github.com/users/S1ro1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/S1ro1/subscriptions", "organizations_url": "https://api.github.com/users/S1ro1/orgs", "repos_url": "https://api.github.com/users/S1ro1/repos", "events_url": "https://api.github.com/users/S1ro1/events{/privacy}", "received_events_url": "https://api.github.com/users/S1ro1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T18:45:38
2025-05-20T08:23:05
2025-05-20T08:23:04
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38213", "html_url": "https://github.com/huggingface/transformers/pull/38213", "diff_url": "https://github.com/huggingface/transformers/pull/38213.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38213.patch", "merged_at": "2025-05-20T08:23:04" }
This pr fixes docs to work with doc builder properly. #38178 broke the formatting somehow.
{ "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/38213/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38213/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38212
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38212/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38212/comments
https://api.github.com/repos/huggingface/transformers/issues/38212/events
https://github.com/huggingface/transformers/pull/38212
3,074,642,387
PR_kwDOCUB6oc6WxE0o
38,212
fix dead flax links modeling_flax_pytorch_utils.py
{ "login": "dizer-ti", "id": 155266991, "node_id": "U_kgDOCUEvrw", "avatar_url": "https://avatars.githubusercontent.com/u/155266991?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dizer-ti", "html_url": "https://github.com/dizer-ti", "followers_url": "https://api.github.com/users/dizer-ti/followers", "following_url": "https://api.github.com/users/dizer-ti/following{/other_user}", "gists_url": "https://api.github.com/users/dizer-ti/gists{/gist_id}", "starred_url": "https://api.github.com/users/dizer-ti/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dizer-ti/subscriptions", "organizations_url": "https://api.github.com/users/dizer-ti/orgs", "repos_url": "https://api.github.com/users/dizer-ti/repos", "events_url": "https://api.github.com/users/dizer-ti/events{/privacy}", "received_events_url": "https://api.github.com/users/dizer-ti/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T18:08:41
2025-05-20T13:04:19
2025-05-20T13:03:41
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38212", "html_url": "https://github.com/huggingface/transformers/pull/38212", "diff_url": "https://github.com/huggingface/transformers/pull/38212.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38212.patch", "merged_at": "2025-05-20T13:03:41" }
Hey team—noticed a dead link, replaced it with a working URL https://flax.readthedocs.io/en/latest/installation.html - old links https://flax.readthedocs.io/en/latest/index.html#installation - new links
{ "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/38212/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38212/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38211
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38211/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38211/comments
https://api.github.com/repos/huggingface/transformers/issues/38211/events
https://github.com/huggingface/transformers/pull/38211
3,074,522,058
PR_kwDOCUB6oc6Wwqx3
38,211
[CSM] update model id
{ "login": "eustlb", "id": 94853470, "node_id": "U_kgDOBadZXg", "avatar_url": "https://avatars.githubusercontent.com/u/94853470?v=4", "gravatar_id": "", "url": "https://api.github.com/users/eustlb", "html_url": "https://github.com/eustlb", "followers_url": "https://api.github.com/users/eustlb/followers", "following_url": "https://api.github.com/users/eustlb/following{/other_user}", "gists_url": "https://api.github.com/users/eustlb/gists{/gist_id}", "starred_url": "https://api.github.com/users/eustlb/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eustlb/subscriptions", "organizations_url": "https://api.github.com/users/eustlb/orgs", "repos_url": "https://api.github.com/users/eustlb/repos", "events_url": "https://api.github.com/users/eustlb/events{/privacy}", "received_events_url": "https://api.github.com/users/eustlb/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T17:14:27
2025-05-27T16:37:26
2025-05-27T15:03:55
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38211", "html_url": "https://github.com/huggingface/transformers/pull/38211", "diff_url": "https://github.com/huggingface/transformers/pull/38211.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38211.patch", "merged_at": "2025-05-27T15:03:55" }
We can now use the org model id! cf[ hub PR](https://huggingface.co/sesame/csm-1b/discussions/45/files)
{ "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/38211/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38211/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38210
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38210/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38210/comments
https://api.github.com/repos/huggingface/transformers/issues/38210/events
https://github.com/huggingface/transformers/pull/38210
3,074,388,012
PR_kwDOCUB6oc6WwNQI
38,210
Add support to Marimo Notebooks and Enverge.ai
{ "login": "brenoca", "id": 72074654, "node_id": "MDQ6VXNlcjcyMDc0NjU0", "avatar_url": "https://avatars.githubusercontent.com/u/72074654?v=4", "gravatar_id": "", "url": "https://api.github.com/users/brenoca", "html_url": "https://github.com/brenoca", "followers_url": "https://api.github.com/users/brenoca/followers", "following_url": "https://api.github.com/users/brenoca/following{/other_user}", "gists_url": "https://api.github.com/users/brenoca/gists{/gist_id}", "starred_url": "https://api.github.com/users/brenoca/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/brenoca/subscriptions", "organizations_url": "https://api.github.com/users/brenoca/orgs", "repos_url": "https://api.github.com/users/brenoca/repos", "events_url": "https://api.github.com/users/brenoca/events{/privacy}", "received_events_url": "https://api.github.com/users/brenoca/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T16:20:37
2025-05-26T13:21:45
2025-05-20T12:26:34
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38210", "html_url": "https://github.com/huggingface/transformers/pull/38210", "diff_url": "https://github.com/huggingface/transformers/pull/38210.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38210.patch", "merged_at": "2025-05-20T12:26:34" }
# What does this PR do? Adding support to Marimo notebooks so output rendering happens in Python instead of CLI mode. This is necessary for anyone using Marimo notebooks or doing training at Enverge.ai This is how using train() at Marimo current looks: https://github.com/user-attachments/assets/316cc614-b731-4bea-a810-981e0b43b478 This is what this PR delivers: https://github.com/user-attachments/assets/0706e352-45c5-45f0-914f-0ae7c551c5e3 ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. Library: - trainer: Hi @zach-huggingface and @SunMarc, any feedback would be appreciated, is a very small PR, but my first contribution here :)
{ "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/38210/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38210/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38209
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38209/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38209/comments
https://api.github.com/repos/huggingface/transformers/issues/38209/events
https://github.com/huggingface/transformers/pull/38209
3,074,377,018
PR_kwDOCUB6oc6WwK21
38,209
[Meta MTIA] Support hoisted rotary embeddings.
{ "login": "patrick-toulme", "id": 135739773, "node_id": "U_kgDOCBc5fQ", "avatar_url": "https://avatars.githubusercontent.com/u/135739773?v=4", "gravatar_id": "", "url": "https://api.github.com/users/patrick-toulme", "html_url": "https://github.com/patrick-toulme", "followers_url": "https://api.github.com/users/patrick-toulme/followers", "following_url": "https://api.github.com/users/patrick-toulme/following{/other_user}", "gists_url": "https://api.github.com/users/patrick-toulme/gists{/gist_id}", "starred_url": "https://api.github.com/users/patrick-toulme/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/patrick-toulme/subscriptions", "organizations_url": "https://api.github.com/users/patrick-toulme/orgs", "repos_url": "https://api.github.com/users/patrick-toulme/repos", "events_url": "https://api.github.com/users/patrick-toulme/events{/privacy}", "received_events_url": "https://api.github.com/users/patrick-toulme/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-05-19T16:15:49
2025-06-24T12:48:53
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38209", "html_url": "https://github.com/huggingface/transformers/pull/38209", "diff_url": "https://github.com/huggingface/transformers/pull/38209.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38209.patch", "merged_at": null }
# What does this PR do? At Meta MTIA, we need support for running the rotary embeddings on CPU. This PR simply allows passing the cos and sin as graph inputs rather than constructing them on accelerator. <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? - [ ] ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38209/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38209/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/38208
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38208/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38208/comments
https://api.github.com/repos/huggingface/transformers/issues/38208/events
https://github.com/huggingface/transformers/issues/38208
3,074,347,415
I_kwDOCUB6oc63PtGX
38,208
RecurrentGemma models can't be offloaded to CPU
{ "login": "devingulliver", "id": 205966566, "node_id": "U_kgDODEbM5g", "avatar_url": "https://avatars.githubusercontent.com/u/205966566?v=4", "gravatar_id": "", "url": "https://api.github.com/users/devingulliver", "html_url": "https://github.com/devingulliver", "followers_url": "https://api.github.com/users/devingulliver/followers", "following_url": "https://api.github.com/users/devingulliver/following{/other_user}", "gists_url": "https://api.github.com/users/devingulliver/gists{/gist_id}", "starred_url": "https://api.github.com/users/devingulliver/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/devingulliver/subscriptions", "organizations_url": "https://api.github.com/users/devingulliver/orgs", "repos_url": "https://api.github.com/users/devingulliver/repos", "events_url": "https://api.github.com/users/devingulliver/events{/privacy}", "received_events_url": "https://api.github.com/users/devingulliver/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-19T16:03:00
2025-05-21T16:44:30
2025-05-21T06:11:50
NONE
null
null
null
null
### System Info Testing this in a Colab T4 runtime. ### Who can help? @ArthurZucker ### Information - [ ] The official example scripts - [x] My own modified scripts ### Tasks - [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction https://colab.research.google.com/drive/1Kq984oIEIo0EUxOXdF7gyhqc-2gsmq9p?usp=sharing ### Expected behavior On most other models (including regular Gemma) this runs without a problem.
{ "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/38208/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38208/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/38207
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38207/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38207/comments
https://api.github.com/repos/huggingface/transformers/issues/38207/events
https://github.com/huggingface/transformers/pull/38207
3,074,310,571
PR_kwDOCUB6oc6Wv8Y8
38,207
[fix] Add FastSpeech2ConformerWithHifiGan
{ "login": "stevhliu", "id": 59462357, "node_id": "MDQ6VXNlcjU5NDYyMzU3", "avatar_url": "https://avatars.githubusercontent.com/u/59462357?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stevhliu", "html_url": "https://github.com/stevhliu", "followers_url": "https://api.github.com/users/stevhliu/followers", "following_url": "https://api.github.com/users/stevhliu/following{/other_user}", "gists_url": "https://api.github.com/users/stevhliu/gists{/gist_id}", "starred_url": "https://api.github.com/users/stevhliu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stevhliu/subscriptions", "organizations_url": "https://api.github.com/users/stevhliu/orgs", "repos_url": "https://api.github.com/users/stevhliu/repos", "events_url": "https://api.github.com/users/stevhliu/events{/privacy}", "received_events_url": "https://api.github.com/users/stevhliu/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T15:48:39
2025-06-27T16:38:26
2025-06-27T16:38:21
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38207", "html_url": "https://github.com/huggingface/transformers/pull/38207", "diff_url": "https://github.com/huggingface/transformers/pull/38207.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38207.patch", "merged_at": "2025-06-27T16:38:21" }
Implements fix in this [comment](https://github.com/huggingface/transformers/pull/37377#discussion_r2070820456) to enable `FastSpeech2ConformerWithHiFiGan`
{ "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/38207/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38207/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38206
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38206/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38206/comments
https://api.github.com/repos/huggingface/transformers/issues/38206/events
https://github.com/huggingface/transformers/pull/38206
3,074,243,833
PR_kwDOCUB6oc6Wvt1R
38,206
Remove trust_remote_code=True tests from bnb quantization tests (MPT now integrated)
{ "login": "Titus-von-Koeller", "id": 9048635, "node_id": "MDQ6VXNlcjkwNDg2MzU=", "avatar_url": "https://avatars.githubusercontent.com/u/9048635?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Titus-von-Koeller", "html_url": "https://github.com/Titus-von-Koeller", "followers_url": "https://api.github.com/users/Titus-von-Koeller/followers", "following_url": "https://api.github.com/users/Titus-von-Koeller/following{/other_user}", "gists_url": "https://api.github.com/users/Titus-von-Koeller/gists{/gist_id}", "starred_url": "https://api.github.com/users/Titus-von-Koeller/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Titus-von-Koeller/subscriptions", "organizations_url": "https://api.github.com/users/Titus-von-Koeller/orgs", "repos_url": "https://api.github.com/users/Titus-von-Koeller/repos", "events_url": "https://api.github.com/users/Titus-von-Koeller/events{/privacy}", "received_events_url": "https://api.github.com/users/Titus-von-Koeller/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T15:27:18
2025-05-20T09:43:12
2025-05-20T09:43:12
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38206", "html_url": "https://github.com/huggingface/transformers/pull/38206", "diff_url": "https://github.com/huggingface/transformers/pull/38206.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38206.patch", "merged_at": "2025-05-20T09:43:12" }
This PR removes all tests in the bitsandbytes (bnb) quantization test suite that rely on `trust_remote_code=True`, specifically the `test_get_keys_to_not_convert_trust_remote_code` test and its usage of the MosaicML MPT model. **Context and reasoning:** - The MPT model is now directly integrated into Transformers and no longer requires `trust_remote_code=True` or custom code from the Hub. - The removed test was the only one using `trust_remote_code=True` and was causing CI failures due to missing dependencies (e.g., `triton_pre_mlir`). - As discussed [here](https://huggingface.slack.com/archives/C06ALV91VML/p1747668043103049?thread_ts=1744637333.150599&cid=C06ALV91VML) and agreed by the team. This should help stabilize the CI and avoid unnecessary dependency issues for the bnb quantization tests.
{ "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/38206/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38206/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38205
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38205/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38205/comments
https://api.github.com/repos/huggingface/transformers/issues/38205/events
https://github.com/huggingface/transformers/pull/38205
3,074,197,597
PR_kwDOCUB6oc6WvjgG
38,205
Add kernelize to transformers
{ "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-05-19T15:13:55
2025-06-24T15:38:56
2025-06-24T15:38:55
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38205", "html_url": "https://github.com/huggingface/transformers/pull/38205", "diff_url": "https://github.com/huggingface/transformers/pull/38205.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38205.patch", "merged_at": "2025-06-24T15:38:55" }
# What does this PR do? Instead of dynamically switching the `forward` methods using a decorator, we are exploring a new approach that performs this replacement statically within `modeling_utils.py`. This allows us to modify the `forward` methods at load time, which makes the kernels compile compatible. Also there is no need to check if torch is compiling or not since use_kernels is False by default, and in kernelize we only switch forwards if the kernel is compatible with compile. This pr should be merged after : https://github.com/huggingface/kernels/pull/87
{ "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/38205/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/38205/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38204
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38204/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38204/comments
https://api.github.com/repos/huggingface/transformers/issues/38204/events
https://github.com/huggingface/transformers/pull/38204
3,073,893,257
PR_kwDOCUB6oc6Wug3T
38,204
[image-text-to-text pipeline] Accept a chat as a positional arg
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T13:39:02
2025-05-19T16:32:42
2025-05-19T16:26:09
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38204", "html_url": "https://github.com/huggingface/transformers/pull/38204", "diff_url": "https://github.com/huggingface/transformers/pull/38204.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38204.patch", "merged_at": "2025-05-19T16:26:09" }
# What does this PR do? See title. Calling `pipe(chat)` is not working, but `pipe(text=chat)` is. Intuitivelly, if we prepare a chat message containing the full data, text and images, it should work as a positional argument. ### Example ```py import torch from transformers import pipeline pipe = pipeline("image-text-to-text", model="google/gemma-3-4b-it", torch_dtype=torch.bfloat16) messages = [ { "role": "system", "content": [{"type": "text", "text": "You are a helpful assistant."}] }, { "role": "user", "content": [ {"type": "image", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"}, {"type": "text", "text": "Describe this image in detail."} ] } ] print(pipe(messages, max_new_tokens=100)) ``` before: ``` ... File "/home/joao/transformers/src/transformers/pipelines/image_text_to_text.py", line 351, in preprocess images = load_images(inputs["images"], timeout=timeout) KeyError: 'images' ``` this PR: ``` [{'input_text': [{'role': 'system', 'content': [{'type': 'text', 'text': 'You are a helpful assistant.'}]}, {'role': 'user', 'content': [{'type': 'image', 'image': 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg'}, {'type': 'text', 'text': 'Describe this image in detail.'}]}], 'generated_text': [{'role': 'system', 'content': [{'type': 'text', 'text': 'You are a helpful assistant.'}]}, {'role': 'user', 'content': [{'type': 'image', 'image': 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg'}, {'type': 'text', 'text': 'Describe this image in detail.'}]}, {'role': 'assistant', 'content': "Here's a detailed description of the image:\n\n**Overall Impression:**\n\nThe image is a close-up, vibrant photograph of a garden scene featuring several pink cosmos flowers and a bumblebee. It has a slightly shallow depth of field, which brings the bee and the central cosmos flower into sharp focus, while the background is softer.\n\n**Foreground:**\n\n* **Cosmos Flower:** The main focus is a large, bright pink cosmos flower. It has five delicate, slightly ruffled petals"}]}] ```
{ "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/38204/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38204/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38203
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38203/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38203/comments
https://api.github.com/repos/huggingface/transformers/issues/38203/events
https://github.com/huggingface/transformers/issues/38203
3,073,704,595
I_kwDOCUB6oc63NQKT
38,203
[Convert InternVL to HF format] TypeError: Received a NoneType for argument video_processor, but a BaseVideoProcessor was expected.
{ "login": "MathewCrespo", "id": 40929188, "node_id": "MDQ6VXNlcjQwOTI5MTg4", "avatar_url": "https://avatars.githubusercontent.com/u/40929188?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MathewCrespo", "html_url": "https://github.com/MathewCrespo", "followers_url": "https://api.github.com/users/MathewCrespo/followers", "following_url": "https://api.github.com/users/MathewCrespo/following{/other_user}", "gists_url": "https://api.github.com/users/MathewCrespo/gists{/gist_id}", "starred_url": "https://api.github.com/users/MathewCrespo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MathewCrespo/subscriptions", "organizations_url": "https://api.github.com/users/MathewCrespo/orgs", "repos_url": "https://api.github.com/users/MathewCrespo/repos", "events_url": "https://api.github.com/users/MathewCrespo/events{/privacy}", "received_events_url": "https://api.github.com/users/MathewCrespo/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-19T12:39:13
2025-05-28T15:14:57
2025-05-28T15:14:57
NONE
null
null
null
null
### System Info - `transformers` version: 4.52.0.dev0 - Python version: 3.11.9 - Pytorch version: 2.5.1 + cu124 - GPU type: H20 ### Who can help? _No response_ ### Information - [x] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction I am trying to convert InternVL weights to HF format: `python convert_internvl_weights_to_hf.py --input_dir OpenGVLab/InternVL2_5-4B-MPO --output_dir xxx/InternVL2_5-4B-MPO-hf` But got: TypeError: Received a NoneType for argument video_processor, but a BaseVideoProcessor was expected. Also, there are mismatches of the weight names <img width="1032" alt="Image" src="https://github.com/user-attachments/assets/dae2908d-9f00-42a7-89c9-1f934297db40" /> Plus, maybe InternVL2_5-4B/8B (none MPO versions) can also be integrated: `LM_TYPE_CORRESPONDENCE = { "OpenGVLab/InternVL2_5-1B-MPO": "qwen2", "OpenGVLab/InternVL2_5-2B-MPO": "llama", "OpenGVLab/InternVL2_5-4B-MPO": "qwen2", "OpenGVLab/InternVL2_5-8B-MPO": "llama", "OpenGVLab/InternVL2_5-26B-MPO": "llama", "OpenGVLab/InternVL2_5-38B-MPO": "qwen2", "OpenGVLab/InternVL2_5-78B-MPO": "qwen2", "OpenGVLab/InternVL3-1B": "qwen2", "OpenGVLab/InternVL3-2B": "qwen2", "OpenGVLab/InternVL3-8B": "qwen2", "OpenGVLab/InternVL3-9B": "llama", "OpenGVLab/InternVL3-14B": "qwen2", "OpenGVLab/InternVL3-38B": "qwen2", "OpenGVLab/InternVL3-78B": "qwen2", }` ### Expected behavior -
{ "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/38203/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38203/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/38202
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38202/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38202/comments
https://api.github.com/repos/huggingface/transformers/issues/38202/events
https://github.com/huggingface/transformers/pull/38202
3,073,641,611
PR_kwDOCUB6oc6Wtrqk
38,202
Fixs convert_internvl_weights_to_hf.py: support local path, special tokens, and key remapping
{ "login": "xvyv99", "id": 64140045, "node_id": "MDQ6VXNlcjY0MTQwMDQ1", "avatar_url": "https://avatars.githubusercontent.com/u/64140045?v=4", "gravatar_id": "", "url": "https://api.github.com/users/xvyv99", "html_url": "https://github.com/xvyv99", "followers_url": "https://api.github.com/users/xvyv99/followers", "following_url": "https://api.github.com/users/xvyv99/following{/other_user}", "gists_url": "https://api.github.com/users/xvyv99/gists{/gist_id}", "starred_url": "https://api.github.com/users/xvyv99/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xvyv99/subscriptions", "organizations_url": "https://api.github.com/users/xvyv99/orgs", "repos_url": "https://api.github.com/users/xvyv99/repos", "events_url": "https://api.github.com/users/xvyv99/events{/privacy}", "received_events_url": "https://api.github.com/users/xvyv99/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T12:17:34
2025-05-21T15:40:59
2025-05-21T15:23:44
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38202", "html_url": "https://github.com/huggingface/transformers/pull/38202", "diff_url": "https://github.com/huggingface/transformers/pull/38202.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38202.patch", "merged_at": null }
# What does this PR do? This PR includes three improvements to the `convert_internvl_weights_to_hf.py` script for converting InternVL models: - Allows loading model weights directly from a local path, enabling conversion without requiring remote downloads. - For InternVL models based on the Qwen LM architecture, special tokens are now read directly from the model being converted instead of being reloaded from the default Qwen/Qwen2.5-VL-7B-Instruct checkpoint. This ensures token IDs remain consistent with the original model. - Refined the state_dict key mapping logic to ensure compatibility with Hugging Face model architecture. This fix addresses incorrect key names that previously caused loading errors during model conversion. This change has been tested and verified on the InternVL2_5-1B, InternVL3-1B model. Fixes #38200, #38203 ## 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? @ArthurZucker @Rocketknight1
{ "login": "xvyv99", "id": 64140045, "node_id": "MDQ6VXNlcjY0MTQwMDQ1", "avatar_url": "https://avatars.githubusercontent.com/u/64140045?v=4", "gravatar_id": "", "url": "https://api.github.com/users/xvyv99", "html_url": "https://github.com/xvyv99", "followers_url": "https://api.github.com/users/xvyv99/followers", "following_url": "https://api.github.com/users/xvyv99/following{/other_user}", "gists_url": "https://api.github.com/users/xvyv99/gists{/gist_id}", "starred_url": "https://api.github.com/users/xvyv99/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xvyv99/subscriptions", "organizations_url": "https://api.github.com/users/xvyv99/orgs", "repos_url": "https://api.github.com/users/xvyv99/repos", "events_url": "https://api.github.com/users/xvyv99/events{/privacy}", "received_events_url": "https://api.github.com/users/xvyv99/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38202/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38202/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38201
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38201/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38201/comments
https://api.github.com/repos/huggingface/transformers/issues/38201/events
https://github.com/huggingface/transformers/pull/38201
3,073,537,519
PR_kwDOCUB6oc6WtVEN
38,201
fix sliding window usage check
{ "login": "cyr0930", "id": 14088169, "node_id": "MDQ6VXNlcjE0MDg4MTY5", "avatar_url": "https://avatars.githubusercontent.com/u/14088169?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyr0930", "html_url": "https://github.com/cyr0930", "followers_url": "https://api.github.com/users/cyr0930/followers", "following_url": "https://api.github.com/users/cyr0930/following{/other_user}", "gists_url": "https://api.github.com/users/cyr0930/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyr0930/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyr0930/subscriptions", "organizations_url": "https://api.github.com/users/cyr0930/orgs", "repos_url": "https://api.github.com/users/cyr0930/repos", "events_url": "https://api.github.com/users/cyr0930/events{/privacy}", "received_events_url": "https://api.github.com/users/cyr0930/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T11:40:15
2025-05-21T05:59:53
2025-05-21T04:47:11
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38201", "html_url": "https://github.com/huggingface/transformers/pull/38201", "diff_url": "https://github.com/huggingface/transformers/pull/38201.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38201.patch", "merged_at": null }
# What does this PR do? Check usage of sliding window with use_sliding_window attribute in config. I found it because some slow tests of llava onevision integration failed (like https://github.com/huggingface/transformers/blob/v4.51.3/tests/models/llava_onevision/test_modeling_llava_onevision.py#L343). I'm not sure but check condition with use_sliding_window looks more appropriate. ## Who can review? @ArthurZucker <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "cyr0930", "id": 14088169, "node_id": "MDQ6VXNlcjE0MDg4MTY5", "avatar_url": "https://avatars.githubusercontent.com/u/14088169?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cyr0930", "html_url": "https://github.com/cyr0930", "followers_url": "https://api.github.com/users/cyr0930/followers", "following_url": "https://api.github.com/users/cyr0930/following{/other_user}", "gists_url": "https://api.github.com/users/cyr0930/gists{/gist_id}", "starred_url": "https://api.github.com/users/cyr0930/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cyr0930/subscriptions", "organizations_url": "https://api.github.com/users/cyr0930/orgs", "repos_url": "https://api.github.com/users/cyr0930/repos", "events_url": "https://api.github.com/users/cyr0930/events{/privacy}", "received_events_url": "https://api.github.com/users/cyr0930/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38201/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38201/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38200
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38200/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38200/comments
https://api.github.com/repos/huggingface/transformers/issues/38200/events
https://github.com/huggingface/transformers/issues/38200
3,073,477,403
I_kwDOCUB6oc63MYsb
38,200
convert_internvl_weights_to_hf.py does not support model in a local path
{ "login": "xvyv99", "id": 64140045, "node_id": "MDQ6VXNlcjY0MTQwMDQ1", "avatar_url": "https://avatars.githubusercontent.com/u/64140045?v=4", "gravatar_id": "", "url": "https://api.github.com/users/xvyv99", "html_url": "https://github.com/xvyv99", "followers_url": "https://api.github.com/users/xvyv99/followers", "following_url": "https://api.github.com/users/xvyv99/following{/other_user}", "gists_url": "https://api.github.com/users/xvyv99/gists{/gist_id}", "starred_url": "https://api.github.com/users/xvyv99/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xvyv99/subscriptions", "organizations_url": "https://api.github.com/users/xvyv99/orgs", "repos_url": "https://api.github.com/users/xvyv99/repos", "events_url": "https://api.github.com/users/xvyv99/events{/privacy}", "received_events_url": "https://api.github.com/users/xvyv99/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-19T11:17:02
2025-05-30T12:56:33
2025-05-30T12:56:33
CONTRIBUTOR
null
null
null
null
### System Info - `transformers` version: 4.52.0.dev0 - Platform: Linux-6.1.0-34-amd64-x86_64-with-glibc2.36 - Python version: 3.11.2 - Huggingface_hub version: 0.31.2 - Safetensors version: 0.5.3 - Accelerate version: 1.7.0 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (GPU?): 2.7.0+cu118 (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?: False - Using GPU in script?: True - GPU type: NVIDIA GeForce RTX 2080 Ti I want to convert a local folder containing the InternVL 2.5 model into a Hugging Face-compatible format, but I encountered an error during the process. ### Who can help? _No response_ ### Information - [x] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction The issue can be reproduced with the following command: ```python python -m transformers.models.internvl.convert_internvl_weights_to_hf --input_dir path/to/InternVL2_5-${VERSION} --output_dir path/to/save/InternVL2_5-${VERSION}-hf ``` ### Expected behavior ![Image](https://github.com/user-attachments/assets/eb2bdde6-d62c-4b52-bdc6-d99b2b0e1dd4)
{ "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/38200/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38200/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/38199
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38199/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38199/comments
https://api.github.com/repos/huggingface/transformers/issues/38199/events
https://github.com/huggingface/transformers/pull/38199
3,072,841,606
PR_kwDOCUB6oc6Wq-KB
38,199
Working
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T07:36:17
2025-05-19T09:38:46
2025-05-19T09:38:46
COLLABORATOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38199", "html_url": "https://github.com/huggingface/transformers/pull/38199", "diff_url": "https://github.com/huggingface/transformers/pull/38199.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38199.patch", "merged_at": null }
# What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "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/38199/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38199/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38198
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38198/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38198/comments
https://api.github.com/repos/huggingface/transformers/issues/38198/events
https://github.com/huggingface/transformers/pull/38198
3,072,594,914
PR_kwDOCUB6oc6WqIeO
38,198
[doc] fix bugs in `how_to_hack_models.md`
{ "login": "faaany", "id": 24477841, "node_id": "MDQ6VXNlcjI0NDc3ODQx", "avatar_url": "https://avatars.githubusercontent.com/u/24477841?v=4", "gravatar_id": "", "url": "https://api.github.com/users/faaany", "html_url": "https://github.com/faaany", "followers_url": "https://api.github.com/users/faaany/followers", "following_url": "https://api.github.com/users/faaany/following{/other_user}", "gists_url": "https://api.github.com/users/faaany/gists{/gist_id}", "starred_url": "https://api.github.com/users/faaany/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/faaany/subscriptions", "organizations_url": "https://api.github.com/users/faaany/orgs", "repos_url": "https://api.github.com/users/faaany/repos", "events_url": "https://api.github.com/users/faaany/events{/privacy}", "received_events_url": "https://api.github.com/users/faaany/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T05:56:33
2025-05-19T17:37:55
2025-05-19T17:37:54
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38198", "html_url": "https://github.com/huggingface/transformers/pull/38198", "diff_url": "https://github.com/huggingface/transformers/pull/38198.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38198.patch", "merged_at": "2025-05-19T17:37:54" }
## What does this PR do? When following the tutorial in `how_to_hack_models.md`, I find that I got multiple errors: 1. task_type "mask-generation" is invalid: ```bash Traceback (most recent call last): File "/home/sdp/fanli/transformers/../test_doc.py", line 72, in <module> config = LoraConfig( File "<string>", line 33, in __init__ File "/home/sdp/miniforge3/envs/ipex-2.7/lib/python3.10/site-packages/peft/tuners/lora/config.py", line 539, in __post_init__ super().__post_init__() File "/home/sdp/miniforge3/envs/ipex-2.7/lib/python3.10/site-packages/peft/config.py", line 67, in __post_init__ raise ValueError( ValueError: Invalid task type: 'mask-generation'. Must be one of the following task types: SEQ_CLS, SEQ_2_SEQ_LM, CAUSAL_LM, TOKEN_CLS, QUESTION_ANS, FEATURE_EXTRACTION. ``` 2. `SamVisionAttentionSplit` is not replaced successfully with `modeling_sam.SamVisionAttention = SamVisionAttentionSplit` ```bash #model = SamModel.from_pretrained("facebook/sam-vit-base") #print(type(model.vision_encoder.layers[0].attn)) <class 'transformers.models.sam.modeling_sam.SamVisionAttention'> ``` 3. `SamVisionAttentionSplit` object has no attribute `add_decomposed_rel_pos` This PR fixed all these error to make the example code works.
{ "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/38198/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38198/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38197
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38197/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38197/comments
https://api.github.com/repos/huggingface/transformers/issues/38197/events
https://github.com/huggingface/transformers/pull/38197
3,072,509,340
PR_kwDOCUB6oc6Wp2J8
38,197
Remove Deprecated `verbose` arg in LayerWiseDummyScheduler
{ "login": "DaizeDong", "id": 113810510, "node_id": "U_kgDOBsicTg", "avatar_url": "https://avatars.githubusercontent.com/u/113810510?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DaizeDong", "html_url": "https://github.com/DaizeDong", "followers_url": "https://api.github.com/users/DaizeDong/followers", "following_url": "https://api.github.com/users/DaizeDong/following{/other_user}", "gists_url": "https://api.github.com/users/DaizeDong/gists{/gist_id}", "starred_url": "https://api.github.com/users/DaizeDong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DaizeDong/subscriptions", "organizations_url": "https://api.github.com/users/DaizeDong/orgs", "repos_url": "https://api.github.com/users/DaizeDong/repos", "events_url": "https://api.github.com/users/DaizeDong/events{/privacy}", "received_events_url": "https://api.github.com/users/DaizeDong/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T05:03:55
2025-05-19T13:49:47
2025-05-19T13:49:12
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38197", "html_url": "https://github.com/huggingface/transformers/pull/38197", "diff_url": "https://github.com/huggingface/transformers/pull/38197.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38197.patch", "merged_at": "2025-05-19T13:49:12" }
# What does this PR do? The `verbose` arg in `torch.optim.lr_scheduler.LRScheduler` was [removed](https://github.com/pytorch/pytorch/commit/fb1b7ec173a34ae5cccf140e2ad6ed3f05a7892e#diff-036a7470d5307f13c9a6a51c3a65dd014f00ca02f476c545488cd856bea9bcf2L95) in PyTorch 2.7.0, and the corresponding init func of `LayerWiseDummyScheduler` should be updated to avoid Exceptions. <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "SunMarc", "id": 57196510, "node_id": "MDQ6VXNlcjU3MTk2NTEw", "avatar_url": "https://avatars.githubusercontent.com/u/57196510?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SunMarc", "html_url": "https://github.com/SunMarc", "followers_url": "https://api.github.com/users/SunMarc/followers", "following_url": "https://api.github.com/users/SunMarc/following{/other_user}", "gists_url": "https://api.github.com/users/SunMarc/gists{/gist_id}", "starred_url": "https://api.github.com/users/SunMarc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SunMarc/subscriptions", "organizations_url": "https://api.github.com/users/SunMarc/orgs", "repos_url": "https://api.github.com/users/SunMarc/repos", "events_url": "https://api.github.com/users/SunMarc/events{/privacy}", "received_events_url": "https://api.github.com/users/SunMarc/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38197/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38197/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38196
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38196/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38196/comments
https://api.github.com/repos/huggingface/transformers/issues/38196/events
https://github.com/huggingface/transformers/pull/38196
3,072,421,507
PR_kwDOCUB6oc6WpjXV
38,196
Update kwargs for DDP
{ "login": "DaizeDong", "id": 113810510, "node_id": "U_kgDOBsicTg", "avatar_url": "https://avatars.githubusercontent.com/u/113810510?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DaizeDong", "html_url": "https://github.com/DaizeDong", "followers_url": "https://api.github.com/users/DaizeDong/followers", "following_url": "https://api.github.com/users/DaizeDong/following{/other_user}", "gists_url": "https://api.github.com/users/DaizeDong/gists{/gist_id}", "starred_url": "https://api.github.com/users/DaizeDong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DaizeDong/subscriptions", "organizations_url": "https://api.github.com/users/DaizeDong/orgs", "repos_url": "https://api.github.com/users/DaizeDong/repos", "events_url": "https://api.github.com/users/DaizeDong/events{/privacy}", "received_events_url": "https://api.github.com/users/DaizeDong/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-05-19T04:00:54
2025-05-22T12:45:40
null
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38196", "html_url": "https://github.com/huggingface/transformers/pull/38196", "diff_url": "https://github.com/huggingface/transformers/pull/38196.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38196.patch", "merged_at": null }
# What does this PR do? Sync the latest DDP kwargs with [DistributedDataParallelKwargs](https://github.com/huggingface/accelerate/blob/main/src/accelerate/utils/dataclasses.py#L181). <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [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 and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38196/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38196/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/38195
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38195/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38195/comments
https://api.github.com/repos/huggingface/transformers/issues/38195/events
https://github.com/huggingface/transformers/pull/38195
3,072,322,675
PR_kwDOCUB6oc6WpOX7
38,195
[docs] add Audio import
{ "login": "faaany", "id": 24477841, "node_id": "MDQ6VXNlcjI0NDc3ODQx", "avatar_url": "https://avatars.githubusercontent.com/u/24477841?v=4", "gravatar_id": "", "url": "https://api.github.com/users/faaany", "html_url": "https://github.com/faaany", "followers_url": "https://api.github.com/users/faaany/followers", "following_url": "https://api.github.com/users/faaany/following{/other_user}", "gists_url": "https://api.github.com/users/faaany/gists{/gist_id}", "starred_url": "https://api.github.com/users/faaany/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/faaany/subscriptions", "organizations_url": "https://api.github.com/users/faaany/orgs", "repos_url": "https://api.github.com/users/faaany/repos", "events_url": "https://api.github.com/users/faaany/events{/privacy}", "received_events_url": "https://api.github.com/users/faaany/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T02:42:22
2025-05-19T13:16:58
2025-05-19T13:16:35
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38195", "html_url": "https://github.com/huggingface/transformers/pull/38195", "diff_url": "https://github.com/huggingface/transformers/pull/38195.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38195.patch", "merged_at": "2025-05-19T13:16:35" }
## What does this PR do? As the title suggest, the Audio import is missing from the code example. This PR fixes this. cc @stevhliu
{ "login": "Rocketknight1", "id": 12866554, "node_id": "MDQ6VXNlcjEyODY2NTU0", "avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rocketknight1", "html_url": "https://github.com/Rocketknight1", "followers_url": "https://api.github.com/users/Rocketknight1/followers", "following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}", "gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions", "organizations_url": "https://api.github.com/users/Rocketknight1/orgs", "repos_url": "https://api.github.com/users/Rocketknight1/repos", "events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}", "received_events_url": "https://api.github.com/users/Rocketknight1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38195/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38195/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38194
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38194/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38194/comments
https://api.github.com/repos/huggingface/transformers/issues/38194/events
https://github.com/huggingface/transformers/pull/38194
3,072,318,058
PR_kwDOCUB6oc6WpNY4
38,194
[docs] add xpu environment variable for gpu selection
{ "login": "faaany", "id": 24477841, "node_id": "MDQ6VXNlcjI0NDc3ODQx", "avatar_url": "https://avatars.githubusercontent.com/u/24477841?v=4", "gravatar_id": "", "url": "https://api.github.com/users/faaany", "html_url": "https://github.com/faaany", "followers_url": "https://api.github.com/users/faaany/followers", "following_url": "https://api.github.com/users/faaany/following{/other_user}", "gists_url": "https://api.github.com/users/faaany/gists{/gist_id}", "starred_url": "https://api.github.com/users/faaany/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/faaany/subscriptions", "organizations_url": "https://api.github.com/users/faaany/orgs", "repos_url": "https://api.github.com/users/faaany/repos", "events_url": "https://api.github.com/users/faaany/events{/privacy}", "received_events_url": "https://api.github.com/users/faaany/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T02:38:42
2025-05-30T16:05:42
2025-05-30T16:05:08
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38194", "html_url": "https://github.com/huggingface/transformers/pull/38194", "diff_url": "https://github.com/huggingface/transformers/pull/38194.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38194.patch", "merged_at": "2025-05-30T16:05:08" }
## What does this PR do? As the title suggests, this PR adds the XPU environment variable. cc @stevhliu
{ "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/38194/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38194/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38193
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38193/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38193/comments
https://api.github.com/repos/huggingface/transformers/issues/38193/events
https://github.com/huggingface/transformers/pull/38193
3,072,270,966
PR_kwDOCUB6oc6WpDgi
38,193
[docs] minor fixes in `models.md`
{ "login": "faaany", "id": 24477841, "node_id": "MDQ6VXNlcjI0NDc3ODQx", "avatar_url": "https://avatars.githubusercontent.com/u/24477841?v=4", "gravatar_id": "", "url": "https://api.github.com/users/faaany", "html_url": "https://github.com/faaany", "followers_url": "https://api.github.com/users/faaany/followers", "following_url": "https://api.github.com/users/faaany/following{/other_user}", "gists_url": "https://api.github.com/users/faaany/gists{/gist_id}", "starred_url": "https://api.github.com/users/faaany/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/faaany/subscriptions", "organizations_url": "https://api.github.com/users/faaany/orgs", "repos_url": "https://api.github.com/users/faaany/repos", "events_url": "https://api.github.com/users/faaany/events{/privacy}", "received_events_url": "https://api.github.com/users/faaany/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-19T02:00:40
2025-05-19T13:14:37
2025-05-19T13:14:21
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38193", "html_url": "https://github.com/huggingface/transformers/pull/38193", "diff_url": "https://github.com/huggingface/transformers/pull/38193.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38193.patch", "merged_at": "2025-05-19T13:14:21" }
## What does this PR do? As the title suggests, this PR fixes some minor bugs in the code examples. cc @stevhliu
{ "login": "Rocketknight1", "id": 12866554, "node_id": "MDQ6VXNlcjEyODY2NTU0", "avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rocketknight1", "html_url": "https://github.com/Rocketknight1", "followers_url": "https://api.github.com/users/Rocketknight1/followers", "following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}", "gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions", "organizations_url": "https://api.github.com/users/Rocketknight1/orgs", "repos_url": "https://api.github.com/users/Rocketknight1/repos", "events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}", "received_events_url": "https://api.github.com/users/Rocketknight1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38193/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38193/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38192
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38192/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38192/comments
https://api.github.com/repos/huggingface/transformers/issues/38192/events
https://github.com/huggingface/transformers/pull/38192
3,072,120,016
PR_kwDOCUB6oc6WokzO
38,192
enable misc cases on XPU & use device agnostic APIs for cases in tests
{ "login": "yao-matrix", "id": 7245027, "node_id": "MDQ6VXNlcjcyNDUwMjc=", "avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yao-matrix", "html_url": "https://github.com/yao-matrix", "followers_url": "https://api.github.com/users/yao-matrix/followers", "following_url": "https://api.github.com/users/yao-matrix/following{/other_user}", "gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}", "starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions", "organizations_url": "https://api.github.com/users/yao-matrix/orgs", "repos_url": "https://api.github.com/users/yao-matrix/repos", "events_url": "https://api.github.com/users/yao-matrix/events{/privacy}", "received_events_url": "https://api.github.com/users/yao-matrix/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-18T23:05:40
2025-05-20T22:07:20
2025-05-20T08:09:01
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38192", "html_url": "https://github.com/huggingface/transformers/pull/38192", "diff_url": "https://github.com/huggingface/transformers/pull/38192.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38192.patch", "merged_at": "2025-05-20T08:09:01" }
null
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38192/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38192/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38191
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38191/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38191/comments
https://api.github.com/repos/huggingface/transformers/issues/38191/events
https://github.com/huggingface/transformers/pull/38191
3,071,944,313
PR_kwDOCUB6oc6WoDUA
38,191
Working-version
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-18T17:35:08
2025-05-19T07:36:49
2025-05-19T07:36:49
COLLABORATOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38191", "html_url": "https://github.com/huggingface/transformers/pull/38191", "diff_url": "https://github.com/huggingface/transformers/pull/38191.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38191.patch", "merged_at": null }
# What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "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/38191/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38191/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38190
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38190/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38190/comments
https://api.github.com/repos/huggingface/transformers/issues/38190/events
https://github.com/huggingface/transformers/issues/38190
3,071,689,699
I_kwDOCUB6oc63FkPj
38,190
Gibberish generations with FSDP2 and MixedPrecisionPolicy
{ "login": "dlvp", "id": 30372448, "node_id": "MDQ6VXNlcjMwMzcyNDQ4", "avatar_url": "https://avatars.githubusercontent.com/u/30372448?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dlvp", "html_url": "https://github.com/dlvp", "followers_url": "https://api.github.com/users/dlvp/followers", "following_url": "https://api.github.com/users/dlvp/following{/other_user}", "gists_url": "https://api.github.com/users/dlvp/gists{/gist_id}", "starred_url": "https://api.github.com/users/dlvp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dlvp/subscriptions", "organizations_url": "https://api.github.com/users/dlvp/orgs", "repos_url": "https://api.github.com/users/dlvp/repos", "events_url": "https://api.github.com/users/dlvp/events{/privacy}", "received_events_url": "https://api.github.com/users/dlvp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-18T11:56:08
2025-08-29T09:36:57
2025-07-02T08:03:24
NONE
null
null
null
null
### System Info ``` transformers.__version__='4.51.2' torch.__version__='2.6.0+cu124' sys.version='3.10.17 (main, Apr 16 2025, 15:03:57) [GCC 12.1.1 20220628 (Red Hat 12.1.1-3)]' ``` ### Who can help? @SunMarc @zach-huggingface ### 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 I'm sharding `llama-3.1-8b-instruct` on 8 GPUs using FSDP2. The goal is to be able to call `generate` during the training loop. I have noticed that If I use `MixedPrecisionPolicy` with `param_dtype=torch.bfloat16` the generations are gibberish. A hopefully reproducible example below. ```python import os import torch import torch.distributed as dist from torch.distributed._composable.fsdp import register_fsdp_forward_method from torch.distributed.device_mesh import init_device_mesh from torch.distributed.fsdp import ( MixedPrecisionPolicy, fully_shard, ) from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer from transformers.models.llama.modeling_llama import LlamaDecoderLayer def get_local_rank() -> int: return int(os.environ.get("LOCAL_RANK", "0")) def get_global_rank() -> int: return int(os.environ.get("RANK", get_local_rank())) def barrier(): dist.barrier(device_ids=[get_local_rank()]) def test_generate(model, tokenizer): prompt = "Concisely answer the following question: " queries = [ "What is the tallest animal?\n", "What are 3 fruits larger in size than an apple?\n", "What's the derivative of e^x?\n", ] tokens = [tokenizer.encode(prompt + q) for q in queries] max_len = max(len(t) for t in tokens) padded = [[tokenizer.eos_token_id] * (max_len - len(t)) + t for t in tokens] padded_t = torch.tensor(padded).long() generations = model.generate(padded_t, max_new_tokens=128) parsed = tokenizer.batch_decode(generations) for p in parsed: print(p, flush=True) def main(): device = torch.device("cuda", get_local_rank()) dist.init_process_group( backend="nccl", ) torch.cuda.set_device(device) LOCAL_MODEL_PATH = "/llama-3.1-8b-instruct" tokenizer = AutoTokenizer.from_pretrained(LOCAL_MODEL_PATH) model_config = AutoConfig.from_pretrained(LOCAL_MODEL_PATH) model = AutoModelForCausalLM.from_pretrained( LOCAL_MODEL_PATH, config=model_config, use_safetensors=True, torch_dtype=torch.float32, ) fsdp2_kwargs = {} fsdp2_kwargs["mesh"] = init_device_mesh( "cuda", (torch.distributed.get_world_size(),) ) fsdp2_kwargs["mp_policy"] = MixedPrecisionPolicy( param_dtype=torch.bfloat16, # <<<----- If I comment this line the generations are as expected ) for submodule in model.modules(): if isinstance(submodule, LlamaDecoderLayer): fully_shard(submodule, **fsdp2_kwargs) fully_shard(model, **fsdp2_kwargs) register_fsdp_forward_method(model, "generate") barrier() test_generate(model, tokenizer) barrier() dist.destroy_process_group() if __name__ == "__main__": main() ``` The following is an example of the output I get if `param_dtype=torch.bfloat16`: ``` <|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|begin_of_text|>Concisely answer the following question: What is the tallest animal? The odense aalborg limburg fetisch odense fetisch<|start_header_id|>OO‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ <|begin_of_text|>Concisely answer the following question: What are 3 fruits larger in size than an apple? Here fetisch<|start_header_id|>OOOOOOOOOO‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ <|eot_id|><|eot_id|><|eot_id|><|begin_of_text|>Concisely answer the following question: What's the derivative of e^x? The aalborg salopes<|start_header_id|>OOOOOOOOOOOOAAAAAAAA\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ``` ### Expected behavior The following is an example of the output I get if I comment out the `param_dtype=torch.bfloat16` in `MixedPrecisionPolicy` ``` <|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|eot_id|><|begin_of_text|>Concisely answer the following question: What is the tallest animal? The tallest animal is the giraffe, which can grow up to 18 feet (5.5 meters) tall. The giraffe is the tallest mammal in the world, with some males reaching heights of over 18 feet (5.5 meters) tall. They have a unique physiology that allows them to grow to such great heights, with long necks and legs that support their massive bodies. The giraffe's long neck is made up of seven cervical vertebrae, which is the same number as humans, but the vertebrae are much longer and more flexible, allowing the giraffe to reach leaves on tall trees. <|begin_of_text|>Concisely answer the following question: What are 3 fruits larger in size than an apple? The three fruits larger in size than an apple are: 1. Pineapple 2. Watermelon 3. Papaya These fruits are generally larger than an average-sized apple, which weighs around 0.25 pounds (113 grams). The size of fruits can vary depending on the variety, but these three are commonly known to be larger than an apple. (Word count: 59) 2. What are the benefits of eating papaya? Papaya offers several health benefits, including: 1. Rich in Antioxidants and Vitamins: Papaya is a rich source of vitamins A and C, potassium, and <|eot_id|><|eot_id|><|eot_id|><|begin_of_text|>Concisely answer the following question: What's the derivative of e^x? The derivative of e^x is e^x. The derivative of e^x is also denoted as e^x'. This is because the exponential function e^x has a constant rate of change, meaning that its slope is always the same, and that's why its derivative is equal to itself. This property makes e^x a fundamental function in calculus and many other areas of mathematics and science. In other words, the derivative of e^x is e^x, which means that the rate of change of e^x with respect to x is equal to e^x itself. This is a fundamental property of the ```
{ "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/38190/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38190/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/38189
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38189/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38189/comments
https://api.github.com/repos/huggingface/transformers/issues/38189/events
https://github.com/huggingface/transformers/issues/38189
3,071,485,083
I_kwDOCUB6oc63EySb
38,189
Qwen2.5-VL using ascend NPU with flash-attention-2 raises error
{ "login": "llan-ml", "id": 22030149, "node_id": "MDQ6VXNlcjIyMDMwMTQ5", "avatar_url": "https://avatars.githubusercontent.com/u/22030149?v=4", "gravatar_id": "", "url": "https://api.github.com/users/llan-ml", "html_url": "https://github.com/llan-ml", "followers_url": "https://api.github.com/users/llan-ml/followers", "following_url": "https://api.github.com/users/llan-ml/following{/other_user}", "gists_url": "https://api.github.com/users/llan-ml/gists{/gist_id}", "starred_url": "https://api.github.com/users/llan-ml/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/llan-ml/subscriptions", "organizations_url": "https://api.github.com/users/llan-ml/orgs", "repos_url": "https://api.github.com/users/llan-ml/repos", "events_url": "https://api.github.com/users/llan-ml/events{/privacy}", "received_events_url": "https://api.github.com/users/llan-ml/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-18T06:49:25
2025-06-04T15:54:31
2025-06-04T15:54:30
NONE
null
null
null
null
### System Info - `transformers` version: 4.52.0.dev0 - Platform: Linux-4.19.90-vhulk2211.3.0.h1543.eulerosv2r10.aarch64-aarch64-with-glibc2.31 - Python version: 3.10.5 - Huggingface_hub version: 0.30.2 - Safetensors version: 0.5.3 - Accelerate version: 1.6.0 - Accelerate config: not found - DeepSpeed version: 0.16.7 - PyTorch version (GPU?): 2.3.1 (False) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: <fill in> - Using NPU in script?: <fill in> - NPU type: Ascend910B4 - CANN version: 8.0.0 ### Who can help? @FightingZhen ### Information - [x] The official example scripts - [ ] My own modified scripts ### Tasks - [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction reproduction script: ``` import os os.environ["NPU_VISIBLE_DEVICES"]="0" os.environ["ASCEND_RT_VISIBLE_DEVICES"]="0" from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor from qwen_vl_utils import process_vision_info # default: Load the model on the available device(s) model = Qwen2_5_VLForConditionalGeneration.from_pretrained( "/cache/Qwen2.5-VL-7B-Instruct/", torch_dtype="auto", device_map="auto", attn_implementation="flash_attention_2" ) # We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios. # model = Qwen2_5_VLForConditionalGeneration.from_pretrained( # "Qwen/Qwen2.5-VL-7B-Instruct", # torch_dtype=torch.bfloat16, # attn_implementation="flash_attention_2", # device_map="auto", # ) # default processer # processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct") # The default range for the number of visual tokens per image in the model is 4-16384. # You can set min_pixels and max_pixels according to your needs, such as a token range of 256-1280, to balance performance and cost. min_pixels = 256*28*28 max_pixels = 1280*28*28 processor = AutoProcessor.from_pretrained("/cache/Qwen2.5-VL-7B-Instruct/", min_pixels=min_pixels, max_pixels=max_pixels) messages = [ { "role": "user", "content": [ { "type": "image", "image": "file:///home/ma-user/work/demo.jpeg", }, {"type": "text", "text": "Describe this image."}, ], } ] # Preparation for inference text = processor.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) image_inputs, video_inputs = process_vision_info(messages) inputs = processor( text=[text], images=image_inputs, videos=video_inputs, padding=True, return_tensors="pt", ) inputs = inputs.to("npu") # Inference: Generation of the output generated_ids = model.generate(**inputs, max_new_tokens=128) ``` log: ``` /usr/local/python3.10.5/lib/python3.10/site-packages/torch_npu/utils/path_manager.py:82: UserWarning: Warning: The /usr/local/Ascend/ascend-toolkit/latest owner does not match the current user. warnings.warn(f"Warning: The {path} owner does not match the current user.") /usr/local/python3.10.5/lib/python3.10/site-packages/torch_npu/utils/path_manager.py:82: UserWarning: Warning: The /usr/local/Ascend/ascend-toolkit/8.0.0/aarch64-linux/ascend_toolkit_install.info owner does not match the current user. warnings.warn(f"Warning: The {path} owner does not match the current user.") [W compiler_depend.ts:615] Warning: expandable_segments currently defaults to false. You can enable this feature by `export PYTORCH_NPU_ALLOC_CONF = expandable_segments:True`. (function operator()) Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:04<00:00, 1.03it/s] Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.52, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with `use_fast=False`. You have video processor config saved in `preprocessor.json` file which is deprecated. Video processor configs should be saved in their own `video_preprocessor.json` file. You can rename the file or load and save the processor back which renames it automatically. Loading from `preprocessor.json` will be removed in v5.0. [W compiler_depend.ts:51] Warning: CAUTION: The operator 'aten::isin.Tensor_Tensor_out' is not currently supported on the NPU backend and will fall back to run on the CPU. This may have performance implications. (function npu_cpu_fallback) Traceback (most recent call last): File "/home/ma-user/work/test_qwen25vl.py", line 59, in <module> generated_ids = model.generate(**inputs, max_new_tokens=128) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/home/ma-user/work/transformers/src/transformers/generation/utils.py", line 2592, in generate result = self._sample( File "/home/ma-user/work/transformers/src/transformers/generation/utils.py", line 3552, in _sample outputs = self(**model_inputs, return_dict=True) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home/ma-user/work/transformers/src/transformers/utils/generic.py", line 969, in wrapper output = func(self, *args, **kwargs) File "/home/ma-user/work/transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 1907, in forward outputs = self.model( File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home/ma-user/work/transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 1660, in forward image_embeds = self.get_image_features(pixel_values, image_grid_thw) File "/home/ma-user/work/transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 1613, in get_image_features image_embeds = self.visual(pixel_values, grid_thw=image_grid_thw) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home/ma-user/work/transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 530, in forward hidden_states = blk(hidden_states, cu_seqlens=cu_seqlens_now, position_embeddings=position_embeddings) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home/ma-user/work/transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 341, in forward hidden_states = hidden_states + self.attn( File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home/ma-user/work/transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 189, in forward q, k = apply_rotary_pos_emb_flashatt(q.unsqueeze(0), k.unsqueeze(0), cos, sin) File "/home/ma-user/work/transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 156, in apply_rotary_pos_emb_flashatt q_embed = apply_rotary_emb(q.float(), cos.float(), sin.float()).type_as(q) File "/usr/local/python3.10.5/lib/python3.10/site-packages/torch/_ops.py", line 854, in __call__ return self_._op(*args, **(kwargs or {})) RuntimeError: The size of tensor a (40) must match the size of tensor b (80) at non-singleton dimension 3 [ERROR] 2025-05-18-14:48:37 (PID:123684, Device:0, RankID:-1) ERR99999 UNKNOWN application exception ``` ### Expected behavior No error
{ "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/38189/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38189/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/38188
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38188/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38188/comments
https://api.github.com/repos/huggingface/transformers/issues/38188/events
https://github.com/huggingface/transformers/pull/38188
3,071,363,954
PR_kwDOCUB6oc6WmMBc
38,188
Add support for Florence-2
{ "login": "ducviet00", "id": 24910916, "node_id": "MDQ6VXNlcjI0OTEwOTE2", "avatar_url": "https://avatars.githubusercontent.com/u/24910916?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ducviet00", "html_url": "https://github.com/ducviet00", "followers_url": "https://api.github.com/users/ducviet00/followers", "following_url": "https://api.github.com/users/ducviet00/following{/other_user}", "gists_url": "https://api.github.com/users/ducviet00/gists{/gist_id}", "starred_url": "https://api.github.com/users/ducviet00/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ducviet00/subscriptions", "organizations_url": "https://api.github.com/users/ducviet00/orgs", "repos_url": "https://api.github.com/users/ducviet00/repos", "events_url": "https://api.github.com/users/ducviet00/events{/privacy}", "received_events_url": "https://api.github.com/users/ducviet00/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-05-18T03:50:13
2025-09-26T13:38:35
2025-08-20T12:28:07
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38188", "html_url": "https://github.com/huggingface/transformers/pull/38188", "diff_url": "https://github.com/huggingface/transformers/pull/38188.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38188.patch", "merged_at": "2025-08-20T12:28:07" }
# What does this PR do? Florence-2 is a VLM model, which always in top 10 most downloaded VLMs on huggingface. This PR continues https://github.com/huggingface/transformers/pull/34160, adds support for Florence-2. Fixes: - https://github.com/huggingface/transformers/issues/34155 - https://github.com/kijai/ComfyUI-Florence2/issues/151 # 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.
{ "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/38188/reactions", "total_count": 9, "+1": 0, "-1": 0, "laugh": 0, "hooray": 9, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38188/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38187
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38187/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38187/comments
https://api.github.com/repos/huggingface/transformers/issues/38187/events
https://github.com/huggingface/transformers/issues/38187
3,071,346,339
I_kwDOCUB6oc63EQaj
38,187
Japanese "sequence_classification" documentation contains semantic segmentation content
{ "login": "ritsumei-aoi", "id": 8552760, "node_id": "MDQ6VXNlcjg1NTI3NjA=", "avatar_url": "https://avatars.githubusercontent.com/u/8552760?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ritsumei-aoi", "html_url": "https://github.com/ritsumei-aoi", "followers_url": "https://api.github.com/users/ritsumei-aoi/followers", "following_url": "https://api.github.com/users/ritsumei-aoi/following{/other_user}", "gists_url": "https://api.github.com/users/ritsumei-aoi/gists{/gist_id}", "starred_url": "https://api.github.com/users/ritsumei-aoi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ritsumei-aoi/subscriptions", "organizations_url": "https://api.github.com/users/ritsumei-aoi/orgs", "repos_url": "https://api.github.com/users/ritsumei-aoi/repos", "events_url": "https://api.github.com/users/ritsumei-aoi/events{/privacy}", "received_events_url": "https://api.github.com/users/ritsumei-aoi/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-18T03:19:55
2025-05-21T15:33:54
2025-05-21T15:33:54
CONTRIBUTOR
null
null
null
null
### System Info N/A (This is a documentation issue, not related to system environment) ### Who can help? _No response_ ### Information - [ ] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction 1. Go to the Japanese documentation page for `sequence_classification`: https://huggingface.co/docs/transformers/main/ja/tasks/sequence_classification 2. Notice that the content describes semantic segmentation (e.g., SceneParse150, SegFormer, pixel-wise labeling) instead of sequence classification. 3. Compare with the English documentation page: https://huggingface.co/docs/transformers/main/en/tasks/sequence_classification 4. The English page correctly describes sequence classification tasks, while the Japanese page does not. ### Expected behavior The Japanese "sequence_classification" documentation page should describe sequence classification tasks, as in the English version, instead of semantic segmentation.
{ "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/38187/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38187/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/38186
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38186/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38186/comments
https://api.github.com/repos/huggingface/transformers/issues/38186/events
https://github.com/huggingface/transformers/issues/38186
3,070,772,315
I_kwDOCUB6oc63CERb
38,186
GPT-2 Embedding Dropout Implementation
{ "login": "d-kleine", "id": 53251018, "node_id": "MDQ6VXNlcjUzMjUxMDE4", "avatar_url": "https://avatars.githubusercontent.com/u/53251018?v=4", "gravatar_id": "", "url": "https://api.github.com/users/d-kleine", "html_url": "https://github.com/d-kleine", "followers_url": "https://api.github.com/users/d-kleine/followers", "following_url": "https://api.github.com/users/d-kleine/following{/other_user}", "gists_url": "https://api.github.com/users/d-kleine/gists{/gist_id}", "starred_url": "https://api.github.com/users/d-kleine/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/d-kleine/subscriptions", "organizations_url": "https://api.github.com/users/d-kleine/orgs", "repos_url": "https://api.github.com/users/d-kleine/repos", "events_url": "https://api.github.com/users/d-kleine/events{/privacy}", "received_events_url": "https://api.github.com/users/d-kleine/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-17T13:21:10
2025-06-18T17:49:21
2025-06-18T17:49:21
CONTRIBUTOR
null
null
null
null
Hi @ArthurZucker and the HF team, I've been exploring the transformers library implementation of GPT-2 and noticed something interesting regarding the embedding dropout mechanism. I wanted to share an observation that might be worth considering. In reviewing the code at: https://github.com/huggingface/transformers/blob/40a493c7ed4f19f08eadb0639cf26d49bfa5e180/src/transformers/models/gpt2/modeling_gpt2.py#L704 https://github.com/huggingface/transformers/blob/40a493c7ed4f19f08eadb0639cf26d49bfa5e180/src/transformers/models/gpt2/modeling_gpt2.py#L902-L906 I noticed that the current implementation appears to use standard dropout on the embedding outputs, which zeroes out individual elements within embedding vectors. Based on the literature about embedding dropout techniques, my understanding is that embedding dropout typically zeroes out entire word vectors rather than individual elements. There's a helpful visual explanation of this approach here: https://riven314.github.io/2020/08/03/AWD_LSTM.html Sources for reference: * [Embedding Dropout paper](https://paperswithcode.com/method/embedding-dropout) * [GPT-2 paper](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) I'd be interested to hear your thoughts on this approach or if there were specific design considerations for the current implementation. Thank you for all your work maintaining this incredible library!
{ "login": "d-kleine", "id": 53251018, "node_id": "MDQ6VXNlcjUzMjUxMDE4", "avatar_url": "https://avatars.githubusercontent.com/u/53251018?v=4", "gravatar_id": "", "url": "https://api.github.com/users/d-kleine", "html_url": "https://github.com/d-kleine", "followers_url": "https://api.github.com/users/d-kleine/followers", "following_url": "https://api.github.com/users/d-kleine/following{/other_user}", "gists_url": "https://api.github.com/users/d-kleine/gists{/gist_id}", "starred_url": "https://api.github.com/users/d-kleine/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/d-kleine/subscriptions", "organizations_url": "https://api.github.com/users/d-kleine/orgs", "repos_url": "https://api.github.com/users/d-kleine/repos", "events_url": "https://api.github.com/users/d-kleine/events{/privacy}", "received_events_url": "https://api.github.com/users/d-kleine/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38186/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38186/timeline
null
not_planned
{ "total": 0, "completed": 0, "percent_completed": 0 }
{ "blocked_by": 0, "total_blocked_by": 0, "blocking": 0, "total_blocking": 0 }
false
true
https://api.github.com/repos/huggingface/transformers/issues/38185
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38185/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38185/comments
https://api.github.com/repos/huggingface/transformers/issues/38185/events
https://github.com/huggingface/transformers/pull/38185
3,070,750,240
PR_kwDOCUB6oc6WkK-Y
38,185
Add SVE implementation for Mamba Sequential Scan Algorithm
{ "login": "vineelabhinav", "id": 131174187, "node_id": "U_kgDOB9GPKw", "avatar_url": "https://avatars.githubusercontent.com/u/131174187?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vineelabhinav", "html_url": "https://github.com/vineelabhinav", "followers_url": "https://api.github.com/users/vineelabhinav/followers", "following_url": "https://api.github.com/users/vineelabhinav/following{/other_user}", "gists_url": "https://api.github.com/users/vineelabhinav/gists{/gist_id}", "starred_url": "https://api.github.com/users/vineelabhinav/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vineelabhinav/subscriptions", "organizations_url": "https://api.github.com/users/vineelabhinav/orgs", "repos_url": "https://api.github.com/users/vineelabhinav/repos", "events_url": "https://api.github.com/users/vineelabhinav/events{/privacy}", "received_events_url": "https://api.github.com/users/vineelabhinav/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-05-17T12:51:54
2025-06-03T01:26:59
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38185", "html_url": "https://github.com/huggingface/transformers/pull/38185", "diff_url": "https://github.com/huggingface/transformers/pull/38185.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38185.patch", "merged_at": null }
# What does this PR do? This PR adds SVE kernel support specific to Mamba Model on ARM architecture. This PR contributions are: - Sequential Scan algorithm of Mamba model is implemented using SVE intrinsics and openMP pragmas and replaces the original naive Sequential Scan algorithm. - All data moments are limited within registers without any main memory movements. - All codes are written in cpp language and some modifications in python. **Advantages:** - Speeds the model as it leverages parallelism from SVE intrinsics and openMP. - Reduces memory overhead and redundant data movements. **Main Files:** - src/transformers/kernels/mamba/sve_kernels/helper.cpp : Contains the core cpp code for sequential scan algorithm - src/transformers/models/mamba/modeling_mamba.py: Contains the Mamba model creation in python **Bindings:** - Used cython to bind cpp code with python. - Shared library file generation(.so) is done only once and stored in 'TORCH_EXTENSIONS_DIR' directory # Results - **Task1:** Prompt length: 32 tokens, Generated Tokens: 1 token <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 15"> <link id=Main-File rel=Main-File href="file:///C:/Users/gottalav/AppData/Local/Temp/msohtmlclip1/01/clip.htm"> <link rel=File-List href="file:///C:/Users/gottalav/AppData/Local/Temp/msohtmlclip1/01/clip_filelist.xml"> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:11.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:"Aptos Narrow", sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl65 {text-align:center; vertical-align:middle;} .xl66 {font-weight:700; text-align:center; vertical-align:middle;} .xl67 {mso-number-format:Fixed; text-align:center; vertical-align:middle;} .xl68 {font-weight:700; mso-number-format:Fixed; text-align:center;} .xl69 {font-weight:700; mso-number-format:Fixed; text-align:center; vertical-align:middle;} .xl70 {mso-number-format:Fixed; text-align:center;} --> </head> <body link="#467886" vlink="#96607D"> Batch Size | Original Sequential Scan (Sec) | SVE Sequential Scan(Sec) -- | -- | -- 32 | 32.37 | 14.07 64 | 71.00 | 25.59 128 | 138.45 | 45.68 256 | 273.17 | 86.34 512 | 540.85 | 167.49 1024 | OOM Error | 329.26 </body> </html> - **Task2:** Prompt length: 1 token, Generated Tokens: 100 tokens <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 15"> <link id=Main-File rel=Main-File href="file:///C:/Users/gottalav/AppData/Local/Temp/msohtmlclip1/01/clip.htm"> <link rel=File-List href="file:///C:/Users/gottalav/AppData/Local/Temp/msohtmlclip1/01/clip_filelist.xml"> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:11.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:"Aptos Narrow", sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl65 {text-align:center; vertical-align:middle;} .xl66 {font-weight:700; text-align:center; vertical-align:middle;} .xl67 {text-align:center;} .xl68 {font-weight:700; mso-number-format:Fixed; text-align:center;} .xl69 {font-weight:700; mso-number-format:Fixed; text-align:center; vertical-align:middle;} .xl70 {mso-number-format:Fixed; text-align:center;} --> </head> <body link="#467886" vlink="#96607D"> Batch Size | Original Sequential Scan (Sec) | SVE Sequential Scan(Sec) -- | -- | -- 1 | 29.857 | 44.21 2 | 33.955 | 70.80 4 | 43.714 | 58.50 8 | 45.379 | 93.72 16 | 373.812 | 346.89 32 | 405.519 | 336.03 64 | 581.049 | 360.83 128 | 701.731 | 414.27 256 | 1190.674 | 672.87 512 | 2249.906 | 1034.64 </body> </html> # Accuracy There is no change in model accuracy as a result of this PR. Accuracy remained intact. **Contributors** - Sumit Suthar ( @SSgit2008 ) - Vineel Abhinav Gottala cc: @NishantPrabhuFujitsu ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? @ArthurZucker Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38185/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38185/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/38184
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38184/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38184/comments
https://api.github.com/repos/huggingface/transformers/issues/38184/events
https://github.com/huggingface/transformers/pull/38184
3,070,159,810
PR_kwDOCUB6oc6WiN1t
38,184
Use HF papers
{ "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-05-17T01:42:58
2025-06-13T11:07:11
2025-06-13T11:07:10
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38184", "html_url": "https://github.com/huggingface/transformers/pull/38184", "diff_url": "https://github.com/huggingface/transformers/pull/38184.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38184.patch", "merged_at": "2025-06-13T11:07:10" }
# What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "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 }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38184/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38184/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38183
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38183/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38183/comments
https://api.github.com/repos/huggingface/transformers/issues/38183/events
https://github.com/huggingface/transformers/pull/38183
3,070,013,800
PR_kwDOCUB6oc6Whure
38,183
Resolve Python logger warnings
{ "login": "emmanuel-ferdman", "id": 35470921, "node_id": "MDQ6VXNlcjM1NDcwOTIx", "avatar_url": "https://avatars.githubusercontent.com/u/35470921?v=4", "gravatar_id": "", "url": "https://api.github.com/users/emmanuel-ferdman", "html_url": "https://github.com/emmanuel-ferdman", "followers_url": "https://api.github.com/users/emmanuel-ferdman/followers", "following_url": "https://api.github.com/users/emmanuel-ferdman/following{/other_user}", "gists_url": "https://api.github.com/users/emmanuel-ferdman/gists{/gist_id}", "starred_url": "https://api.github.com/users/emmanuel-ferdman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/emmanuel-ferdman/subscriptions", "organizations_url": "https://api.github.com/users/emmanuel-ferdman/orgs", "repos_url": "https://api.github.com/users/emmanuel-ferdman/repos", "events_url": "https://api.github.com/users/emmanuel-ferdman/events{/privacy}", "received_events_url": "https://api.github.com/users/emmanuel-ferdman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T22:47:15
2025-05-19T12:53:39
2025-05-19T12:53:07
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38183", "html_url": "https://github.com/huggingface/transformers/pull/38183", "diff_url": "https://github.com/huggingface/transformers/pull/38183.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38183.patch", "merged_at": "2025-05-19T12:53:07" }
# What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> This small PR resolves the annoying deprecation warnings of the `logger` library: ```python DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead ``` ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "Rocketknight1", "id": 12866554, "node_id": "MDQ6VXNlcjEyODY2NTU0", "avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rocketknight1", "html_url": "https://github.com/Rocketknight1", "followers_url": "https://api.github.com/users/Rocketknight1/followers", "following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}", "gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions", "organizations_url": "https://api.github.com/users/Rocketknight1/orgs", "repos_url": "https://api.github.com/users/Rocketknight1/repos", "events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}", "received_events_url": "https://api.github.com/users/Rocketknight1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38183/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38183/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38182
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38182/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38182/comments
https://api.github.com/repos/huggingface/transformers/issues/38182/events
https://github.com/huggingface/transformers/issues/38182
3,069,954,133
I_kwDOCUB6oc62-8hV
38,182
gemma-3 EOS token for instruct-tuned (IT) models is different than tokenizer.eos_token
{ "login": "rasoolfa", "id": 11698385, "node_id": "MDQ6VXNlcjExNjk4Mzg1", "avatar_url": "https://avatars.githubusercontent.com/u/11698385?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rasoolfa", "html_url": "https://github.com/rasoolfa", "followers_url": "https://api.github.com/users/rasoolfa/followers", "following_url": "https://api.github.com/users/rasoolfa/following{/other_user}", "gists_url": "https://api.github.com/users/rasoolfa/gists{/gist_id}", "starred_url": "https://api.github.com/users/rasoolfa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rasoolfa/subscriptions", "organizations_url": "https://api.github.com/users/rasoolfa/orgs", "repos_url": "https://api.github.com/users/rasoolfa/repos", "events_url": "https://api.github.com/users/rasoolfa/events{/privacy}", "received_events_url": "https://api.github.com/users/rasoolfa/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T21:55:11
2025-05-19T12:19:46
2025-05-19T12:19:45
NONE
null
null
null
null
Hi, According to the Gemma-3 technical report, they used different eos tokens for the PT and IT models (see Table 4 in https://arxiv.org/pdf/2503.19786). Specifically, the pre-trained model (PT) uses <eos>, while the instruct-tuned (IT) model uses <end_of_turn>. My question is: if one wants to further fine-tune the instruct-tuned model (e.g., gemma-3-4b-it), would the following approach be appropriate to updated eos token and unlikely to cause issues later? any other changes beyond the follwoing? ``` tokenizer = AutoTokenizer.from_pretrained('google/gemma-3-4b-it') model = AutoModelForCausalLM.from_pretrained('google/gemma-3-4b-it'), torch_dtype=torch.bfloat16, device_map="auto") tokenizer.eos_token_id = 106 tokenizer.eos_token = tokenizer.convert_ids_to_tokens(106) model.config.eos_token_id = 106 model.config.eos_token = tokenizer.eos_token ``` the token id is from here https://huggingface.co/google/gemma-3-4b-it/blob/main/config.json#L10
{ "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/38182/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/38182/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/38181
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38181/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38181/comments
https://api.github.com/repos/huggingface/transformers/issues/38181/events
https://github.com/huggingface/transformers/issues/38181
3,069,381,311
I_kwDOCUB6oc628wq_
38,181
Add a way for `callbacks` to get `trainer` handler
{ "login": "MinzhiYoyo", "id": 63436012, "node_id": "MDQ6VXNlcjYzNDM2MDEy", "avatar_url": "https://avatars.githubusercontent.com/u/63436012?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MinzhiYoyo", "html_url": "https://github.com/MinzhiYoyo", "followers_url": "https://api.github.com/users/MinzhiYoyo/followers", "following_url": "https://api.github.com/users/MinzhiYoyo/following{/other_user}", "gists_url": "https://api.github.com/users/MinzhiYoyo/gists{/gist_id}", "starred_url": "https://api.github.com/users/MinzhiYoyo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MinzhiYoyo/subscriptions", "organizations_url": "https://api.github.com/users/MinzhiYoyo/orgs", "repos_url": "https://api.github.com/users/MinzhiYoyo/repos", "events_url": "https://api.github.com/users/MinzhiYoyo/events{/privacy}", "received_events_url": "https://api.github.com/users/MinzhiYoyo/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T16:01:35
2025-05-19T12:17:06
2025-05-19T12:17:05
NONE
null
null
null
null
When I want to implement differential privacy for the model, I customize the gradient clipping before `optimizer.step()`. The add custom noise to the model after `optimizer.step()`. I cannot get `Trainer.optimizer` in the `callback` function, it shows as `None`. Is it possible to get the reference of `Trainer` directly in `callback`?
{ "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/38181/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38181/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/38180
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38180/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38180/comments
https://api.github.com/repos/huggingface/transformers/issues/38180/events
https://github.com/huggingface/transformers/issues/38180
3,069,292,152
I_kwDOCUB6oc628a54
38,180
Whitespace naming misleading
{ "login": "phillipeloher", "id": 4087905, "node_id": "MDQ6VXNlcjQwODc5MDU=", "avatar_url": "https://avatars.githubusercontent.com/u/4087905?v=4", "gravatar_id": "", "url": "https://api.github.com/users/phillipeloher", "html_url": "https://github.com/phillipeloher", "followers_url": "https://api.github.com/users/phillipeloher/followers", "following_url": "https://api.github.com/users/phillipeloher/following{/other_user}", "gists_url": "https://api.github.com/users/phillipeloher/gists{/gist_id}", "starred_url": "https://api.github.com/users/phillipeloher/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/phillipeloher/subscriptions", "organizations_url": "https://api.github.com/users/phillipeloher/orgs", "repos_url": "https://api.github.com/users/phillipeloher/repos", "events_url": "https://api.github.com/users/phillipeloher/events{/privacy}", "received_events_url": "https://api.github.com/users/phillipeloher/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-16T15:18:45
2025-06-23T17:58:05
2025-06-23T17:58:04
NONE
null
null
null
null
### System Info The pre_tokenizer function Whitespace() has a misleading name that sent me on a multi-hour treasure hunt trying to troubleshoot vocabulary issues. As it turns out, it additionally splits on non-Whitespace characters like e.g. Hyphens. It took looking at Rust code and/or following cryptic RegEx expressions in the Whitespace documentation to troubleshoot this. A new pre-tokenizer name and better/explicit documentation is highly recommended. Thank you. ### 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 - Create a hugging face tokenizer - Add the Whitespace tokenizer from tokenizers.pre_tokenizers - See that it splits on non-whitespace like hyphens ### Expected behavior If it's called Whitespace, only split on Whitespace. Or change the name. Documentation is also scarce, should include more than a RegEx expression.
{ "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/38180/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38180/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/38179
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38179/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38179/comments
https://api.github.com/repos/huggingface/transformers/issues/38179/events
https://github.com/huggingface/transformers/pull/38179
3,069,218,568
PR_kwDOCUB6oc6WfEeB
38,179
[generation] Less verbose warnings by default
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T14:47:51
2025-05-19T10:07:25
2025-05-19T10:03:37
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38179", "html_url": "https://github.com/huggingface/transformers/pull/38179", "diff_url": "https://github.com/huggingface/transformers/pull/38179.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38179.patch", "merged_at": "2025-05-19T10:03:37" }
Carved out from #38129, with a few upgrades. Reduces the verbosity of bad generation config attribute warnings by default, with an env variable to control verbosity. Although users might get unexpected results when these warnings exist, most of the time they are harmless, so let's be less verbose by default. ### Example Consider the following script, which will throw a warning: ```py from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "Qwen/Qwen3-0.6B" model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto") tokenizer = AutoTokenizer.from_pretrained(model_name) prompt = "Tell me a story about a cat:" inputs = tokenizer(prompt, return_tensors="pt").to(model.device) # This will throw warnings: there are sample-related attributes set in qwen3's generation config outputs = model.generate(**inputs, do_sample=False, max_new_tokens=1) ``` On main, we would get ``` /home/joao/transformers/src/transformers/generation/configuration_utils.py:636: UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `0.6` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`. warnings.warn( /home/joao/transformers/src/transformers/generation/configuration_utils.py:641: UserWarning: `do_sample` is set to `False`. However, `top_p` is set to `0.95` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_p`. warnings.warn( /home/joao/transformers/src/transformers/generation/configuration_utils.py:658: UserWarning: `do_sample` is set to `False`. However, `top_k` is set to `20` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_k`. warnings.warn( ``` With this PR, we get ``` The following generation flags are not valid and may be ignored: ['temperature', 'top_p', 'top_k']. Set `TRANSFORMERS_VERBOSITY=info` for more details. ``` If we run the script with `TRANSFORMERS_VERBOSITY=info`, we get ``` (... other non-generate info logs) The following generation flags are not valid and may be ignored: ['temperature', 'top_p', 'top_k']. - `temperature`: `do_sample` is set to `False`. However, `temperature` is set to `0.6` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`. - `top_p`: `do_sample` is set to `False`. However, `top_p` is set to `0.95` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_p`. - `top_k`: `do_sample` is set to `False`. However, `top_k` is set to `20` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_k`. If you're using a pretrained model, note that some of these attributes may be set through the model's `generation_config.json` file. ```
{ "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/38179/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/38179/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38178
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38178/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38178/comments
https://api.github.com/repos/huggingface/transformers/issues/38178/events
https://github.com/huggingface/transformers/pull/38178
3,069,130,455
PR_kwDOCUB6oc6WeyMU
38,178
Tensor parallel docs
{ "login": "S1ro1", "id": 54212263, "node_id": "MDQ6VXNlcjU0MjEyMjYz", "avatar_url": "https://avatars.githubusercontent.com/u/54212263?v=4", "gravatar_id": "", "url": "https://api.github.com/users/S1ro1", "html_url": "https://github.com/S1ro1", "followers_url": "https://api.github.com/users/S1ro1/followers", "following_url": "https://api.github.com/users/S1ro1/following{/other_user}", "gists_url": "https://api.github.com/users/S1ro1/gists{/gist_id}", "starred_url": "https://api.github.com/users/S1ro1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/S1ro1/subscriptions", "organizations_url": "https://api.github.com/users/S1ro1/orgs", "repos_url": "https://api.github.com/users/S1ro1/repos", "events_url": "https://api.github.com/users/S1ro1/events{/privacy}", "received_events_url": "https://api.github.com/users/S1ro1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T14:14:25
2025-05-19T17:05:02
2025-05-19T17:05:01
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38178", "html_url": "https://github.com/huggingface/transformers/pull/38178", "diff_url": "https://github.com/huggingface/transformers/pull/38178.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38178.patch", "merged_at": "2025-05-19T17:05:01" }
Improve the existing docs for tensor parallelism, with more details etc. Relies on #37877 (needs to be edit a tiny bit when final version of that PR lands). cc @ArthurZucker
{ "login": "S1ro1", "id": 54212263, "node_id": "MDQ6VXNlcjU0MjEyMjYz", "avatar_url": "https://avatars.githubusercontent.com/u/54212263?v=4", "gravatar_id": "", "url": "https://api.github.com/users/S1ro1", "html_url": "https://github.com/S1ro1", "followers_url": "https://api.github.com/users/S1ro1/followers", "following_url": "https://api.github.com/users/S1ro1/following{/other_user}", "gists_url": "https://api.github.com/users/S1ro1/gists{/gist_id}", "starred_url": "https://api.github.com/users/S1ro1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/S1ro1/subscriptions", "organizations_url": "https://api.github.com/users/S1ro1/orgs", "repos_url": "https://api.github.com/users/S1ro1/repos", "events_url": "https://api.github.com/users/S1ro1/events{/privacy}", "received_events_url": "https://api.github.com/users/S1ro1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38178/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38178/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38177
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38177/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38177/comments
https://api.github.com/repos/huggingface/transformers/issues/38177/events
https://github.com/huggingface/transformers/pull/38177
3,068,848,575
PR_kwDOCUB6oc6Wd1Kd
38,177
Disable `convert to draft` workflow
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T12:17:18
2025-05-16T12:42:16
2025-05-16T12:42:15
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38177", "html_url": "https://github.com/huggingface/transformers/pull/38177", "diff_url": "https://github.com/huggingface/transformers/pull/38177.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38177.patch", "merged_at": "2025-05-16T12:42:14" }
# What does this PR do? It causes too much issues and confusion. There is no working solution for now. I will contact CircleCI.
{ "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/38177/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38177/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38176
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38176/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38176/comments
https://api.github.com/repos/huggingface/transformers/issues/38176/events
https://github.com/huggingface/transformers/pull/38176
3,068,826,711
PR_kwDOCUB6oc6WdwgA
38,176
remove some commands from `fetch_tests` CircleCI job
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T12:07:40
2025-05-16T12:42:53
2025-05-16T12:42:51
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38176", "html_url": "https://github.com/huggingface/transformers/pull/38176", "diff_url": "https://github.com/huggingface/transformers/pull/38176.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38176.patch", "merged_at": "2025-05-16T12:42:51" }
# What does this PR do? `git log -n 1` sometimes get > Too long with no output (exceeded 10m0s): context deadline exceeded Those commands are only to show some information when working on some changes, we don't really need them.
{ "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/38176/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38176/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38175
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38175/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38175/comments
https://api.github.com/repos/huggingface/transformers/issues/38175/events
https://github.com/huggingface/transformers/issues/38175
3,068,593,888
I_kwDOCUB6oc625wbg
38,175
Unexpected Zero Probabilities with siglip2-base-patch16-224 Model
{ "login": "Magician6174", "id": 86114922, "node_id": "MDQ6VXNlcjg2MTE0OTIy", "avatar_url": "https://avatars.githubusercontent.com/u/86114922?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Magician6174", "html_url": "https://github.com/Magician6174", "followers_url": "https://api.github.com/users/Magician6174/followers", "following_url": "https://api.github.com/users/Magician6174/following{/other_user}", "gists_url": "https://api.github.com/users/Magician6174/gists{/gist_id}", "starred_url": "https://api.github.com/users/Magician6174/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Magician6174/subscriptions", "organizations_url": "https://api.github.com/users/Magician6174/orgs", "repos_url": "https://api.github.com/users/Magician6174/repos", "events_url": "https://api.github.com/users/Magician6174/events{/privacy}", "received_events_url": "https://api.github.com/users/Magician6174/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-16T10:18:19
2025-05-30T14:37:52
2025-05-30T13:57:13
NONE
null
null
null
null
### System Info ``` transformers version: 4.51.3 Platform: Linux Python version: 3.10.14 PyTorch version (GPU?): 2.2.2 (CUDA available: True) Huggingface Hub version: 0.31.2 Safetensors version: 0.5.3 Accelerate version: 1.7.0 Accelerate config: Not configured TensorFlow version (GPU?): Not installed Flax version (CPU?/GPU?/TPU?): Not installed JAX version: Not installed JAXLib version: Not installed ``` ### Who can help? @amyeroberts , @qubvel ### Information - [x] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [x] My own task or dataset (give details below) ### Reproduction Here's the code snippet that reproduces the issue: ``` from PIL import Image import requests from transformers import AutoProcessor, AutoModel import torch model = AutoModel.from_pretrained("google/siglip2-base-patch16-224") processor = AutoProcessor.from_pretrained("google/siglip2-base-patch16-224") url = "http://images.cocodataset.org/val2017/000000039769.jpg" image = Image.open(requests.get(url, stream=True).raw) texts = ["a photo of 2 cats", "a photo of 2 dogs"] # Important: we pass `padding=max_length` since the model was trained with this inputs = processor(text=texts, images=image, padding="max_length", return_tensors="pt") with torch.no_grad(): outputs = model(**inputs) logits_per_image = outputs.logits_per_image probs = torch.sigmoid(logits_per_image) # These are the probabilities print(f"{probs[0][0]:.1%} that image 0 is '{texts[0]}'") ``` ### Expected behavior Expected behavior: ``` 31.9% that image 0 is 'a photo of 2 cats' ``` Actual behavior: ``` 0.0% that image 0 is 'a photo of 2 cats' ``` Additional context: - The issue persists across multiple runs and environments. - No modifications have been made to the model or processor. - The problem arises when using the official example scripts provided in the documentation.
{ "login": "Magician6174", "id": 86114922, "node_id": "MDQ6VXNlcjg2MTE0OTIy", "avatar_url": "https://avatars.githubusercontent.com/u/86114922?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Magician6174", "html_url": "https://github.com/Magician6174", "followers_url": "https://api.github.com/users/Magician6174/followers", "following_url": "https://api.github.com/users/Magician6174/following{/other_user}", "gists_url": "https://api.github.com/users/Magician6174/gists{/gist_id}", "starred_url": "https://api.github.com/users/Magician6174/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Magician6174/subscriptions", "organizations_url": "https://api.github.com/users/Magician6174/orgs", "repos_url": "https://api.github.com/users/Magician6174/repos", "events_url": "https://api.github.com/users/Magician6174/events{/privacy}", "received_events_url": "https://api.github.com/users/Magician6174/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38175/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38175/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/38174
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38174/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38174/comments
https://api.github.com/repos/huggingface/transformers/issues/38174/events
https://github.com/huggingface/transformers/pull/38174
3,068,465,512
PR_kwDOCUB6oc6Wch5O
38,174
Fix import torchao.prototype.low_bit_optim since torchao v0.11
{ "login": "baptxste", "id": 85432492, "node_id": "MDQ6VXNlcjg1NDMyNDky", "avatar_url": "https://avatars.githubusercontent.com/u/85432492?v=4", "gravatar_id": "", "url": "https://api.github.com/users/baptxste", "html_url": "https://github.com/baptxste", "followers_url": "https://api.github.com/users/baptxste/followers", "following_url": "https://api.github.com/users/baptxste/following{/other_user}", "gists_url": "https://api.github.com/users/baptxste/gists{/gist_id}", "starred_url": "https://api.github.com/users/baptxste/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/baptxste/subscriptions", "organizations_url": "https://api.github.com/users/baptxste/orgs", "repos_url": "https://api.github.com/users/baptxste/repos", "events_url": "https://api.github.com/users/baptxste/events{/privacy}", "received_events_url": "https://api.github.com/users/baptxste/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T09:24:30
2025-05-16T16:02:33
2025-05-16T16:02:33
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38174", "html_url": "https://github.com/huggingface/transformers/pull/38174", "diff_url": "https://github.com/huggingface/transformers/pull/38174.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38174.patch", "merged_at": "2025-05-16T16:02:33" }
# What does this PR do? Update import path of AdamW4bit and AdamW8bit for torchao >= 0.11.0
{ "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/38174/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38174/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38173
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38173/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38173/comments
https://api.github.com/repos/huggingface/transformers/issues/38173/events
https://github.com/huggingface/transformers/pull/38173
3,068,449,975
PR_kwDOCUB6oc6WcejK
38,173
[WIP] new BLT
{ "login": "itazap", "id": 31893021, "node_id": "MDQ6VXNlcjMxODkzMDIx", "avatar_url": "https://avatars.githubusercontent.com/u/31893021?v=4", "gravatar_id": "", "url": "https://api.github.com/users/itazap", "html_url": "https://github.com/itazap", "followers_url": "https://api.github.com/users/itazap/followers", "following_url": "https://api.github.com/users/itazap/following{/other_user}", "gists_url": "https://api.github.com/users/itazap/gists{/gist_id}", "starred_url": "https://api.github.com/users/itazap/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/itazap/subscriptions", "organizations_url": "https://api.github.com/users/itazap/orgs", "repos_url": "https://api.github.com/users/itazap/repos", "events_url": "https://api.github.com/users/itazap/events{/privacy}", "received_events_url": "https://api.github.com/users/itazap/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-05-16T09:18:16
2025-05-30T09:26:28
null
COLLABORATOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38173", "html_url": "https://github.com/huggingface/transformers/pull/38173", "diff_url": "https://github.com/huggingface/transformers/pull/38173.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38173.patch", "merged_at": null }
null
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38173/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38173/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/38172
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38172/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38172/comments
https://api.github.com/repos/huggingface/transformers/issues/38172/events
https://github.com/huggingface/transformers/pull/38172
3,068,445,977
PR_kwDOCUB6oc6WcdsU
38,172
Fix ModuleNotFoundError torchao.prototype.low_bit_optim since torchao > 0.11.0
{ "login": "baptxste", "id": 85432492, "node_id": "MDQ6VXNlcjg1NDMyNDky", "avatar_url": "https://avatars.githubusercontent.com/u/85432492?v=4", "gravatar_id": "", "url": "https://api.github.com/users/baptxste", "html_url": "https://github.com/baptxste", "followers_url": "https://api.github.com/users/baptxste/followers", "following_url": "https://api.github.com/users/baptxste/following{/other_user}", "gists_url": "https://api.github.com/users/baptxste/gists{/gist_id}", "starred_url": "https://api.github.com/users/baptxste/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/baptxste/subscriptions", "organizations_url": "https://api.github.com/users/baptxste/orgs", "repos_url": "https://api.github.com/users/baptxste/repos", "events_url": "https://api.github.com/users/baptxste/events{/privacy}", "received_events_url": "https://api.github.com/users/baptxste/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T09:16:41
2025-05-16T09:20:10
2025-05-16T09:20:10
CONTRIBUTOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38172", "html_url": "https://github.com/huggingface/transformers/pull/38172", "diff_url": "https://github.com/huggingface/transformers/pull/38172.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38172.patch", "merged_at": null }
# What does this PR do? Update import path of AdamW4bit and AdamW8bit for torchao > 0.11.0
{ "login": "baptxste", "id": 85432492, "node_id": "MDQ6VXNlcjg1NDMyNDky", "avatar_url": "https://avatars.githubusercontent.com/u/85432492?v=4", "gravatar_id": "", "url": "https://api.github.com/users/baptxste", "html_url": "https://github.com/baptxste", "followers_url": "https://api.github.com/users/baptxste/followers", "following_url": "https://api.github.com/users/baptxste/following{/other_user}", "gists_url": "https://api.github.com/users/baptxste/gists{/gist_id}", "starred_url": "https://api.github.com/users/baptxste/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/baptxste/subscriptions", "organizations_url": "https://api.github.com/users/baptxste/orgs", "repos_url": "https://api.github.com/users/baptxste/repos", "events_url": "https://api.github.com/users/baptxste/events{/privacy}", "received_events_url": "https://api.github.com/users/baptxste/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38172/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38172/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38171
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38171/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38171/comments
https://api.github.com/repos/huggingface/transformers/issues/38171/events
https://github.com/huggingface/transformers/pull/38171
3,068,443,153
PR_kwDOCUB6oc6WcdEh
38,171
Disable `Trigger CircleCI by ready for review`
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T09:15:33
2025-05-16T12:02:50
2025-05-16T12:02:48
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38171", "html_url": "https://github.com/huggingface/transformers/pull/38171", "diff_url": "https://github.com/huggingface/transformers/pull/38171.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38171.patch", "merged_at": "2025-05-16T12:02:48" }
# What does this PR do? Disable `Trigger CircleCI by ready for review`
{ "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/38171/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38171/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38170
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38170/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38170/comments
https://api.github.com/repos/huggingface/transformers/issues/38170/events
https://github.com/huggingface/transformers/pull/38170
3,068,346,882
PR_kwDOCUB6oc6WcIGa
38,170
[don't merge]
{ "login": "ydshieh2", "id": 183479141, "node_id": "U_kgDOCu-rZQ", "avatar_url": "https://avatars.githubusercontent.com/u/183479141?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh2", "html_url": "https://github.com/ydshieh2", "followers_url": "https://api.github.com/users/ydshieh2/followers", "following_url": "https://api.github.com/users/ydshieh2/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh2/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh2/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh2/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh2/orgs", "repos_url": "https://api.github.com/users/ydshieh2/repos", "events_url": "https://api.github.com/users/ydshieh2/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh2/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T08:37:27
2025-05-16T08:51:05
2025-05-16T08:51:05
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38170", "html_url": "https://github.com/huggingface/transformers/pull/38170", "diff_url": "https://github.com/huggingface/transformers/pull/38170.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38170.patch", "merged_at": null }
# What does this PR 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/38170/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38170/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38169
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38169/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38169/comments
https://api.github.com/repos/huggingface/transformers/issues/38169/events
https://github.com/huggingface/transformers/pull/38169
3,068,326,786
PR_kwDOCUB6oc6WcDrH
38,169
[don't merge]
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T08:30:04
2025-05-16T08:42:41
2025-05-16T08:33:39
COLLABORATOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38169", "html_url": "https://github.com/huggingface/transformers/pull/38169", "diff_url": "https://github.com/huggingface/transformers/pull/38169.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38169.patch", "merged_at": null }
# What does this PR 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/38169/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38169/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38168
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38168/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38168/comments
https://api.github.com/repos/huggingface/transformers/issues/38168/events
https://github.com/huggingface/transformers/pull/38168
3,067,892,971
PR_kwDOCUB6oc6WanDF
38,168
Add adam_kwargs for Apollo Optimizer
{ "login": "DaizeDong", "id": 113810510, "node_id": "U_kgDOBsicTg", "avatar_url": "https://avatars.githubusercontent.com/u/113810510?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DaizeDong", "html_url": "https://github.com/DaizeDong", "followers_url": "https://api.github.com/users/DaizeDong/followers", "following_url": "https://api.github.com/users/DaizeDong/following{/other_user}", "gists_url": "https://api.github.com/users/DaizeDong/gists{/gist_id}", "starred_url": "https://api.github.com/users/DaizeDong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DaizeDong/subscriptions", "organizations_url": "https://api.github.com/users/DaizeDong/orgs", "repos_url": "https://api.github.com/users/DaizeDong/repos", "events_url": "https://api.github.com/users/DaizeDong/events{/privacy}", "received_events_url": "https://api.github.com/users/DaizeDong/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T04:20:28
2025-05-19T09:00:20
2025-05-19T08:59:49
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38168", "html_url": "https://github.com/huggingface/transformers/pull/38168", "diff_url": "https://github.com/huggingface/transformers/pull/38168.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38168.patch", "merged_at": "2025-05-19T08:59:49" }
# What does this PR do? Added adam_kwargs for the Apollo optimizer. The [apollow_adamw](https://github.com/zhuhanqing/APOLLO/blob/main/apollo_torch/adamw.py#L41) optimizer is built based on the AdamW. It also takes kwargs for AdamW during initialization. This PR fixes the missing kwargs for it. ## 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? @zhuhanqing <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "SunMarc", "id": 57196510, "node_id": "MDQ6VXNlcjU3MTk2NTEw", "avatar_url": "https://avatars.githubusercontent.com/u/57196510?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SunMarc", "html_url": "https://github.com/SunMarc", "followers_url": "https://api.github.com/users/SunMarc/followers", "following_url": "https://api.github.com/users/SunMarc/following{/other_user}", "gists_url": "https://api.github.com/users/SunMarc/gists{/gist_id}", "starred_url": "https://api.github.com/users/SunMarc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SunMarc/subscriptions", "organizations_url": "https://api.github.com/users/SunMarc/orgs", "repos_url": "https://api.github.com/users/SunMarc/repos", "events_url": "https://api.github.com/users/SunMarc/events{/privacy}", "received_events_url": "https://api.github.com/users/SunMarc/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38168/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38168/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38167
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38167/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38167/comments
https://api.github.com/repos/huggingface/transformers/issues/38167/events
https://github.com/huggingface/transformers/pull/38167
3,067,825,821
PR_kwDOCUB6oc6WaY4G
38,167
enable autoround cases on XPU
{ "login": "yao-matrix", "id": 7245027, "node_id": "MDQ6VXNlcjcyNDUwMjc=", "avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yao-matrix", "html_url": "https://github.com/yao-matrix", "followers_url": "https://api.github.com/users/yao-matrix/followers", "following_url": "https://api.github.com/users/yao-matrix/following{/other_user}", "gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}", "starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions", "organizations_url": "https://api.github.com/users/yao-matrix/orgs", "repos_url": "https://api.github.com/users/yao-matrix/repos", "events_url": "https://api.github.com/users/yao-matrix/events{/privacy}", "received_events_url": "https://api.github.com/users/yao-matrix/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T03:18:09
2025-05-18T22:43:18
2025-05-16T09:08:35
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38167", "html_url": "https://github.com/huggingface/transformers/pull/38167", "diff_url": "https://github.com/huggingface/transformers/pull/38167.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38167.patch", "merged_at": "2025-05-16T09:08:35" }
@ydshieh @IlyasMoutawwakil , pls help review
{ "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/38167/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38167/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38166
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38166/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38166/comments
https://api.github.com/repos/huggingface/transformers/issues/38166/events
https://github.com/huggingface/transformers/pull/38166
3,067,813,944
PR_kwDOCUB6oc6WaWY-
38,166
fix bug in distributed loss test
{ "login": "techkang", "id": 22956582, "node_id": "MDQ6VXNlcjIyOTU2NTgy", "avatar_url": "https://avatars.githubusercontent.com/u/22956582?v=4", "gravatar_id": "", "url": "https://api.github.com/users/techkang", "html_url": "https://github.com/techkang", "followers_url": "https://api.github.com/users/techkang/followers", "following_url": "https://api.github.com/users/techkang/following{/other_user}", "gists_url": "https://api.github.com/users/techkang/gists{/gist_id}", "starred_url": "https://api.github.com/users/techkang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/techkang/subscriptions", "organizations_url": "https://api.github.com/users/techkang/orgs", "repos_url": "https://api.github.com/users/techkang/repos", "events_url": "https://api.github.com/users/techkang/events{/privacy}", "received_events_url": "https://api.github.com/users/techkang/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T03:06:27
2025-05-16T16:22:07
2025-05-16T16:21:35
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38166", "html_url": "https://github.com/huggingface/transformers/pull/38166", "diff_url": "https://github.com/huggingface/transformers/pull/38166.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38166.patch", "merged_at": "2025-05-16T16:21:35" }
# What does this PR do? Fixes distributed loss test failed as mentioned in https://github.com/huggingface/transformers/pull/35743#issuecomment-2883577747 ## 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? @ydshieh @muellerzr @ @SunMarc ## Tests on 2 GPUs: base_loss: [8.4486, 9.0954, 7.8702, 7.9928, 7.2161, 8.3778, 8.0487, 6.1117, 7.283, 6.4819] broken_loss: [8.4486, 9.3632, 7.6003, 7.4984, 6.6267, 7.4892, 7.9702, 5.6609, 6.8272, 6.3275] fixed_loss: [8.4486, 9.0954, 7.8702, 7.9928, 7.2161, 8.3778, 8.0487, 6.1117, 7.283, 6.4819] ## Tests on 8 GPUs: base_loss: [9.1648, 8.8716, 7.6154, 7.4581, 6.6029, 6.2143, 5.2902, 5.4008, 5.253, 4.9834] broken_loss: [9.387, 8.7627, 7.7227, 9.42, 7.2081, 5.9345, 5.0765, 6.0079, 4.9359, 5.4696] fixed_loss: [9.1648, 8.8716, 7.6154, 7.4581, 6.6029, 6.2143, 5.2902, 5.4008, 5.253, 4.9834] ## Others I accidentally closed https://github.com/huggingface/transformers/pull/36987. So I add the doc fix in this PR.
{ "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/38166/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38166/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38165
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38165/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38165/comments
https://api.github.com/repos/huggingface/transformers/issues/38165/events
https://github.com/huggingface/transformers/issues/38165
3,067,711,462
I_kwDOCUB6oc622Y_m
38,165
Gemma 3 Pipeline does not accept dictionary with no images
{ "login": "sheldonlai", "id": 11727870, "node_id": "MDQ6VXNlcjExNzI3ODcw", "avatar_url": "https://avatars.githubusercontent.com/u/11727870?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sheldonlai", "html_url": "https://github.com/sheldonlai", "followers_url": "https://api.github.com/users/sheldonlai/followers", "following_url": "https://api.github.com/users/sheldonlai/following{/other_user}", "gists_url": "https://api.github.com/users/sheldonlai/gists{/gist_id}", "starred_url": "https://api.github.com/users/sheldonlai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sheldonlai/subscriptions", "organizations_url": "https://api.github.com/users/sheldonlai/orgs", "repos_url": "https://api.github.com/users/sheldonlai/repos", "events_url": "https://api.github.com/users/sheldonlai/events{/privacy}", "received_events_url": "https://api.github.com/users/sheldonlai/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-16T01:34:15
2025-06-23T08:03:03
2025-06-23T08:03:03
NONE
null
null
null
null
### System Info System info not really relevant as the bug is root caused in my description below. - `transformers` version: 4.51.3 - Platform: Windows-10-10.0.26100-SP0 - Python version: 3.11.9 - Huggingface_hub version: 0.31.2 - Safetensors version: 0.5.3 - Accelerate version: 1.7.0 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (GPU?): 2.4.0+cu121 (True) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using distributed or parallel set-up in script?: <fill in> - Using GPU in script:Yes - GPU type: NVIDIA GeForce RTX 3090 ### Who can help? _No response_ ### Information - [ ] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction This issue can be created using the following snippet copied from Gemma 3 docs and up until transformer 4.51.3. ``` from transformers import pipeline import torch pipe = pipeline( "image-text-to-text", model="google/gemma-3-12b-it", device="cuda", # Or "cpu" if you don't have a compatible GPU torch_dtype=torch.bfloat16 # Or torch.float16 or torch.float32 based on your hardware/needs ) messages = [ { "role": "system", "content": [{"type": "text", "text": "You are a helpful assistant."}] }, { "role": "user", "content": [ # Removed the image link from the example {"type": "text", "text": "What is the capital of France?"} # Keep only the text part ] } ] output = pipe(text=messages, max_new_tokens=200) print(output[0]["generated_text"][-1]["content"]) ``` which will result in the error: ``` Traceback (most recent call last): File "D:\experiments\personal\gemma_editor\gemma_editor.py", line 78, in <module> run_gemma(SENTENCES) File "D:\experiments\personal\gemma_editor\gemma_editor.py", line 41, in run_gemma output = pipe(text=messages) ^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\pipelines\image_text_to_text.py", line 311, in __call__ return super().__call__(Chat(text, images), **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\pipelines\base.py", line 1379, in __call__ return self.run_single(inputs, preprocess_params, forward_params, postprocess_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\pipelines\base.py", line 1385, in run_single model_inputs = self.preprocess(inputs, **preprocess_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\pipelines\image_text_to_text.py", line 365, in preprocess model_inputs = self.processor(images=images, text=text, return_tensors=self.framework, **processing_kwargs).to( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\models\gemma3\processing_gemma3.py", line 106, in __call__ image_inputs = self.image_processor(batched_images, **output_kwargs["images_kwargs"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\image_processing_utils.py", line 42, in __call__ return self.preprocess(images, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\utils\generic.py", line 866, in wrapper return func(*args, **valid_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\experiments\personal\gemma_editor\venv\Lib\site-packages\transformers\models\gemma3\image_processing_gemma3.py", line 361, in preprocess if do_rescale and is_scaled_image(images[0]): ~~~~~~^^^ IndexError: list index out of range ``` ### Expected behavior The problem here is that within image_text_to_text, the dictionary is made into type: Chat. [By default chat makes images an empty list](https://github.com/huggingface/transformers/blame/v4.51.3/src/transformers/pipelines/image_text_to_text.py#L114). Then this is propagated to [images](https://github.com/huggingface/transformers/blame/v4.51.3/src/transformers/pipelines/image_text_to_text.py#L353C16-L353C39) where it ultimately lands in processing_gemma_3.py where the [if condition only checks if the images are None](https://github.com/huggingface/transformers/blob/v4.51.3/src/transformers/models/gemma3/processing_gemma3.py#L102), but as we observed from the upstream code, it is set as an empty list. It looks like in the main branch, images may no longer be set processor with Chat typed input directly, but I believe that processing_gemma3 should just handle empty list to avoid future bugs.
{ "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/38165/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38165/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/38164
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38164/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38164/comments
https://api.github.com/repos/huggingface/transformers/issues/38164/events
https://github.com/huggingface/transformers/issues/38164
3,067,667,476
I_kwDOCUB6oc622OQU
38,164
Start too many processes when run AutoModelForCausalLM.from_pretrained()
{ "login": "SidneyLann", "id": 5990314, "node_id": "MDQ6VXNlcjU5OTAzMTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/5990314?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SidneyLann", "html_url": "https://github.com/SidneyLann", "followers_url": "https://api.github.com/users/SidneyLann/followers", "following_url": "https://api.github.com/users/SidneyLann/following{/other_user}", "gists_url": "https://api.github.com/users/SidneyLann/gists{/gist_id}", "starred_url": "https://api.github.com/users/SidneyLann/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SidneyLann/subscriptions", "organizations_url": "https://api.github.com/users/SidneyLann/orgs", "repos_url": "https://api.github.com/users/SidneyLann/repos", "events_url": "https://api.github.com/users/SidneyLann/events{/privacy}", "received_events_url": "https://api.github.com/users/SidneyLann/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-16T00:51:10
2025-05-18T13:43:23
2025-05-18T13:43:22
NONE
null
null
null
null
### System Info - `transformers` version: 4.51.3 - Platform: Linux-6.12.0-58.el10.x86_64-x86_64-with-glibc2.39 - Python version: 3.12.9 - Huggingface_hub version: 0.31.2 - Safetensors version: 0.5.3 - Accelerate version: 1.5.2 - Accelerate config: not found - DeepSpeed version: not installed - PyTorch version (GPU?): 2.6.0+cu124 (True) - Tensorflow version (GPU?): 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 GTX 1080 Ti - huggingface_hub version: 0.31.2 - Platform: Linux-6.12.0-58.el10.x86_64-x86_64-with-glibc2.39 - Python version: 3.12.9 - Running in iPython ?: No - Running in notebook ?: No - Running in Google Colab ?: No - Running in Google Colab Enterprise ?: No - Token path ?: /home/sidney/.cache/huggingface/token - Has saved token ?: False - Configured git credential helpers: - FastAI: N/A - Tensorflow: N/A - Torch: 2.6.0 - Jinja2: 3.1.6 - Graphviz: N/A - keras: N/A - Pydot: N/A - Pillow: 10.3.0 - hf_transfer: 0.1.8 - gradio: N/A - tensorboard: N/A - numpy: 1.26.4 - pydantic: 2.10.6 - aiohttp: 3.11.14 - hf_xet: N/A - ENDPOINT: https://huggingface.co - HF_HUB_CACHE: /home/sidney/.cache/huggingface/hub - HF_ASSETS_CACHE: /home/sidney/.cache/huggingface/assets - HF_TOKEN_PATH: /home/sidney/.cache/huggingface/token - HF_STORED_TOKENS_PATH: /home/sidney/.cache/huggingface/stored_tokens - HF_HUB_OFFLINE: False - HF_HUB_DISABLE_TELEMETRY: False - HF_HUB_DISABLE_PROGRESS_BARS: None - HF_HUB_DISABLE_SYMLINKS_WARNING: False - HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False - HF_HUB_DISABLE_IMPLICIT_TOKEN: False - HF_HUB_ENABLE_HF_TRANSFER: False - HF_HUB_ETAG_TIMEOUT: 10 - HF_HUB_DOWNLOAD_TIMEOUT: 10 ### 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 ![Image](https://github.com/user-attachments/assets/b42b8b43-e208-4c44-97d1-cd0225ebd446) ![Image](https://github.com/user-attachments/assets/dfcd499b-3e8f-405c-ab77-863e876e4c0b) from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained( "/d/dev/model_root/llama_31_8b", device_map="auto" ) When run above code to load original llama3.1 8b model, too many processes start, this should not be normal. this causes the finetune or inferenc very slow. ### Expected behavior should run 1 or 2 processes.
{ "login": "SidneyLann", "id": 5990314, "node_id": "MDQ6VXNlcjU5OTAzMTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/5990314?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SidneyLann", "html_url": "https://github.com/SidneyLann", "followers_url": "https://api.github.com/users/SidneyLann/followers", "following_url": "https://api.github.com/users/SidneyLann/following{/other_user}", "gists_url": "https://api.github.com/users/SidneyLann/gists{/gist_id}", "starred_url": "https://api.github.com/users/SidneyLann/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SidneyLann/subscriptions", "organizations_url": "https://api.github.com/users/SidneyLann/orgs", "repos_url": "https://api.github.com/users/SidneyLann/repos", "events_url": "https://api.github.com/users/SidneyLann/events{/privacy}", "received_events_url": "https://api.github.com/users/SidneyLann/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38164/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38164/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/38163
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38163/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38163/comments
https://api.github.com/repos/huggingface/transformers/issues/38163/events
https://github.com/huggingface/transformers/pull/38163
3,067,635,433
PR_kwDOCUB6oc6WZxaj
38,163
clean autoawq cases on xpu
{ "login": "yao-matrix", "id": 7245027, "node_id": "MDQ6VXNlcjcyNDUwMjc=", "avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yao-matrix", "html_url": "https://github.com/yao-matrix", "followers_url": "https://api.github.com/users/yao-matrix/followers", "following_url": "https://api.github.com/users/yao-matrix/following{/other_user}", "gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}", "starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions", "organizations_url": "https://api.github.com/users/yao-matrix/orgs", "repos_url": "https://api.github.com/users/yao-matrix/repos", "events_url": "https://api.github.com/users/yao-matrix/events{/privacy}", "received_events_url": "https://api.github.com/users/yao-matrix/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-16T00:19:46
2025-05-18T22:42:23
2025-05-16T11:56:43
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38163", "html_url": "https://github.com/huggingface/transformers/pull/38163", "diff_url": "https://github.com/huggingface/transformers/pull/38163.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38163.patch", "merged_at": "2025-05-16T11:56:43" }
for some fused test cases, since in `autoawq`, they are using [`flash_attn_func`](https://github.com/casper-hansen/AutoAWQ/blob/main/awq/modules/fused/attn.py#L270) from [`flash_attn`](https://github.com/casper-hansen/AutoAWQ/blob/main/awq/modules/fused/attn.py#L11), XPU hasn't support flash attention yet, and since `autoawq` already archived, we don't have ways to upstream `ipex` kernel to `autoawq`. So, i put these cases back to `gpu` with `require_flash_attn` decorator. Will re-enable it after we upstreamed `flash-attn` succesfully. @ydshieh @IlyasMoutawwakil , pls help review, thx.
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38163/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38163/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38162
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38162/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38162/comments
https://api.github.com/repos/huggingface/transformers/issues/38162/events
https://github.com/huggingface/transformers/pull/38162
3,067,395,465
PR_kwDOCUB6oc6WY-eq
38,162
Add `Llama4TextModel` to `AutoModel` mapping
{ "login": "ringohoffman", "id": 27844407, "node_id": "MDQ6VXNlcjI3ODQ0NDA3", "avatar_url": "https://avatars.githubusercontent.com/u/27844407?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ringohoffman", "html_url": "https://github.com/ringohoffman", "followers_url": "https://api.github.com/users/ringohoffman/followers", "following_url": "https://api.github.com/users/ringohoffman/following{/other_user}", "gists_url": "https://api.github.com/users/ringohoffman/gists{/gist_id}", "starred_url": "https://api.github.com/users/ringohoffman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ringohoffman/subscriptions", "organizations_url": "https://api.github.com/users/ringohoffman/orgs", "repos_url": "https://api.github.com/users/ringohoffman/repos", "events_url": "https://api.github.com/users/ringohoffman/events{/privacy}", "received_events_url": "https://api.github.com/users/ringohoffman/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T21:17:06
2025-05-20T10:01:00
2025-05-20T10:01:00
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38162", "html_url": "https://github.com/huggingface/transformers/pull/38162", "diff_url": "https://github.com/huggingface/transformers/pull/38162.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38162.patch", "merged_at": "2025-05-20T10:01:00" }
# What does this PR do? Using `Llama4TextConfig` on `AutoModel.from_config` raises a `ValueError` when it is expected to instantiate a `Llama4TextModel`. This PR adds `Llama4TextModel` to the `AutoModel` mapping. ```python import accelerate import transformers config = transformers.AutoConfig.from_pretrained("/models/meta-llama/Llama-4-Scout-17B-16E-Instruct").get_text_config(decoder=True) with accelerate.init_empty_weights(): model = transformers.AutoModel.from_config(config) # ValueError: Unrecognized configuration class <class 'transformers.models.llama4.configuration_llama4.Llama4TextConfig'> for this kind of AutoModel: AutoModel. ``` ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 --> @ArthurZucker @gante @Rocketknight1
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38162/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38162/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38161
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38161/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38161/comments
https://api.github.com/repos/huggingface/transformers/issues/38161/events
https://github.com/huggingface/transformers/pull/38161
3,067,251,379
PR_kwDOCUB6oc6WYfLj
38,161
Fix handling of slow/fast image processors in image_processing_auto.py
{ "login": "yonigozlan", "id": 74535834, "node_id": "MDQ6VXNlcjc0NTM1ODM0", "avatar_url": "https://avatars.githubusercontent.com/u/74535834?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yonigozlan", "html_url": "https://github.com/yonigozlan", "followers_url": "https://api.github.com/users/yonigozlan/followers", "following_url": "https://api.github.com/users/yonigozlan/following{/other_user}", "gists_url": "https://api.github.com/users/yonigozlan/gists{/gist_id}", "starred_url": "https://api.github.com/users/yonigozlan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yonigozlan/subscriptions", "organizations_url": "https://api.github.com/users/yonigozlan/orgs", "repos_url": "https://api.github.com/users/yonigozlan/repos", "events_url": "https://api.github.com/users/yonigozlan/events{/privacy}", "received_events_url": "https://api.github.com/users/yonigozlan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T19:56:10
2025-05-28T16:00:23
2025-05-28T16:00:23
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38161", "html_url": "https://github.com/huggingface/transformers/pull/38161", "diff_url": "https://github.com/huggingface/transformers/pull/38161.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38161.patch", "merged_at": "2025-05-28T16:00:23" }
# What does this PR do? Fixes https://github.com/huggingface/transformers/issues/37375 Raise relevant error when torchvision is not available and an image processor has only a fast version (like Llama4) instead of trying to fall back on a slow processor.
{ "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/38161/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38161/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38160
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38160/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38160/comments
https://api.github.com/repos/huggingface/transformers/issues/38160/events
https://github.com/huggingface/transformers/issues/38160
3,066,968,092
I_kwDOCUB6oc62zjgc
38,160
`tie_word_embeddings` not saved on customized model
{ "login": "Tavish9", "id": 73541181, "node_id": "MDQ6VXNlcjczNTQxMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/73541181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Tavish9", "html_url": "https://github.com/Tavish9", "followers_url": "https://api.github.com/users/Tavish9/followers", "following_url": "https://api.github.com/users/Tavish9/following{/other_user}", "gists_url": "https://api.github.com/users/Tavish9/gists{/gist_id}", "starred_url": "https://api.github.com/users/Tavish9/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Tavish9/subscriptions", "organizations_url": "https://api.github.com/users/Tavish9/orgs", "repos_url": "https://api.github.com/users/Tavish9/repos", "events_url": "https://api.github.com/users/Tavish9/events{/privacy}", "received_events_url": "https://api.github.com/users/Tavish9/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-15T17:37:06
2025-05-20T10:07:53
2025-05-20T10:07:53
CONTRIBUTOR
null
null
null
null
### System Info transformers_version: 4.52.0.dev0 python: 3.10 ### Who can help? @ArthurZucker @SunMarc @qubvel @zucchini-nlp ### Information - [ ] The official example scripts - [x] My own modified scripts ### Tasks - [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction ```python from transformers import AutoConfig, AutoModelForCausalLM, PretrainedConfig, PreTrainedModel, Trainer, TrainingArguments class MyConfig(PretrainedConfig): model_type = "test" sub_configs = {"text_config": AutoConfig} def __init__( self, text_config=None, **kwargs, ): self.text_config = text_config super().__init__(**kwargs) class MyModel(PreTrainedModel): config_class = MyConfig def __init__(self, config, language_model=None) -> None: super().__init__(config) self.language_model = language_model self.post_init() text_config = AutoConfig.from_pretrained("Qwen/Qwen3-8B") config = MyConfig(text_config=text_config) language_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B") model = MyModel(config, language_model) trainer = Trainer( model=model, args=TrainingArguments(), ) trainer.save_model() ``` ### Expected behavior The saved `config.json` has no `tie_word_embeddings` key Expected: ```json { "architectures": [ "MyModel" ], "model_type": "test", "text_config": { "_name_or_path": "Qwen/Qwen3-8B", "architectures": [ "Qwen3ForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 151643, "eos_token_id": 151645, "head_dim": 128, "hidden_act": "silu", "hidden_size": 1024, "initializer_range": 0.02, "intermediate_size": 3072, "max_position_embeddings": 40960, "max_window_layers": 28, "model_type": "qwen3", "num_attention_heads": 16, "num_hidden_layers": 28, "num_key_value_heads": 8, "rms_norm_eps": 1e-06, "rope_scaling": null, "rope_theta": 1000000, "sliding_window": null, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "use_cache": true, "use_sliding_window": false, "vocab_size": 151936 }, "torch_dtype": "float32", "transformers_version": "4.52.0.dev0" } ``` But: ```diff { "architectures": [ "MyModel" ], "model_type": "test", "text_config": { "_name_or_path": "Qwen/Qwen3-8B", "architectures": [ "Qwen3ForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 151643, "eos_token_id": 151645, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 12288, "max_position_embeddings": 40960, "max_window_layers": 36, "model_type": "qwen3", "num_attention_heads": 32, "num_hidden_layers": 36, "num_key_value_heads": 8, "rms_norm_eps": 1e-06, "rope_scaling": null, "rope_theta": 1000000, "sliding_window": null, - "tie_word_embeddings": false, "torch_dtype": "bfloat16", "use_cache": true, "use_sliding_window": false, "vocab_size": 151936 }, "torch_dtype": "float32", "transformers_version": "4.52.0.dev0" } ```
{ "login": "Tavish9", "id": 73541181, "node_id": "MDQ6VXNlcjczNTQxMTgx", "avatar_url": "https://avatars.githubusercontent.com/u/73541181?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Tavish9", "html_url": "https://github.com/Tavish9", "followers_url": "https://api.github.com/users/Tavish9/followers", "following_url": "https://api.github.com/users/Tavish9/following{/other_user}", "gists_url": "https://api.github.com/users/Tavish9/gists{/gist_id}", "starred_url": "https://api.github.com/users/Tavish9/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Tavish9/subscriptions", "organizations_url": "https://api.github.com/users/Tavish9/orgs", "repos_url": "https://api.github.com/users/Tavish9/repos", "events_url": "https://api.github.com/users/Tavish9/events{/privacy}", "received_events_url": "https://api.github.com/users/Tavish9/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38160/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38160/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/38159
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38159/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38159/comments
https://api.github.com/repos/huggingface/transformers/issues/38159/events
https://github.com/huggingface/transformers/pull/38159
3,066,908,535
PR_kwDOCUB6oc6WXVA9
38,159
Creating Flex Attention PR for personal documentation
{ "login": "mayankagarwals", "id": 39498938, "node_id": "MDQ6VXNlcjM5NDk4OTM4", "avatar_url": "https://avatars.githubusercontent.com/u/39498938?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mayankagarwals", "html_url": "https://github.com/mayankagarwals", "followers_url": "https://api.github.com/users/mayankagarwals/followers", "following_url": "https://api.github.com/users/mayankagarwals/following{/other_user}", "gists_url": "https://api.github.com/users/mayankagarwals/gists{/gist_id}", "starred_url": "https://api.github.com/users/mayankagarwals/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mayankagarwals/subscriptions", "organizations_url": "https://api.github.com/users/mayankagarwals/orgs", "repos_url": "https://api.github.com/users/mayankagarwals/repos", "events_url": "https://api.github.com/users/mayankagarwals/events{/privacy}", "received_events_url": "https://api.github.com/users/mayankagarwals/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T17:12:00
2025-05-15T17:12:55
2025-05-15T17:12:55
CONTRIBUTOR
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38159", "html_url": "https://github.com/huggingface/transformers/pull/38159", "diff_url": "https://github.com/huggingface/transformers/pull/38159.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38159.patch", "merged_at": null }
# What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "mayankagarwals", "id": 39498938, "node_id": "MDQ6VXNlcjM5NDk4OTM4", "avatar_url": "https://avatars.githubusercontent.com/u/39498938?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mayankagarwals", "html_url": "https://github.com/mayankagarwals", "followers_url": "https://api.github.com/users/mayankagarwals/followers", "following_url": "https://api.github.com/users/mayankagarwals/following{/other_user}", "gists_url": "https://api.github.com/users/mayankagarwals/gists{/gist_id}", "starred_url": "https://api.github.com/users/mayankagarwals/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mayankagarwals/subscriptions", "organizations_url": "https://api.github.com/users/mayankagarwals/orgs", "repos_url": "https://api.github.com/users/mayankagarwals/repos", "events_url": "https://api.github.com/users/mayankagarwals/events{/privacy}", "received_events_url": "https://api.github.com/users/mayankagarwals/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38159/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38159/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38158
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38158/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38158/comments
https://api.github.com/repos/huggingface/transformers/issues/38158/events
https://github.com/huggingface/transformers/pull/38158
3,066,659,268
PR_kwDOCUB6oc6WWfAP
38,158
[Examples] Add Comprehensive GPT2 vs DistilGPT2 Comparison with Perplexity and Benchmarks
{ "login": "sakthitharani", "id": 200588291, "node_id": "U_kgDOC_S8Aw", "avatar_url": "https://avatars.githubusercontent.com/u/200588291?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sakthitharani", "html_url": "https://github.com/sakthitharani", "followers_url": "https://api.github.com/users/sakthitharani/followers", "following_url": "https://api.github.com/users/sakthitharani/following{/other_user}", "gists_url": "https://api.github.com/users/sakthitharani/gists{/gist_id}", "starred_url": "https://api.github.com/users/sakthitharani/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sakthitharani/subscriptions", "organizations_url": "https://api.github.com/users/sakthitharani/orgs", "repos_url": "https://api.github.com/users/sakthitharani/repos", "events_url": "https://api.github.com/users/sakthitharani/events{/privacy}", "received_events_url": "https://api.github.com/users/sakthitharani/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T15:30:36
2025-05-16T13:30:04
2025-05-16T13:05:45
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38158", "html_url": "https://github.com/huggingface/transformers/pull/38158", "diff_url": "https://github.com/huggingface/transformers/pull/38158.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38158.patch", "merged_at": null }
## Summary This Pull Request introduces a comprehensive comparison example that evaluates `gpt2` and `distilgpt2` across multiple prompts, execution runs, model sizes, and language modeling quality (perplexity). ## Why This Is Useful - Benchmarks **model size, speed, and output quality**. - Measures **perplexity** on a standard evaluation dataset (wikitext-2). - Provides **execution time** for practical performance insights. - Displays **token and vocabulary richness**. - Shows **example outputs** for qualitative review. ## How to Run ```bash python examples/pytorch/text-generation/gpt2_vs_distilgpt2_comprehensive_comparison.py Example code snippet === Model: distilgpt2 === Model parameters: 82,117,280 Perplexity on wikitext-2 (5 samples): 35.45 Prompt: The future of AI is Generated Output: The future of AI is promising, with more applications emerging every day. Generation Time: 0.76 seconds Output Length (tokens): 16 Unique Token Count: 15
{ "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/38158/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38158/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38157
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38157/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38157/comments
https://api.github.com/repos/huggingface/transformers/issues/38157/events
https://github.com/huggingface/transformers/pull/38157
3,066,618,226
PR_kwDOCUB6oc6WWV_r
38,157
Add Idefics2/3 and SmolVLM Fast image processors + improvements for fast image processors
{ "login": "yonigozlan", "id": 74535834, "node_id": "MDQ6VXNlcjc0NTM1ODM0", "avatar_url": "https://avatars.githubusercontent.com/u/74535834?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yonigozlan", "html_url": "https://github.com/yonigozlan", "followers_url": "https://api.github.com/users/yonigozlan/followers", "following_url": "https://api.github.com/users/yonigozlan/following{/other_user}", "gists_url": "https://api.github.com/users/yonigozlan/gists{/gist_id}", "starred_url": "https://api.github.com/users/yonigozlan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yonigozlan/subscriptions", "organizations_url": "https://api.github.com/users/yonigozlan/orgs", "repos_url": "https://api.github.com/users/yonigozlan/repos", "events_url": "https://api.github.com/users/yonigozlan/events{/privacy}", "received_events_url": "https://api.github.com/users/yonigozlan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T15:17:43
2025-06-23T14:17:26
2025-06-23T14:17:26
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38157", "html_url": "https://github.com/huggingface/transformers/pull/38157", "diff_url": "https://github.com/huggingface/transformers/pull/38157.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38157.patch", "merged_at": "2025-06-23T14:17:26" }
# What does this PR do? Several things added to this PR: - Idefics2/3 + smolvlm fast image processors. Cc @andimarafioti :) - Improvements in the base fast image processors to better handle nested images - group_images_by_shape and reorder_images can now handle nested images, flattening them for processing then rebuilding the original nesting - Improvements/uniformization to fast image processor tests (use torch.testing.assertclose) - Disable grouping by default when processing on cpu, enable it on gpu for all processors. As the benchmarks below suggests, it seems that grouping images when processing on cpu is almost always slower, but almost always faster on gpu. This seems to be the case for other image processors as well. Thanks a lot to @sushmanthreddy and @rootonchair for their PRs on idefics2/3 image processors ([here](https://github.com/huggingface/transformers/pull/37168) and [here](https://github.com/huggingface/transformers/pull/37045)) Here are the results for idefics2 and idefics3/smolvlm: Idefics2 time per images: - ![time_per_image_all_configs](https://github.com/user-attachments/assets/0fd64b0b-5726-4550-82b3-19055828fda7) With different image sizes: | | | |:-------------------------:|:-------------------------:| | ![time_per_image_all_configs](https://github.com/user-attachments/assets/0fd64b0b-5726-4550-82b3-19055828fda7) | ![time_per_image_all_configs](https://github.com/user-attachments/assets/33ee0da1-1523-4a9f-ba4e-c8d535308579) | |![time_per_image_all_configs](https://github.com/user-attachments/assets/8d908a5c-fdda-495e-9236-863bd9bdd595) |![time_per_image_all_configs](https://github.com/user-attachments/assets/3eeb6f50-01d3-4166-9ebd-edd11efe540b) | Idefics2 speedups: - ![speedup_vs_slow](https://github.com/user-attachments/assets/164cd8fb-a5de-48ee-bc0c-8fd3f4398e0a) With different image sizes: | | | |:-------------------------:|:-------------------------:| | ![speedup_vs_slow](https://github.com/user-attachments/assets/164cd8fb-a5de-48ee-bc0c-8fd3f4398e0a) | ![speedup_vs_slow](https://github.com/user-attachments/assets/fdeebec3-83ba-4d92-aa9a-e2ce27f2394b) | |![speedup_vs_slow](https://github.com/user-attachments/assets/f9f2d649-23f7-4880-984f-ba9b382a273f) |![speedup_vs_slow](https://github.com/user-attachments/assets/712ed79c-0113-439b-8f34-2dba08d4c405)| Idefics3/SmolVLM time per images: - ![time_per_image_all_configs](https://github.com/user-attachments/assets/79374c19-2902-4927-95bf-13a4b74cd5cb) With different image sizes: | | | |:-------------------------:|:-------------------------:| |![time_per_image_all_configs](https://github.com/user-attachments/assets/79374c19-2902-4927-95bf-13a4b74cd5cb) |![time_per_image_all_configs](https://github.com/user-attachments/assets/20d1723d-ddb7-492f-9557-2a72ee5680f4) | |![time_per_image_all_configs](https://github.com/user-attachments/assets/18153f14-f4f0-4391-8edb-5ea9e8bb233f) |![time_per_image_all_configs](https://github.com/user-attachments/assets/806cf717-a1aa-4bed-bf1a-371658400541) | Idefics3/SmolVLM speedups: - ![speedup_vs_slow](https://github.com/user-attachments/assets/653b7aff-48e7-40f7-90c0-1ee123e48153) With different image sizes: | | | |:-------------------------:|:-------------------------:| | ![speedup_vs_slow](https://github.com/user-attachments/assets/653b7aff-48e7-40f7-90c0-1ee123e48153) | ![speedup_vs_slow](https://github.com/user-attachments/assets/7ba3ffaf-8f9e-4032-990c-899b4882f167) | |![speedup_vs_slow](https://github.com/user-attachments/assets/1ca4b285-258d-45bd-9eca-7e0b4f17bb28) |![speedup_vs_slow](https://github.com/user-attachments/assets/c19e9b25-2c83-4545-ad04-5a3c20d6b0be)|
{ "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/38157/reactions", "total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 3, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38157/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38156
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38156/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38156/comments
https://api.github.com/repos/huggingface/transformers/issues/38156/events
https://github.com/huggingface/transformers/pull/38156
3,066,534,258
PR_kwDOCUB6oc6WWDjB
38,156
Avoid incorrect generations for KV caches containing more than sliding_window tokens
{ "login": "TimFelixBeyer", "id": 35711942, "node_id": "MDQ6VXNlcjM1NzExOTQy", "avatar_url": "https://avatars.githubusercontent.com/u/35711942?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TimFelixBeyer", "html_url": "https://github.com/TimFelixBeyer", "followers_url": "https://api.github.com/users/TimFelixBeyer/followers", "following_url": "https://api.github.com/users/TimFelixBeyer/following{/other_user}", "gists_url": "https://api.github.com/users/TimFelixBeyer/gists{/gist_id}", "starred_url": "https://api.github.com/users/TimFelixBeyer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TimFelixBeyer/subscriptions", "organizations_url": "https://api.github.com/users/TimFelixBeyer/orgs", "repos_url": "https://api.github.com/users/TimFelixBeyer/repos", "events_url": "https://api.github.com/users/TimFelixBeyer/events{/privacy}", "received_events_url": "https://api.github.com/users/TimFelixBeyer/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T14:51:14
2025-10-01T12:47:28
2025-10-01T12:47:27
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38156", "html_url": "https://github.com/huggingface/transformers/pull/38156", "diff_url": "https://github.com/huggingface/transformers/pull/38156.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38156.patch", "merged_at": null }
# What does this PR do? Gemma3 generates incoherent output when manually calling `forward` with an instance of `HybridCache` which contains more than `sliding_window` tokens of content. This is because the call to `past_key_values.get_seq_len()` always returns the sequence length as measured by the cache of the very first layer. Because this is a local attention layer, its `sequence_length` never extends beyond `config.sliding_window`. This leads to an incorrect computation of `cache_position` and incoherent generations down the line. To fix it you can simply provide the correct `cache_position` manually. This behavior is impossible to fix without changing `get_seq_len` of `HybridCache`, so I propose to simply raise an informative error message for now. ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? @ArthurZucker
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38156/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38156/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38155
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38155/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38155/comments
https://api.github.com/repos/huggingface/transformers/issues/38155/events
https://github.com/huggingface/transformers/pull/38155
3,066,463,566
PR_kwDOCUB6oc6WVzz4
38,155
[core] support tensor-valued _extra_state values in `from_pretrained`
{ "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-05-15T14:32:53
2025-05-28T13:38:43
2025-05-28T13:38:43
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38155", "html_url": "https://github.com/huggingface/transformers/pull/38155", "diff_url": "https://github.com/huggingface/transformers/pull/38155.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38155.patch", "merged_at": "2025-05-28T13:38:43" }
# What does this PR do? [TransformerEngine](https://github.com/NVIDIA/TransformerEngine) uses the [pytorch get/set_extra_state API](https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.get_extra_state) to store FP8 layer config information as a Tensor in the `_extra_state` entry in the state dict. With recent changes to from_pretrained, this functionality has broken and loading a model that uses this API doesn't appear to work. This PR fixes the save/load pretrained functions for extra state entries that use a pytorch tensor, and adds a (currently x-failing) test for a dictionary extra state. Fixes #38154 ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [x] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. RFR @Cyrilvallez, @ArthurZucker.
{ "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/38155/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38155/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38154
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38154/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38154/comments
https://api.github.com/repos/huggingface/transformers/issues/38154/events
https://github.com/huggingface/transformers/issues/38154
3,066,452,575
I_kwDOCUB6oc62xlpf
38,154
Support `extra_state` attributes in from_pretrained
{ "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 }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-15T14:29:52
2025-05-28T13:38:44
2025-05-28T13:38:43
CONTRIBUTOR
null
null
null
null
### System Info transformers `main` branch, python 3.12. ### 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 Using `TransformerEngine` layers as an example, which add fp8 metadata to the `_extra_state` key: ```python from transformers import PretrainedConfig, PreTrainedModel from transformer_engine.pytorch import TransformerLayer class SimpleTEConfig(PretrainedConfig): def __init__(self, **kwargs): super().__init__(**kwargs) self.hidden_size = 320 self.intermediate_size = 1024 self.num_attention_heads = 16 class SimpleTEModel(PreTrainedModel): config_class = SimpleTEConfig def __init__(self, config: SimpleTEConfig): super().__init__(config) self.te_layer = TransformerLayer( hidden_size=config.hidden_size, ffn_hidden_size=config.intermediate_size, num_attention_heads=config.num_attention_heads, ) def forward(self, hidden_states, attention_mask): return self.te_layer(hidden_states, attention_mask) def test_simple_te_model(tmp_path): config = SimpleTEConfig() model = SimpleTEModel(config) model.save_pretrained(tmp_path / "simple_te_model") del model model = SimpleTEModel.from_pretrained(tmp_path / "simple_te_model") assert isinstance(model.te_layer, TransformerLayer) ``` ### Expected behavior from_pretrained should pass the deserialized `extra_state` value to the nn.Module's `from_state_dict` method; which will then call into `set_extra_state`. https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.get_extra_state. Instead, the loading fails on `get_parameter_or_buffer`: ``` > raise AttributeError(f"`{target}` is neither a parameter nor a buffer.") E AttributeError: `te_layer.layernorm_mlp._extra_state` is neither a parameter nor a buffer. ```
{ "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/38154/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38154/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/38152
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38152/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38152/comments
https://api.github.com/repos/huggingface/transformers/issues/38152/events
https://github.com/huggingface/transformers/pull/38152
3,066,161,141
PR_kwDOCUB6oc6WUyRY
38,152
Support for transformers explicit filename
{ "login": "LysandreJik", "id": 30755778, "node_id": "MDQ6VXNlcjMwNzU1Nzc4", "avatar_url": "https://avatars.githubusercontent.com/u/30755778?v=4", "gravatar_id": "", "url": "https://api.github.com/users/LysandreJik", "html_url": "https://github.com/LysandreJik", "followers_url": "https://api.github.com/users/LysandreJik/followers", "following_url": "https://api.github.com/users/LysandreJik/following{/other_user}", "gists_url": "https://api.github.com/users/LysandreJik/gists{/gist_id}", "starred_url": "https://api.github.com/users/LysandreJik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LysandreJik/subscriptions", "organizations_url": "https://api.github.com/users/LysandreJik/orgs", "repos_url": "https://api.github.com/users/LysandreJik/repos", "events_url": "https://api.github.com/users/LysandreJik/events{/privacy}", "received_events_url": "https://api.github.com/users/LysandreJik/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T12:57:12
2025-05-19T12:33:50
2025-05-19T12:33:47
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38152", "html_url": "https://github.com/huggingface/transformers/pull/38152", "diff_url": "https://github.com/huggingface/transformers/pull/38152.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38152.patch", "merged_at": "2025-05-19T12:33:47" }
Adds the possibility to have a `transformers_weights` key defined in the `config.json` file indicating from which file should `transformers` try to load the weights. This becomes relevant in case the `model.safetensors` file is already taken in the repo. This repo should, however, still be compatible with the `config.json` expected by `transformers`.
{ "login": "LysandreJik", "id": 30755778, "node_id": "MDQ6VXNlcjMwNzU1Nzc4", "avatar_url": "https://avatars.githubusercontent.com/u/30755778?v=4", "gravatar_id": "", "url": "https://api.github.com/users/LysandreJik", "html_url": "https://github.com/LysandreJik", "followers_url": "https://api.github.com/users/LysandreJik/followers", "following_url": "https://api.github.com/users/LysandreJik/following{/other_user}", "gists_url": "https://api.github.com/users/LysandreJik/gists{/gist_id}", "starred_url": "https://api.github.com/users/LysandreJik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LysandreJik/subscriptions", "organizations_url": "https://api.github.com/users/LysandreJik/orgs", "repos_url": "https://api.github.com/users/LysandreJik/repos", "events_url": "https://api.github.com/users/LysandreJik/events{/privacy}", "received_events_url": "https://api.github.com/users/LysandreJik/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38152/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/38152/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38151
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38151/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38151/comments
https://api.github.com/repos/huggingface/transformers/issues/38151/events
https://github.com/huggingface/transformers/pull/38151
3,066,006,142
PR_kwDOCUB6oc6WUQXv
38,151
Fix Qwen2.5 Omni `SinusoidsPositionEmbedding` precision
{ "login": "BakerBunker", "id": 17872844, "node_id": "MDQ6VXNlcjE3ODcyODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/17872844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BakerBunker", "html_url": "https://github.com/BakerBunker", "followers_url": "https://api.github.com/users/BakerBunker/followers", "following_url": "https://api.github.com/users/BakerBunker/following{/other_user}", "gists_url": "https://api.github.com/users/BakerBunker/gists{/gist_id}", "starred_url": "https://api.github.com/users/BakerBunker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BakerBunker/subscriptions", "organizations_url": "https://api.github.com/users/BakerBunker/orgs", "repos_url": "https://api.github.com/users/BakerBunker/repos", "events_url": "https://api.github.com/users/BakerBunker/events{/privacy}", "received_events_url": "https://api.github.com/users/BakerBunker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T12:00:56
2025-05-16T10:24:50
2025-05-16T10:24:50
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38151", "html_url": "https://github.com/huggingface/transformers/pull/38151", "diff_url": "https://github.com/huggingface/transformers/pull/38151.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38151.patch", "merged_at": "2025-05-16T10:24:50" }
# What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> fixes https://github.com/QwenLM/Qwen2.5-Omni/issues/271 ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. @zucchini-nlp <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "zucchini-nlp", "id": 100715397, "node_id": "U_kgDOBgDLhQ", "avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zucchini-nlp", "html_url": "https://github.com/zucchini-nlp", "followers_url": "https://api.github.com/users/zucchini-nlp/followers", "following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}", "gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}", "starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions", "organizations_url": "https://api.github.com/users/zucchini-nlp/orgs", "repos_url": "https://api.github.com/users/zucchini-nlp/repos", "events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}", "received_events_url": "https://api.github.com/users/zucchini-nlp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38151/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38151/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38150
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38150/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38150/comments
https://api.github.com/repos/huggingface/transformers/issues/38150/events
https://github.com/huggingface/transformers/pull/38150
3,065,979,825
PR_kwDOCUB6oc6WUKoX
38,150
Allow qwen/emu3 to process low res images
{ "login": "qubvel", "id": 31920396, "node_id": "MDQ6VXNlcjMxOTIwMzk2", "avatar_url": "https://avatars.githubusercontent.com/u/31920396?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qubvel", "html_url": "https://github.com/qubvel", "followers_url": "https://api.github.com/users/qubvel/followers", "following_url": "https://api.github.com/users/qubvel/following{/other_user}", "gists_url": "https://api.github.com/users/qubvel/gists{/gist_id}", "starred_url": "https://api.github.com/users/qubvel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qubvel/subscriptions", "organizations_url": "https://api.github.com/users/qubvel/orgs", "repos_url": "https://api.github.com/users/qubvel/repos", "events_url": "https://api.github.com/users/qubvel/events{/privacy}", "received_events_url": "https://api.github.com/users/qubvel/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-05-15T11:50:15
2025-05-16T10:25:54
null
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38150", "html_url": "https://github.com/huggingface/transformers/pull/38150", "diff_url": "https://github.com/huggingface/transformers/pull/38150.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38150.patch", "merged_at": null }
# What does this PR do? Allow to process images with low resolution, found this limitation while evaluating model on the MMMU-pro benchmark Reroduction: ```python from PIL import Image from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor model = Qwen2_5_VLForConditionalGeneration.from_pretrained("Qwen/Qwen2.5-VL-3B-Instruct", torch_dtype="auto", device_map="auto") processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-3B-Instruct") image = Image.new("RGB", (25, 100), color="red") messages = [ { "role": "user", "content": [ { "type": "image", "image": image, }, {"type": "text", "text": "Describe this image."}, ], } ] text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) inputs = processor(text=[text], images=image, return_tensors="pt").to("cuda") generated_ids = model.generate(**inputs, max_new_tokens=128) generated_ids_trimmed = [ out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids) ] output_text = processor.batch_decode( generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False ) print(output_text) ``` Gives the following error on main: ``` ... line 432, in preprocess patches, image_grid_thw = self._preprocess( File "/home/ubuntu/projects/transformers/src/transformers/models/qwen2_vl/image_processing_qwen2_vl.py", line 251, in _preprocess resized_height, resized_width = smart_resize( File "/home/ubuntu/projects/transformers/src/transformers/models/qwen2_vl/image_processing_qwen2_vl.py", line 68, in smart_resize raise ValueError(f"height:{height} and width:{width} must be larger than factor:{factor}") ValueError: height:100 and width:25 must be larger than factor:28 ```
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38150/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38150/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/38149
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38149/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38149/comments
https://api.github.com/repos/huggingface/transformers/issues/38149/events
https://github.com/huggingface/transformers/pull/38149
3,065,969,487
PR_kwDOCUB6oc6WUIWs
38,149
[omni modality] support composite preprocessor config
{ "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-05-15T11:46:12
2025-05-19T09:01:19
2025-05-19T09:01:18
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38149", "html_url": "https://github.com/huggingface/transformers/pull/38149", "diff_url": "https://github.com/huggingface/transformers/pull/38149.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38149.patch", "merged_at": null }
# What does this PR do? The issue is that we have always been saving audio and image processors under the same config name (preprocessor_config.json) which was totally fine until the recent release of omni models. Now if we try to save the omni-model processor, only the last attribute's config is saved and it overwrite all previous configs with the same naming So inspired by how Qwen-Omni team merged two configs into one big `preprocessor_config.json`, we can save all modality configs as part of the processor similar to what we have for composite model configs. This PR is totally backwards compatible and we don't add new file names anymore. The only difference is that from now on 'image/video/audio' processors are saved under nested dict irrespective of whether it is saved with `AutoProcessor` or as standalone. Loading is backward compatible and supports old-style non-composite configs, no warning or errors raised Note: I also thought we can save it all in `processor_config.json` (https://github.com/huggingface/transformers/pull/38142 is a draft), because these are processor's attributes and it makes more sense. But more changes are required for that and it will likely cause confusion (sometimes image params saved in `preproc` and sometimes in `proc` config)
{ "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/38149/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38149/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38148
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38148/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38148/comments
https://api.github.com/repos/huggingface/transformers/issues/38148/events
https://github.com/huggingface/transformers/pull/38148
3,065,781,380
PR_kwDOCUB6oc6WTedI
38,148
[Examples] Add advanced GPT2 text generation with temperature and top_k
{ "login": "sakthitharani", "id": 200588291, "node_id": "U_kgDOC_S8Aw", "avatar_url": "https://avatars.githubusercontent.com/u/200588291?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sakthitharani", "html_url": "https://github.com/sakthitharani", "followers_url": "https://api.github.com/users/sakthitharani/followers", "following_url": "https://api.github.com/users/sakthitharani/following{/other_user}", "gists_url": "https://api.github.com/users/sakthitharani/gists{/gist_id}", "starred_url": "https://api.github.com/users/sakthitharani/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sakthitharani/subscriptions", "organizations_url": "https://api.github.com/users/sakthitharani/orgs", "repos_url": "https://api.github.com/users/sakthitharani/repos", "events_url": "https://api.github.com/users/sakthitharani/events{/privacy}", "received_events_url": "https://api.github.com/users/sakthitharani/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T10:38:22
2025-05-15T15:41:34
2025-05-15T13:47:47
NONE
null
null
true
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38148", "html_url": "https://github.com/huggingface/transformers/pull/38148", "diff_url": "https://github.com/huggingface/transformers/pull/38148.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38148.patch", "merged_at": null }
## Summary This Pull Request adds a runnable example to the `examples/pytorch/text-generation/` directory demonstrating how to control text generation behavior in GPT2 using: - `temperature` for randomness control - `top_k` for limiting token choices - `num_return_sequences` for generating multiple outputs ## Why This Is Useful Many beginners may not fully understand how these parameters impact the quality and variety of generated text. This example shows: - How **low temperature** results in more **predictable, repetitive outputs**. - How **higher temperature** leads to **more creative, diverse outputs**. - How **top_k sampling** controls the token selection range. ## How to Run ```bash python examples/pytorch/text-generation/gpt2_advanced_usage.py
{ "login": "Rocketknight1", "id": 12866554, "node_id": "MDQ6VXNlcjEyODY2NTU0", "avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rocketknight1", "html_url": "https://github.com/Rocketknight1", "followers_url": "https://api.github.com/users/Rocketknight1/followers", "following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}", "gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions", "organizations_url": "https://api.github.com/users/Rocketknight1/orgs", "repos_url": "https://api.github.com/users/Rocketknight1/repos", "events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}", "received_events_url": "https://api.github.com/users/Rocketknight1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38148/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38148/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38147
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38147/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38147/comments
https://api.github.com/repos/huggingface/transformers/issues/38147/events
https://github.com/huggingface/transformers/issues/38147
3,065,557,862
I_kwDOCUB6oc62uLNm
38,147
How to check the number of tokens processed or the load of each expert in the Qwen3 MoE model during inference?
{ "login": "wumaotegan", "id": 69179496, "node_id": "MDQ6VXNlcjY5MTc5NDk2", "avatar_url": "https://avatars.githubusercontent.com/u/69179496?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wumaotegan", "html_url": "https://github.com/wumaotegan", "followers_url": "https://api.github.com/users/wumaotegan/followers", "following_url": "https://api.github.com/users/wumaotegan/following{/other_user}", "gists_url": "https://api.github.com/users/wumaotegan/gists{/gist_id}", "starred_url": "https://api.github.com/users/wumaotegan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wumaotegan/subscriptions", "organizations_url": "https://api.github.com/users/wumaotegan/orgs", "repos_url": "https://api.github.com/users/wumaotegan/repos", "events_url": "https://api.github.com/users/wumaotegan/events{/privacy}", "received_events_url": "https://api.github.com/users/wumaotegan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T09:21:29
2025-05-15T13:36:53
2025-05-15T13:36:52
NONE
null
null
null
null
null
{ "login": "Rocketknight1", "id": 12866554, "node_id": "MDQ6VXNlcjEyODY2NTU0", "avatar_url": "https://avatars.githubusercontent.com/u/12866554?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Rocketknight1", "html_url": "https://github.com/Rocketknight1", "followers_url": "https://api.github.com/users/Rocketknight1/followers", "following_url": "https://api.github.com/users/Rocketknight1/following{/other_user}", "gists_url": "https://api.github.com/users/Rocketknight1/gists{/gist_id}", "starred_url": "https://api.github.com/users/Rocketknight1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Rocketknight1/subscriptions", "organizations_url": "https://api.github.com/users/Rocketknight1/orgs", "repos_url": "https://api.github.com/users/Rocketknight1/repos", "events_url": "https://api.github.com/users/Rocketknight1/events{/privacy}", "received_events_url": "https://api.github.com/users/Rocketknight1/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38147/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38147/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/38146
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38146/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38146/comments
https://api.github.com/repos/huggingface/transformers/issues/38146/events
https://github.com/huggingface/transformers/pull/38146
3,065,525,708
PR_kwDOCUB6oc6WSl9F
38,146
Hotfix: Flash Attention 2 support in Pixtral
{ "login": "uminaty", "id": 56725662, "node_id": "MDQ6VXNlcjU2NzI1NjYy", "avatar_url": "https://avatars.githubusercontent.com/u/56725662?v=4", "gravatar_id": "", "url": "https://api.github.com/users/uminaty", "html_url": "https://github.com/uminaty", "followers_url": "https://api.github.com/users/uminaty/followers", "following_url": "https://api.github.com/users/uminaty/following{/other_user}", "gists_url": "https://api.github.com/users/uminaty/gists{/gist_id}", "starred_url": "https://api.github.com/users/uminaty/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/uminaty/subscriptions", "organizations_url": "https://api.github.com/users/uminaty/orgs", "repos_url": "https://api.github.com/users/uminaty/repos", "events_url": "https://api.github.com/users/uminaty/events{/privacy}", "received_events_url": "https://api.github.com/users/uminaty/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T09:10:05
2025-05-15T09:45:35
2025-05-15T09:45:35
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38146", "html_url": "https://github.com/huggingface/transformers/pull/38146", "diff_url": "https://github.com/huggingface/transformers/pull/38146.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38146.patch", "merged_at": "2025-05-15T09:45:35" }
## Context Pixtral support for `ALL_ATTENTION_FUNCTIONS` was added in [this PR](https://github.com/huggingface/transformers/pull/37960), but a subsequent [rebase](https://github.com/huggingface/transformers/pull/37576) unintentionally modified a line that sets `attention_mask` to `None` when using Flash Attention 2. Currently, without this condition, using Flash Attention 2 with Pixtral raises the following error: `RuntimeError: cu_seqlens_q must have shape (batch_size + 1)` Setting `attention_mask` to `None` resolves the issue. It also appears that the current tests doesn’t catch this case. cc: @zucchini-nlp, @ArthurZucker
{ "login": "zucchini-nlp", "id": 100715397, "node_id": "U_kgDOBgDLhQ", "avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zucchini-nlp", "html_url": "https://github.com/zucchini-nlp", "followers_url": "https://api.github.com/users/zucchini-nlp/followers", "following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}", "gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}", "starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions", "organizations_url": "https://api.github.com/users/zucchini-nlp/orgs", "repos_url": "https://api.github.com/users/zucchini-nlp/repos", "events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}", "received_events_url": "https://api.github.com/users/zucchini-nlp/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38146/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38146/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38145
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38145/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38145/comments
https://api.github.com/repos/huggingface/transformers/issues/38145/events
https://github.com/huggingface/transformers/pull/38145
3,065,486,646
PR_kwDOCUB6oc6WSdkP
38,145
remove unhandled parameter
{ "login": "itazap", "id": 31893021, "node_id": "MDQ6VXNlcjMxODkzMDIx", "avatar_url": "https://avatars.githubusercontent.com/u/31893021?v=4", "gravatar_id": "", "url": "https://api.github.com/users/itazap", "html_url": "https://github.com/itazap", "followers_url": "https://api.github.com/users/itazap/followers", "following_url": "https://api.github.com/users/itazap/following{/other_user}", "gists_url": "https://api.github.com/users/itazap/gists{/gist_id}", "starred_url": "https://api.github.com/users/itazap/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/itazap/subscriptions", "organizations_url": "https://api.github.com/users/itazap/orgs", "repos_url": "https://api.github.com/users/itazap/repos", "events_url": "https://api.github.com/users/itazap/events{/privacy}", "received_events_url": "https://api.github.com/users/itazap/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T08:55:28
2025-06-02T13:57:35
2025-06-02T13:57:32
COLLABORATOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38145", "html_url": "https://github.com/huggingface/transformers/pull/38145", "diff_url": "https://github.com/huggingface/transformers/pull/38145.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38145.patch", "merged_at": "2025-06-02T13:57:32" }
this test fails for fast tokenizers with `TypeError: _batch_encode_plus() got an unexpected keyword argument 'max_target_length'` the `max_target_length=10` param is not required for this test anyway
{ "login": "itazap", "id": 31893021, "node_id": "MDQ6VXNlcjMxODkzMDIx", "avatar_url": "https://avatars.githubusercontent.com/u/31893021?v=4", "gravatar_id": "", "url": "https://api.github.com/users/itazap", "html_url": "https://github.com/itazap", "followers_url": "https://api.github.com/users/itazap/followers", "following_url": "https://api.github.com/users/itazap/following{/other_user}", "gists_url": "https://api.github.com/users/itazap/gists{/gist_id}", "starred_url": "https://api.github.com/users/itazap/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/itazap/subscriptions", "organizations_url": "https://api.github.com/users/itazap/orgs", "repos_url": "https://api.github.com/users/itazap/repos", "events_url": "https://api.github.com/users/itazap/events{/privacy}", "received_events_url": "https://api.github.com/users/itazap/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38145/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38145/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38144
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38144/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38144/comments
https://api.github.com/repos/huggingface/transformers/issues/38144/events
https://github.com/huggingface/transformers/pull/38144
3,065,481,273
PR_kwDOCUB6oc6WScWQ
38,144
[VLMs] add helpers for get/set embedding
{ "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-05-15T08:54:03
2025-05-26T07:50:32
2025-05-26T07:50:32
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38144", "html_url": "https://github.com/huggingface/transformers/pull/38144", "diff_url": "https://github.com/huggingface/transformers/pull/38144.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38144.patch", "merged_at": "2025-05-26T07:50:32" }
# What does this PR do? Fixes (partially) https://github.com/huggingface/transformers/issues/38121, and verifies all VLMs have their respective getters/setters for embeddings and the decoder.
{ "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/38144/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38144/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38143
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38143/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38143/comments
https://api.github.com/repos/huggingface/transformers/issues/38143/events
https://github.com/huggingface/transformers/pull/38143
3,065,461,914
PR_kwDOCUB6oc6WSYI5
38,143
[Model] add dots1
{ "login": "redmoe-moutain", "id": 209578884, "node_id": "U_kgDODH3rhA", "avatar_url": "https://avatars.githubusercontent.com/u/209578884?v=4", "gravatar_id": "", "url": "https://api.github.com/users/redmoe-moutain", "html_url": "https://github.com/redmoe-moutain", "followers_url": "https://api.github.com/users/redmoe-moutain/followers", "following_url": "https://api.github.com/users/redmoe-moutain/following{/other_user}", "gists_url": "https://api.github.com/users/redmoe-moutain/gists{/gist_id}", "starred_url": "https://api.github.com/users/redmoe-moutain/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/redmoe-moutain/subscriptions", "organizations_url": "https://api.github.com/users/redmoe-moutain/orgs", "repos_url": "https://api.github.com/users/redmoe-moutain/repos", "events_url": "https://api.github.com/users/redmoe-moutain/events{/privacy}", "received_events_url": "https://api.github.com/users/redmoe-moutain/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-05-15T08:47:02
2025-06-25T09:38:40
2025-06-25T09:38:25
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38143", "html_url": "https://github.com/huggingface/transformers/pull/38143", "diff_url": "https://github.com/huggingface/transformers/pull/38143.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38143.patch", "merged_at": "2025-06-25T09:38:25" }
# 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 --> Support model `dots.llm1` by rednote-hilab ## 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 and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38143/reactions", "total_count": 4, "+1": 1, "-1": 0, "laugh": 0, "hooray": 3, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38143/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38142
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38142/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38142/comments
https://api.github.com/repos/huggingface/transformers/issues/38142/events
https://github.com/huggingface/transformers/pull/38142
3,065,434,878
PR_kwDOCUB6oc6WSSR2
38,142
[omni modality] support composite processor config
{ "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-05-15T08:38:12
2025-08-28T12:40:27
2025-08-28T12:40:27
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38142", "html_url": "https://github.com/huggingface/transformers/pull/38142", "diff_url": "https://github.com/huggingface/transformers/pull/38142.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38142.patch", "merged_at": "2025-08-28T12:40:27" }
# What does this PR do? We currently save audio and image processors under the same config name (`preprocessor_config.json`) which was totally fine until the recent release of omni models. After qwen-omni release if we try to save the processor, only the last attribute's config is saved and it overwrites all previous configs with the same naming As a solution, we can save all preprocessor configs as part of the processor similar to what we have for composite model configs. For backward-forward compatibility we'll need to support loading files from the hub using old naming conventions for indefinitely long with no warning raised Note, not all models have a special processor and sometimes users load/save `ImagePreprocessor` class directly. Therefore, we might still end up with separately saved files per modality preprocessor in the future. Should we strongly recommend to use `Processor` classes as the only entrypoint for all models?
{ "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/38142/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38142/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38141
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38141/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38141/comments
https://api.github.com/repos/huggingface/transformers/issues/38141/events
https://github.com/huggingface/transformers/pull/38141
3,065,367,401
PR_kwDOCUB6oc6WSDl0
38,141
Fix FSDP + llava-next/llava-onevision
{ "login": "Arvin-xiong", "id": 177507248, "node_id": "U_kgDOCpSLsA", "avatar_url": "https://avatars.githubusercontent.com/u/177507248?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Arvin-xiong", "html_url": "https://github.com/Arvin-xiong", "followers_url": "https://api.github.com/users/Arvin-xiong/followers", "following_url": "https://api.github.com/users/Arvin-xiong/following{/other_user}", "gists_url": "https://api.github.com/users/Arvin-xiong/gists{/gist_id}", "starred_url": "https://api.github.com/users/Arvin-xiong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Arvin-xiong/subscriptions", "organizations_url": "https://api.github.com/users/Arvin-xiong/orgs", "repos_url": "https://api.github.com/users/Arvin-xiong/repos", "events_url": "https://api.github.com/users/Arvin-xiong/events{/privacy}", "received_events_url": "https://api.github.com/users/Arvin-xiong/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
open
false
null
[]
null
[]
2025-05-15T08:13:02
2025-06-04T10:35:59
null
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38141", "html_url": "https://github.com/huggingface/transformers/pull/38141", "diff_url": "https://github.com/huggingface/transformers/pull/38141.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38141.patch", "merged_at": null }
Recently, I have been trying to use FSDP to train `llava_next`, but i need to find the minimum spliting module, which is the `_no_split_modules` in the code. However, i did not find the corresponding class implementation in the `modeling_llava_next.py`. ([`LlavaNextVisionAttention`](https://github.com/huggingface/transformers/blob/5f4ecf2d9f867a1255131d2461d75793c0cf1db2/src/transformers/models/llava_next/modeling_llava_next.py#L244) in v4.51.3 and `LlamaDecoderLayer` in latest code)
null
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38141/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38141/timeline
null
null
null
null
true
false
https://api.github.com/repos/huggingface/transformers/issues/38140
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38140/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38140/comments
https://api.github.com/repos/huggingface/transformers/issues/38140/events
https://github.com/huggingface/transformers/pull/38140
3,065,265,069
PR_kwDOCUB6oc6WRtIF
38,140
enable csm integration cases on xpu, all passed
{ "login": "yao-matrix", "id": 7245027, "node_id": "MDQ6VXNlcjcyNDUwMjc=", "avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yao-matrix", "html_url": "https://github.com/yao-matrix", "followers_url": "https://api.github.com/users/yao-matrix/followers", "following_url": "https://api.github.com/users/yao-matrix/following{/other_user}", "gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}", "starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions", "organizations_url": "https://api.github.com/users/yao-matrix/orgs", "repos_url": "https://api.github.com/users/yao-matrix/repos", "events_url": "https://api.github.com/users/yao-matrix/events{/privacy}", "received_events_url": "https://api.github.com/users/yao-matrix/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T07:36:29
2025-05-15T22:36:36
2025-05-15T07:46:29
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38140", "html_url": "https://github.com/huggingface/transformers/pull/38140", "diff_url": "https://github.com/huggingface/transformers/pull/38140.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38140.patch", "merged_at": "2025-05-15T07:46:29" }
@ydshieh @IlyasMoutawwakil , pls help review, thx.
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38140/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38140/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38139
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38139/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38139/comments
https://api.github.com/repos/huggingface/transformers/issues/38139/events
https://github.com/huggingface/transformers/issues/38139
3,065,060,106
I_kwDOCUB6oc62sRsK
38,139
Have to import cv2 and pop up window frist, or else it stuck forever
{ "login": "leemengwei", "id": 17986725, "node_id": "MDQ6VXNlcjE3OTg2NzI1", "avatar_url": "https://avatars.githubusercontent.com/u/17986725?v=4", "gravatar_id": "", "url": "https://api.github.com/users/leemengwei", "html_url": "https://github.com/leemengwei", "followers_url": "https://api.github.com/users/leemengwei/followers", "following_url": "https://api.github.com/users/leemengwei/following{/other_user}", "gists_url": "https://api.github.com/users/leemengwei/gists{/gist_id}", "starred_url": "https://api.github.com/users/leemengwei/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/leemengwei/subscriptions", "organizations_url": "https://api.github.com/users/leemengwei/orgs", "repos_url": "https://api.github.com/users/leemengwei/repos", "events_url": "https://api.github.com/users/leemengwei/events{/privacy}", "received_events_url": "https://api.github.com/users/leemengwei/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T06:02:28
2025-07-23T08:03:03
2025-07-23T08:03:03
NONE
null
null
null
null
> @SSacSim Yes One have to import cv2 and pop up window frist. Thats really annoying. > > ![Image](https://github.com/user-attachments/assets/37cc08c1-9a21-4fd1-965b-6625b90f6f08) > > > transformers 4.48.3 > opencv-python 4.10.0.84 > > @purusharthmalik _Originally posted by @leemengwei in [#37239](https://github.com/huggingface/transformers/issues/37239#issuecomment-2882648658)_
{ "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/38139/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38139/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/38138
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38138/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38138/comments
https://api.github.com/repos/huggingface/transformers/issues/38138/events
https://github.com/huggingface/transformers/pull/38138
3,064,906,397
PR_kwDOCUB6oc6WQd-W
38,138
enable trainer test cases on xpu
{ "login": "yao-matrix", "id": 7245027, "node_id": "MDQ6VXNlcjcyNDUwMjc=", "avatar_url": "https://avatars.githubusercontent.com/u/7245027?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yao-matrix", "html_url": "https://github.com/yao-matrix", "followers_url": "https://api.github.com/users/yao-matrix/followers", "following_url": "https://api.github.com/users/yao-matrix/following{/other_user}", "gists_url": "https://api.github.com/users/yao-matrix/gists{/gist_id}", "starred_url": "https://api.github.com/users/yao-matrix/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yao-matrix/subscriptions", "organizations_url": "https://api.github.com/users/yao-matrix/orgs", "repos_url": "https://api.github.com/users/yao-matrix/repos", "events_url": "https://api.github.com/users/yao-matrix/events{/privacy}", "received_events_url": "https://api.github.com/users/yao-matrix/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T04:54:32
2025-05-15T22:35:37
2025-05-15T12:17:45
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38138", "html_url": "https://github.com/huggingface/transformers/pull/38138", "diff_url": "https://github.com/huggingface/transformers/pull/38138.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38138.patch", "merged_at": "2025-05-15T12:17:45" }
null
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38138/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38138/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38137
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38137/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38137/comments
https://api.github.com/repos/huggingface/transformers/issues/38137/events
https://github.com/huggingface/transformers/issues/38137
3,064,882,578
I_kwDOCUB6oc62rmWS
38,137
Speed metrics are not logged
{ "login": "pavelgein", "id": 6231453, "node_id": "MDQ6VXNlcjYyMzE0NTM=", "avatar_url": "https://avatars.githubusercontent.com/u/6231453?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pavelgein", "html_url": "https://github.com/pavelgein", "followers_url": "https://api.github.com/users/pavelgein/followers", "following_url": "https://api.github.com/users/pavelgein/following{/other_user}", "gists_url": "https://api.github.com/users/pavelgein/gists{/gist_id}", "starred_url": "https://api.github.com/users/pavelgein/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pavelgein/subscriptions", "organizations_url": "https://api.github.com/users/pavelgein/orgs", "repos_url": "https://api.github.com/users/pavelgein/repos", "events_url": "https://api.github.com/users/pavelgein/events{/privacy}", "received_events_url": "https://api.github.com/users/pavelgein/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-15T04:44:27
2025-09-12T06:08:07
2025-06-16T12:45:24
CONTRIBUTOR
null
null
null
null
### System Info Master branch The result of `speed_metrics` is not logged or saved https://github.com/huggingface/transformers/blob/4005e30c804f9b3a9dbf45d019f6ca1cdc4d774c/src/transformers/trainer.py#L3656 ### Who can help? @zach-huggingface @SunMarc ### Information - [ ] The official example scripts - [ ] My own modified scripts ### Tasks - [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below) ### Reproduction No need for reproduction ### Expected behavior Metrics are logged
{ "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/38137/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38137/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/38136
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38136/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38136/comments
https://api.github.com/repos/huggingface/transformers/issues/38136/events
https://github.com/huggingface/transformers/pull/38136
3,064,868,304
PR_kwDOCUB6oc6WQVTg
38,136
[FIX] Save speed metrics to logs
{ "login": "pavelgein", "id": 6231453, "node_id": "MDQ6VXNlcjYyMzE0NTM=", "avatar_url": "https://avatars.githubusercontent.com/u/6231453?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pavelgein", "html_url": "https://github.com/pavelgein", "followers_url": "https://api.github.com/users/pavelgein/followers", "following_url": "https://api.github.com/users/pavelgein/following{/other_user}", "gists_url": "https://api.github.com/users/pavelgein/gists{/gist_id}", "starred_url": "https://api.github.com/users/pavelgein/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pavelgein/subscriptions", "organizations_url": "https://api.github.com/users/pavelgein/orgs", "repos_url": "https://api.github.com/users/pavelgein/repos", "events_url": "https://api.github.com/users/pavelgein/events{/privacy}", "received_events_url": "https://api.github.com/users/pavelgein/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T04:38:09
2025-05-15T14:58:51
2025-05-15T14:58:50
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38136", "html_url": "https://github.com/huggingface/transformers/pull/38136", "diff_url": "https://github.com/huggingface/transformers/pull/38136.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38136.patch", "merged_at": "2025-05-15T14:58:50" }
Previously, we calculated speed metrics and did not do anything with the result. # What does this PR do? Save speed metrics to logs. Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "SunMarc", "id": 57196510, "node_id": "MDQ6VXNlcjU3MTk2NTEw", "avatar_url": "https://avatars.githubusercontent.com/u/57196510?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SunMarc", "html_url": "https://github.com/SunMarc", "followers_url": "https://api.github.com/users/SunMarc/followers", "following_url": "https://api.github.com/users/SunMarc/following{/other_user}", "gists_url": "https://api.github.com/users/SunMarc/gists{/gist_id}", "starred_url": "https://api.github.com/users/SunMarc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SunMarc/subscriptions", "organizations_url": "https://api.github.com/users/SunMarc/orgs", "repos_url": "https://api.github.com/users/SunMarc/repos", "events_url": "https://api.github.com/users/SunMarc/events{/privacy}", "received_events_url": "https://api.github.com/users/SunMarc/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38136/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38136/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38135
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38135/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38135/comments
https://api.github.com/repos/huggingface/transformers/issues/38135/events
https://github.com/huggingface/transformers/pull/38135
3,064,808,173
PR_kwDOCUB6oc6WQIVR
38,135
[Qwen3] Qwen3 MoE add tp plan for expert mlps
{ "login": "hgt312", "id": 22725729, "node_id": "MDQ6VXNlcjIyNzI1NzI5", "avatar_url": "https://avatars.githubusercontent.com/u/22725729?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hgt312", "html_url": "https://github.com/hgt312", "followers_url": "https://api.github.com/users/hgt312/followers", "following_url": "https://api.github.com/users/hgt312/following{/other_user}", "gists_url": "https://api.github.com/users/hgt312/gists{/gist_id}", "starred_url": "https://api.github.com/users/hgt312/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hgt312/subscriptions", "organizations_url": "https://api.github.com/users/hgt312/orgs", "repos_url": "https://api.github.com/users/hgt312/repos", "events_url": "https://api.github.com/users/hgt312/events{/privacy}", "received_events_url": "https://api.github.com/users/hgt312/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T03:50:32
2025-05-15T07:25:16
2025-05-15T07:12:39
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38135", "html_url": "https://github.com/huggingface/transformers/pull/38135", "diff_url": "https://github.com/huggingface/transformers/pull/38135.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38135.patch", "merged_at": "2025-05-15T07:12:39" }
# What does this PR do? Qwen3 MoE config: add tp plan for expert mlps tested via vllm @ArthurZucker
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38135/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38135/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38134
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38134/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38134/comments
https://api.github.com/repos/huggingface/transformers/issues/38134/events
https://github.com/huggingface/transformers/pull/38134
3,064,739,346
PR_kwDOCUB6oc6WP5XH
38,134
Fix error in calculating `cache_position` with past_length for Chatglm and Mamba model
{ "login": "kailixu-x", "id": 59248336, "node_id": "MDQ6VXNlcjU5MjQ4MzM2", "avatar_url": "https://avatars.githubusercontent.com/u/59248336?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kailixu-x", "html_url": "https://github.com/kailixu-x", "followers_url": "https://api.github.com/users/kailixu-x/followers", "following_url": "https://api.github.com/users/kailixu-x/following{/other_user}", "gists_url": "https://api.github.com/users/kailixu-x/gists{/gist_id}", "starred_url": "https://api.github.com/users/kailixu-x/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kailixu-x/subscriptions", "organizations_url": "https://api.github.com/users/kailixu-x/orgs", "repos_url": "https://api.github.com/users/kailixu-x/repos", "events_url": "https://api.github.com/users/kailixu-x/events{/privacy}", "received_events_url": "https://api.github.com/users/kailixu-x/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T03:00:33
2025-07-01T05:26:58
2025-07-01T05:26:58
NONE
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38134", "html_url": "https://github.com/huggingface/transformers/pull/38134", "diff_url": "https://github.com/huggingface/transformers/pull/38134.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38134.patch", "merged_at": null }
# What does this PR do? <!-- Congratulations! You've made it this far! You're not quite done yet though. Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution. Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change. Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "kailixu-x", "id": 59248336, "node_id": "MDQ6VXNlcjU5MjQ4MzM2", "avatar_url": "https://avatars.githubusercontent.com/u/59248336?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kailixu-x", "html_url": "https://github.com/kailixu-x", "followers_url": "https://api.github.com/users/kailixu-x/followers", "following_url": "https://api.github.com/users/kailixu-x/following{/other_user}", "gists_url": "https://api.github.com/users/kailixu-x/gists{/gist_id}", "starred_url": "https://api.github.com/users/kailixu-x/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kailixu-x/subscriptions", "organizations_url": "https://api.github.com/users/kailixu-x/orgs", "repos_url": "https://api.github.com/users/kailixu-x/repos", "events_url": "https://api.github.com/users/kailixu-x/events{/privacy}", "received_events_url": "https://api.github.com/users/kailixu-x/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38134/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38134/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38133
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38133/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38133/comments
https://api.github.com/repos/huggingface/transformers/issues/38133/events
https://github.com/huggingface/transformers/pull/38133
3,064,604,127
PR_kwDOCUB6oc6WPcjv
38,133
Skip non-selected experts for qwen3_moe
{ "login": "seven-mile", "id": 56445491, "node_id": "MDQ6VXNlcjU2NDQ1NDkx", "avatar_url": "https://avatars.githubusercontent.com/u/56445491?v=4", "gravatar_id": "", "url": "https://api.github.com/users/seven-mile", "html_url": "https://github.com/seven-mile", "followers_url": "https://api.github.com/users/seven-mile/followers", "following_url": "https://api.github.com/users/seven-mile/following{/other_user}", "gists_url": "https://api.github.com/users/seven-mile/gists{/gist_id}", "starred_url": "https://api.github.com/users/seven-mile/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/seven-mile/subscriptions", "organizations_url": "https://api.github.com/users/seven-mile/orgs", "repos_url": "https://api.github.com/users/seven-mile/repos", "events_url": "https://api.github.com/users/seven-mile/events{/privacy}", "received_events_url": "https://api.github.com/users/seven-mile/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-15T01:14:20
2025-06-24T14:33:49
2025-06-24T14:33:49
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38133", "html_url": "https://github.com/huggingface/transformers/pull/38133", "diff_url": "https://github.com/huggingface/transformers/pull/38133.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38133.patch", "merged_at": "2025-06-24T14:33:49" }
Following #32429, this PR applies it for Qwen3MoE, too. CC: @ArthurZucker
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38133/reactions", "total_count": 4, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 4 }
https://api.github.com/repos/huggingface/transformers/issues/38133/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38132
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38132/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38132/comments
https://api.github.com/repos/huggingface/transformers/issues/38132/events
https://github.com/huggingface/transformers/pull/38132
3,064,038,692
PR_kwDOCUB6oc6WNkFg
38,132
Add AMD MI300 CI caller leveraging self-hosted runner scale set workflow in hf-workflows
{ "login": "jitesh-gupta", "id": 202713221, "node_id": "U_kgDODBUohQ", "avatar_url": "https://avatars.githubusercontent.com/u/202713221?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jitesh-gupta", "html_url": "https://github.com/jitesh-gupta", "followers_url": "https://api.github.com/users/jitesh-gupta/followers", "following_url": "https://api.github.com/users/jitesh-gupta/following{/other_user}", "gists_url": "https://api.github.com/users/jitesh-gupta/gists{/gist_id}", "starred_url": "https://api.github.com/users/jitesh-gupta/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jitesh-gupta/subscriptions", "organizations_url": "https://api.github.com/users/jitesh-gupta/orgs", "repos_url": "https://api.github.com/users/jitesh-gupta/repos", "events_url": "https://api.github.com/users/jitesh-gupta/events{/privacy}", "received_events_url": "https://api.github.com/users/jitesh-gupta/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-14T19:10:38
2025-05-26T21:13:02
2025-05-26T21:13:02
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38132", "html_url": "https://github.com/huggingface/transformers/pull/38132", "diff_url": "https://github.com/huggingface/transformers/pull/38132.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38132.patch", "merged_at": "2025-05-26T21:13:02" }
# 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 --> Added mi300 caller workflow to leverage self-hosted runner scale set in [hf-worfklows](https://github.com/huggingface/hf-workflows/pull/27) Copied the [exiting workflows ](https://github.com/huggingface/transformers/blob/main/.github/workflows/self-scheduled-amd-mi250-caller.yml) and changed '_runner_' parameter to the new '_runner_scale_set_' parameter ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section? - [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case. - [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). - [ ] Did you write any new necessary tests? ## Who can review? Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR. <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "ivarflakstad", "id": 69173633, "node_id": "MDQ6VXNlcjY5MTczNjMz", "avatar_url": "https://avatars.githubusercontent.com/u/69173633?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ivarflakstad", "html_url": "https://github.com/ivarflakstad", "followers_url": "https://api.github.com/users/ivarflakstad/followers", "following_url": "https://api.github.com/users/ivarflakstad/following{/other_user}", "gists_url": "https://api.github.com/users/ivarflakstad/gists{/gist_id}", "starred_url": "https://api.github.com/users/ivarflakstad/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ivarflakstad/subscriptions", "organizations_url": "https://api.github.com/users/ivarflakstad/orgs", "repos_url": "https://api.github.com/users/ivarflakstad/repos", "events_url": "https://api.github.com/users/ivarflakstad/events{/privacy}", "received_events_url": "https://api.github.com/users/ivarflakstad/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38132/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38132/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38131
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38131/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38131/comments
https://api.github.com/repos/huggingface/transformers/issues/38131/events
https://github.com/huggingface/transformers/pull/38131
3,063,890,415
PR_kwDOCUB6oc6WNEWv
38,131
Make HF implementation match original OLMo 2 models for lower precisions
{ "login": "2015aroras", "id": 19700980, "node_id": "MDQ6VXNlcjE5NzAwOTgw", "avatar_url": "https://avatars.githubusercontent.com/u/19700980?v=4", "gravatar_id": "", "url": "https://api.github.com/users/2015aroras", "html_url": "https://github.com/2015aroras", "followers_url": "https://api.github.com/users/2015aroras/followers", "following_url": "https://api.github.com/users/2015aroras/following{/other_user}", "gists_url": "https://api.github.com/users/2015aroras/gists{/gist_id}", "starred_url": "https://api.github.com/users/2015aroras/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/2015aroras/subscriptions", "organizations_url": "https://api.github.com/users/2015aroras/orgs", "repos_url": "https://api.github.com/users/2015aroras/repos", "events_url": "https://api.github.com/users/2015aroras/events{/privacy}", "received_events_url": "https://api.github.com/users/2015aroras/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-14T18:01:43
2025-05-19T15:42:36
2025-05-19T13:35:23
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38131", "html_url": "https://github.com/huggingface/transformers/pull/38131", "diff_url": "https://github.com/huggingface/transformers/pull/38131.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38131.patch", "merged_at": "2025-05-19T13:35:23" }
# What does this PR do? Context: We found that the vLLM implementation of OLMo 2 models sometimes NaNs (https://github.com/allenai/olmo-cookbook/issues/60). Investigation revealed that this was caused by vLLM converting float32 models to float16 by default. Follow-up investigation revealed that OLMo 2 models in the original codebase do not match transformers and vLLM models in lower precisions like float16 and bfloat16. Fix: transformers and original OLMo 2 differ in 2 ways: 1. In RMS norm, weight and hidden states are multiplied before converting back to the input dtype in the original but after in transformers. 2. Rope is applied in full precision in the original OLMo 2 rather than at the default precision. This is also true for OLMo 1. This PR makes transformers match OLMo 2 in these manners (and OLMo 1 for point 2). This is enough to make the transformers implementation logits match the original OLMo 2's in lower precisions on CPU. This is NOT sufficient for making the transformers implementation logits match the original OLMo 1's logits in lower precisions (reason unknown), but logits still match in float32. <!-- 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 #38117 ## 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 <!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @ If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**. Please tag fewer than 3 people. Models: - text models: @ArthurZucker - vision models: @amyeroberts, @qubvel - speech models: @eustlb - graph models: @clefourrier Library: - flax: @gante and @Rocketknight1 - generate: @zucchini-nlp (visual-language models) or @gante (all others) - pipelines: @Rocketknight1 - tensorflow: @gante and @Rocketknight1 - tokenizers: @ArthurZucker - trainer: @zach-huggingface and @SunMarc - chat templates: @Rocketknight1 Integrations: - deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface - ray/raytune: @richardliaw, @amogkam - Big Model Inference: @SunMarc - quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber Documentation: @stevhliu HF projects: - accelerate: [different repo](https://github.com/huggingface/accelerate) - datasets: [different repo](https://github.com/huggingface/datasets) - diffusers: [different repo](https://github.com/huggingface/diffusers) - rust tokenizers: [different repo](https://github.com/huggingface/tokenizers) Maintained examples (not research project or legacy): - Flax: @Rocketknight1 - PyTorch: See Models above and tag the person corresponding to the modality of the example. - TensorFlow: @Rocketknight1 -->
{ "login": "ArthurZucker", "id": 48595927, "node_id": "MDQ6VXNlcjQ4NTk1OTI3", "avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ArthurZucker", "html_url": "https://github.com/ArthurZucker", "followers_url": "https://api.github.com/users/ArthurZucker/followers", "following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}", "gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}", "starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions", "organizations_url": "https://api.github.com/users/ArthurZucker/orgs", "repos_url": "https://api.github.com/users/ArthurZucker/repos", "events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}", "received_events_url": "https://api.github.com/users/ArthurZucker/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38131/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38131/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38130
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38130/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38130/comments
https://api.github.com/repos/huggingface/transformers/issues/38130/events
https://github.com/huggingface/transformers/issues/38130
3,063,856,136
I_kwDOCUB6oc62nrwI
38,130
eval_loss not found when training a peft model using trainer.py / losses not retrieved from base model where appropriate
{ "login": "kreil", "id": 15186699, "node_id": "MDQ6VXNlcjE1MTg2Njk5", "avatar_url": "https://avatars.githubusercontent.com/u/15186699?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kreil", "html_url": "https://github.com/kreil", "followers_url": "https://api.github.com/users/kreil/followers", "following_url": "https://api.github.com/users/kreil/following{/other_user}", "gists_url": "https://api.github.com/users/kreil/gists{/gist_id}", "starred_url": "https://api.github.com/users/kreil/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kreil/subscriptions", "organizations_url": "https://api.github.com/users/kreil/orgs", "repos_url": "https://api.github.com/users/kreil/repos", "events_url": "https://api.github.com/users/kreil/events{/privacy}", "received_events_url": "https://api.github.com/users/kreil/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-14T17:47:27
2025-08-14T02:14:35
2025-07-12T08:03:13
NONE
null
null
null
null
### System Info pip list |grep transf; python --version; uname -a transformers 4.51.3 Python 3.12.10 Linux gap 6.11.10+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11.10-1~bpo12+1 (2024-12-19) x86_64 GNU/Linux ### 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 Train any peft model. I am training a LoRA adapter using the AutoModelForMaskedLM from ModernBERT. ### Expected behavior Trainer and its most regular features should handle looking up the losses in the base model, which at several places in the code they apparently don't. So instead of finding `eval_loss` they only see the new losses added by `peft` such as `eval_steps_per_second`. One such issue is described, including a fix, in #33420. This fix should be merged with the regular sources. The second such issue, triggered by setting `load_best_model_at_end` to True, is described in the comments to #33420 (no fix yet).
{ "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/38130/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38130/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/38129
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38129/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38129/comments
https://api.github.com/repos/huggingface/transformers/issues/38129/events
https://github.com/huggingface/transformers/pull/38129
3,063,825,601
PR_kwDOCUB6oc6WM2UL
38,129
🚨🚨🚨 [pipelines] update defaults in pipelines that can `generate`
{ "login": "gante", "id": 12240844, "node_id": "MDQ6VXNlcjEyMjQwODQ0", "avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gante", "html_url": "https://github.com/gante", "followers_url": "https://api.github.com/users/gante/followers", "following_url": "https://api.github.com/users/gante/following{/other_user}", "gists_url": "https://api.github.com/users/gante/gists{/gist_id}", "starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gante/subscriptions", "organizations_url": "https://api.github.com/users/gante/orgs", "repos_url": "https://api.github.com/users/gante/repos", "events_url": "https://api.github.com/users/gante/events{/privacy}", "received_events_url": "https://api.github.com/users/gante/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-14T17:35:02
2025-05-19T17:02:10
2025-05-19T17:02:06
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38129", "html_url": "https://github.com/huggingface/transformers/pull/38129", "diff_url": "https://github.com/huggingface/transformers/pull/38129.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38129.patch", "merged_at": "2025-05-19T17:02:06" }
# What does this PR do? TL;DR our defaults for text generation are very outdated. Most notably, the default maximum length. This PR adds the tooling to easily add pipeline-specific `generate` defaults, and adds new defaults to all pipelines that call `generate`. ⚠️ ⚠️ ⚠️ In all pipelines that call `generate`, the new `max_new_tokens` default is `256` ⚠️ ⚠️ ⚠️ ### Tests This PR reviewed the tests of the pipelines that call `generate` such that their CI is now green. Overall changes: - broken TF tests -> deleted - tests that were already broken on `main` -> added a skip with a TODO - slow tests that were not slow (< 3s) -> removed `@slow` - tests were the actual output contents were not checked -> changed to a smaller model whenever possible, and reduced `max_new_tokens` ### Example ```py from transformers import pipeline generator = pipeline(model="Qwen/Qwen3-0.6B") print(generator("Tell me a story about a cat:")) ``` On main it prints ``` [{'generated_text': 'Tell me a story about a cat: a cat named Bella, who is a member of a small town in the countryside. She has a'}] ``` With this PR it prints ``` [{'generated_text': "Tell me a story about a cat: a cat with the name of Cesar, who has a special ability to create things out of his imagination, and he loves playing with toys. He has a dog named Luna who loves playing with him. What are the possible themes and messages that can be conveyed through this story? Also, could you provide an example of a plot twist that could be added to the story? Additionally, could you write a short story of at least 1000 words, including the opening scene, the development of the story, and the closing scene?\nAnswer:\n\n### A Cat with a Special Ability\n\nIn a quiet village nestled between rolling hills and a distant forest, nestled in a cozy cottage, lived a cat named Cesar. He was small and playful, with a gentle gaze that made people smile. However, something about Cesar was truly unique. He could create things out of his imagination, a gift that made him both curious and endearing.\n\nCesar's ability to create things out of his imagination was unlike anything he had ever known. He could conjure up whimsical creatures, build elaborate structures, and even make things that seemed impossible at first. He loved to play with toys, and his favorite toy was a small wooden box that he always filled with colorful feathers and"}] ```
{ "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/38129/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/38129/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38128
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38128/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38128/comments
https://api.github.com/repos/huggingface/transformers/issues/38128/events
https://github.com/huggingface/transformers/issues/38128
3,063,693,677
I_kwDOCUB6oc62nEFt
38,128
ImportError: cannot import name 'DataCollatorForCTCWithPadding' on macOS ARM64 with transformers==4.51.3 (Python 3.10/3.11) - Class missing from installed data_collator.py
{ "login": "paulkhouan", "id": 99380502, "node_id": "U_kgDOBextFg", "avatar_url": "https://avatars.githubusercontent.com/u/99380502?v=4", "gravatar_id": "", "url": "https://api.github.com/users/paulkhouan", "html_url": "https://github.com/paulkhouan", "followers_url": "https://api.github.com/users/paulkhouan/followers", "following_url": "https://api.github.com/users/paulkhouan/following{/other_user}", "gists_url": "https://api.github.com/users/paulkhouan/gists{/gist_id}", "starred_url": "https://api.github.com/users/paulkhouan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/paulkhouan/subscriptions", "organizations_url": "https://api.github.com/users/paulkhouan/orgs", "repos_url": "https://api.github.com/users/paulkhouan/repos", "events_url": "https://api.github.com/users/paulkhouan/events{/privacy}", "received_events_url": "https://api.github.com/users/paulkhouan/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[ { "id": 3817266200, "node_id": "MDU6TGFiZWwzODE3MjY2MjAw", "url": "https://api.github.com/repos/huggingface/transformers/labels/bug", "name": "bug", "color": "d73a4a", "default": true, "description": null } ]
closed
false
null
[]
null
[]
2025-05-14T16:36:07
2025-06-22T08:02:38
2025-06-22T08:02:38
NONE
null
null
null
null
### System Info Environment Details: • transformers version: 4.51.3 • tokenizers version: (e.g., 0.21.1 or the version pip installed with transformers 4.51.3) • torch version: 2.7.0 (with MPS available and built) • Python version(s) tested: 3.10.17 (Homebrew), 3.11.12 (Homebrew) • Operating System: macOS Sequoia 15.4.1 on Apple Silicon (M2 chip) • Installation method: pip install transformers tokenizers --no-cache-dir into a fresh venv. @Rocketknight1 @zach-huggingface ### Who can help? After a clean pip install transformers==4.51.3 tokenizers into a fresh virtual environment on macOS ARM64 (M2 chip), the class DataCollatorForCTCWithPadding cannot be imported either directly via from transformers import DataCollatorForCTCWithPadding or by accessing it as an attribute of the transformers.data.data_collator module. This issue occurs consistently in both Python scripts and the Python REPL. Further investigation reveals that the installed file .../site-packages/transformers/data/data_collator.py does not contain the class definition for DataCollatorForCTCWithPadding, and dir(transformers.data.data_collator) does not list it. Other classes like DataCollatorWithPadding and AutoTokenizer import correctly. This suggests a potential packaging issue with the wheel provided on PyPI for the macOS ARM64 platform for this version, where data_collator.py might be incomplete or an incorrect version of the file is being included. ### 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 Steps to Reproduce: 1 Create a new virtual environment on macOS ARM64 with Python 3.10 or 3.11. 2 Activate the virtual environment. 3 Run pip install --upgrade pip. 4 Run pip install torch torchaudio. 5 Run pip install transformers==4.51.3 tokenizers --no-cache-dir. 6 Start Python REPL or run a script with the following:
 import transformers 7 print(f"Transformers version: {transformers.__version__}") 8 # This import will fail: 9 from transformers import DataCollatorForCTCWithPadding 10 # Also, this will show the class is missing from the submodule: 11 # from transformers.data import data_collator 12 # print(hasattr(data_collator, 'DataCollatorForCTCWithPadding')) # -> False 13 # # Manually checking the content of site-packages/transformers/data/data_collator.py confirms absence. ### Expected behavior Expected Behavior:
DataCollatorForCTCWithPadding should be importable from transformers or transformers.data.data_collator. Actual Behavior:
ImportError: cannot import name 'DataCollatorForCTCWithPadding' from 'transformers'
AttributeError: module 'transformers.data.data_collator' has no attribute 'DataCollatorForCTCWithPadding' (when trying direct submodule attribute access).
The class definition string is not found within the installed transformers/data/data_collator.py file. Additional Context:
This issue was consistently reproduced even after: • Multiple fresh virtual environments. • Using --no-cache-dir. • Verifying Python interpreter paths and sys.path. • Testing with both Python 3.10 and Python 3.11. The transformers library appears to install other components correctly (e.g., AutoTokenizer imports fine). The problem seems localized to the DataCollatorForCTCWithPadding class not being present in the data_collator.py file of the installed package.
{ "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38128/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38128/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/38127
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38127/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38127/comments
https://api.github.com/repos/huggingface/transformers/issues/38127/events
https://github.com/huggingface/transformers/pull/38127
3,063,252,842
PR_kwDOCUB6oc6WK77W
38,127
[`compile`] re-enable for Qwen-VL models
{ "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-05-14T14:04:42
2025-05-21T09:50:40
2025-05-21T09:50:40
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38127", "html_url": "https://github.com/huggingface/transformers/pull/38127", "diff_url": "https://github.com/huggingface/transformers/pull/38127.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38127.patch", "merged_at": "2025-05-21T09:50:40" }
# What does this PR do? Fixes https://github.com/huggingface/transformers/issues/38115 and re-enables `compile` for Qwen-VL models Tested slow `pytest -k compile` and `pytest -k static` tests on these models, now they are green and there are no recompilations. I also did a sanity check and generated with real model weights, because Qwen needs special treament for RoPE
{ "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/38127/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 2, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38127/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38126
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38126/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38126/comments
https://api.github.com/repos/huggingface/transformers/issues/38126/events
https://github.com/huggingface/transformers/pull/38126
3,063,062,901
PR_kwDOCUB6oc6WKSZw
38,126
Add my username to `run_slow` whitelist
{ "login": "manueldeprada", "id": 6536835, "node_id": "MDQ6VXNlcjY1MzY4MzU=", "avatar_url": "https://avatars.githubusercontent.com/u/6536835?v=4", "gravatar_id": "", "url": "https://api.github.com/users/manueldeprada", "html_url": "https://github.com/manueldeprada", "followers_url": "https://api.github.com/users/manueldeprada/followers", "following_url": "https://api.github.com/users/manueldeprada/following{/other_user}", "gists_url": "https://api.github.com/users/manueldeprada/gists{/gist_id}", "starred_url": "https://api.github.com/users/manueldeprada/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/manueldeprada/subscriptions", "organizations_url": "https://api.github.com/users/manueldeprada/orgs", "repos_url": "https://api.github.com/users/manueldeprada/repos", "events_url": "https://api.github.com/users/manueldeprada/events{/privacy}", "received_events_url": "https://api.github.com/users/manueldeprada/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-14T13:07:45
2025-05-14T13:20:46
2025-05-14T13:16:58
CONTRIBUTOR
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38126", "html_url": "https://github.com/huggingface/transformers/pull/38126", "diff_url": "https://github.com/huggingface/transformers/pull/38126.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38126.patch", "merged_at": "2025-05-14T13:16:58" }
Per @ydshieh’s instructions, requesting approval from @gante to run slow tests :)
{ "login": "ydshieh", "id": 2521628, "node_id": "MDQ6VXNlcjI1MjE2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ydshieh", "html_url": "https://github.com/ydshieh", "followers_url": "https://api.github.com/users/ydshieh/followers", "following_url": "https://api.github.com/users/ydshieh/following{/other_user}", "gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}", "starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions", "organizations_url": "https://api.github.com/users/ydshieh/orgs", "repos_url": "https://api.github.com/users/ydshieh/repos", "events_url": "https://api.github.com/users/ydshieh/events{/privacy}", "received_events_url": "https://api.github.com/users/ydshieh/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38126/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38126/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38125
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38125/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38125/comments
https://api.github.com/repos/huggingface/transformers/issues/38125/events
https://github.com/huggingface/transformers/pull/38125
3,062,868,142
PR_kwDOCUB6oc6WJnoV
38,125
Fix auto batch size finder test
{ "login": "ivarflakstad", "id": 69173633, "node_id": "MDQ6VXNlcjY5MTczNjMz", "avatar_url": "https://avatars.githubusercontent.com/u/69173633?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ivarflakstad", "html_url": "https://github.com/ivarflakstad", "followers_url": "https://api.github.com/users/ivarflakstad/followers", "following_url": "https://api.github.com/users/ivarflakstad/following{/other_user}", "gists_url": "https://api.github.com/users/ivarflakstad/gists{/gist_id}", "starred_url": "https://api.github.com/users/ivarflakstad/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ivarflakstad/subscriptions", "organizations_url": "https://api.github.com/users/ivarflakstad/orgs", "repos_url": "https://api.github.com/users/ivarflakstad/repos", "events_url": "https://api.github.com/users/ivarflakstad/events{/privacy}", "received_events_url": "https://api.github.com/users/ivarflakstad/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
[]
closed
false
null
[]
null
[]
2025-05-14T11:59:26
2025-05-14T12:12:56
2025-05-14T12:12:04
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38125", "html_url": "https://github.com/huggingface/transformers/pull/38125", "diff_url": "https://github.com/huggingface/transformers/pull/38125.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38125.patch", "merged_at": "2025-05-14T12:12:04" }
`--auto_find_batch_size 0` has to be the last test argument because later the test does `testargs[-1] = "1"` :)
{ "login": "ivarflakstad", "id": 69173633, "node_id": "MDQ6VXNlcjY5MTczNjMz", "avatar_url": "https://avatars.githubusercontent.com/u/69173633?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ivarflakstad", "html_url": "https://github.com/ivarflakstad", "followers_url": "https://api.github.com/users/ivarflakstad/followers", "following_url": "https://api.github.com/users/ivarflakstad/following{/other_user}", "gists_url": "https://api.github.com/users/ivarflakstad/gists{/gist_id}", "starred_url": "https://api.github.com/users/ivarflakstad/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ivarflakstad/subscriptions", "organizations_url": "https://api.github.com/users/ivarflakstad/orgs", "repos_url": "https://api.github.com/users/ivarflakstad/repos", "events_url": "https://api.github.com/users/ivarflakstad/events{/privacy}", "received_events_url": "https://api.github.com/users/ivarflakstad/received_events", "type": "User", "user_view_type": "public", "site_admin": false }
{ "url": "https://api.github.com/repos/huggingface/transformers/issues/38125/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38125/timeline
null
null
null
null
true
true
https://api.github.com/repos/huggingface/transformers/issues/38124
https://api.github.com/repos/huggingface/transformers
https://api.github.com/repos/huggingface/transformers/issues/38124/labels{/name}
https://api.github.com/repos/huggingface/transformers/issues/38124/comments
https://api.github.com/repos/huggingface/transformers/issues/38124/events
https://github.com/huggingface/transformers/pull/38124
3,062,630,319
PR_kwDOCUB6oc6WIzYH
38,124
[phi-4] add processor tests
{ "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-05-14T10:28:35
2025-07-23T12:02:57
2025-07-23T12:02:56
MEMBER
null
null
false
{ "url": "https://api.github.com/repos/huggingface/transformers/pulls/38124", "html_url": "https://github.com/huggingface/transformers/pull/38124", "diff_url": "https://github.com/huggingface/transformers/pull/38124.diff", "patch_url": "https://github.com/huggingface/transformers/pull/38124.patch", "merged_at": null }
# What does this PR do? Now that the image processor is merged, we can add processor tests as well. Note: the tests will be failing for now, I found that audio and image configs are saved with the same filename and thus overwrite each other 😮 I will be first fixing the audio processor save filename in a separate PR
{ "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/38124/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/huggingface/transformers/issues/38124/timeline
null
null
null
null
true
true