transformers
transformers copied to clipboard
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
### Feature request Have a section on Pruna AI within the documentation. We did [a similar PR for diffusers](https://github.com/huggingface/diffusers/pull/11688) and thought it would be nice to show how to optimize...
### Feature request Recently, we have added the ability to load `gguf` files within [transformers](https://huggingface.co/docs/hub/en/gguf). The goal was to offer the possibility to users to further train/fine-tune their gguf models....
# What does this PR do? This PR continues https://github.com/huggingface/transformers/pull/34160, adds support for Florence-2. Some testcases didn't pass but I think it ready to start reviewing Fixes: - https://github.com/huggingface/transformers/issues/34155 -...
### System Info For the current version (4.52.4), in the `LlamaAttention` class, the type hint for the forward function https://github.com/huggingface/transformers/blob/aa798b7ac9ff5018b3578eb927dc438671ab6a3e/src/transformers/models/llama/modeling_llama.py#L231 and what it actually returns https://github.com/huggingface/transformers/blob/aa798b7ac9ff5018b3578eb927dc438671ab6a3e/src/transformers/models/llama/modeling_llama.py#L264 mismatch. Looking at the...
### Model description Apple recently released FastVLM, a new vision-language model introduced at CVPR 2025, which significantly improves on previous models in the LLaVA family. The smallest FastVLM variant outperforms...
# What does this PR do? Fixes #38709 (at least for CLIP and XCLIP for now and is fully backward compatible and existing functionality remains unaffected). Previously, `get__features` function in...
In the current documentation, I believe there is an error in the sample code. While the language token of the input is specified as `` (Portuguese), the returned translation is...
### System Info - `transformers` version: 4.49.0 - Platform: Linux-5.4.0-216-generic-x86_64-with-glibc2.31 - Python version: 3.13.2 - Huggingface_hub version: 0.29.2 - Safetensors version: 0.5.3 - Accelerate version: 1.7.0 - Accelerate config: not...
Issue importing models in jupyter notebooks 'No module named transformers.models.ipynb_checkpoints'
### System Info The following error comes up: ModuleNotFoundError: No module named transformers.models.ipynb_checkpoints' Packages: ipykernel==6.29.5 - `transformers` version: 4.52.4 - Platform: Linux-5.10.226-214.880.amzn2.x86_64-x86_64-with-glibc2.39 - Python version: 3.10.16 - Huggingface_hub version: 0.31.4...
# What does this PR do? Fixes #38061 The backbone is initialized only once when `use_pretrained_backbone=True`, that means `_is_hf_initialized=True`, so we should do nothing in the `_initialize_weights` function when `_is_hf_initialized=True`....