$ the-wire · showcase
Transformers drops deprecated code, adds NeoMME and gradient checkpointing offload
By RepoJournal · Filed · About Hugging Face
Transformers, TRL, and Kernels-Community ship fixes and features that touch long-standing workflows, from deprecated API removal to VLM training and flash-attn2 pointer bugs.
Transformers removed deprecated code in a sweeping cleanup [1], meaning any code relying on those APIs will need to migrate before the next release. In the same repo, NeoMME and NeoMME-Retriever were added [2], bringing new model architectures to the library, though integration tests are temporarily removed pending public weights. Gradient checkpointing now supports offload [3], which can reduce memory usage during training by moving activations off the GPU. A behavior change: SmolVLM/Idefics2/Idefics3 previously nulled pixel_values when image_hidden_states was present; now generate() raises an error if both are set, so users must clear pixel_values manually [4]. RoPE encoders dropped a position-indexed token type lookup [5], which could affect positional encoding behavior in those models. In TRL, AsyncGRPOTrainer now supports VLMs [6], but "this DOESNT support multimodal training" per the PR, freezing everything outside the text tower and fixing two specific functions. Kernels-community fixed dangling pointers in flash-attn2 backward pass when num_kv_heads != num_heads [7], which can prevent memory corruption in attention backprop.
Action items
- → Audit Transformers users: remove any use of deprecated APIs slated for removal huggingface/transformers [immediate]
- → If using SmolVLM/Idefics2/Idefics3 with image_hidden_states, clear pixel_values to avoid runtime errors huggingface/transformers [immediate]
- → Evaluate NeoMME for your use case after weights are public; integration tests are pending huggingface/transformers [plan]
- → If using flash-attn2 in kernels-community, upgrade to the fixed version to avoid dangling pointer issues huggingface/kernels-community [immediate]
References
- [1] Deprecated stuff gone (#48367) ↗ huggingface/transformers
- [2] Add NeoMME and NeoMME-Retriever (#47992) ↗ huggingface/transformers
- [3] Add offload to gradient checkpointing ↗ huggingface/transformers
- [4] Document image_hidden_states/pixel_values mutual exclusivity for SmolVLM/Idefics2/Idefics3 (#47714) ↗ huggingface/transformers
- [5] fix(models): Drop the position-indexed token type lookup in RoPE encoders (#48407) ↗ huggingface/transformers
- [6] fix vlm support asyncgrpo ↗ huggingface/trl
- [7] flash-attn2: fix dangling pointers in bwd when `num_kv_heads != num_heads` (#1125) ↗ huggingface/kernels-community