transformers/src/transformers
Mohammad Nasirifar 038a59e2cd
Initialize flash attn flag (#38768)
_flash_supports_window_size is used further down in this file and relied on by e.g. [ring-flash-attention](https://github.com/zhuzilin/ring-flash-attention/blob/123f924/ring_flash_attn/adapters/hf_adapter.py#L9-L11). Even though it is an unexported name, it still makes sense to keep the state of `globals()` in this file consistent.
2025-06-12 14:06:13 +00:00
..
commands [add-new-model-like] Robust search & proper outer '),' in tokenizer mapping (#38703) 2025-06-10 12:25:12 +00:00
data Allow mlm_probability to be set to None when mlm=False in DataCollatorForLanguageModeling (#38522) (#38537) 2025-06-05 13:54:12 +01:00
generation Use OSError (#38712) 2025-06-10 12:13:49 +00:00
integrations Remove IPEX requirement for bitsandbytes on CPU (#38594) 2025-06-11 17:46:34 +02:00
kernels Use deformable_detr kernel from the Hub (#36853) 2025-03-21 13:08:47 +01:00
loss Better typing for num_items_in_batch (#38728) 2025-06-11 16:26:41 +02:00
models Fix Typos in Comments: "quantitation" → "quantization", "averege" → "average" (#38766) 2025-06-12 14:04:39 +00:00
onnx Use OSError (#38712) 2025-06-10 12:13:49 +00:00
pipelines Deprecate TF + JAX (#38758) 2025-06-11 17:28:06 +01:00
quantizers Logging message for `` is_bitsandbytes_available() `` (#38528) 2025-06-10 10:15:01 +00:00
sagemaker [Refactor] Relative imports wherever we can (#21880) 2023-03-02 09:45:42 +01:00
utils Skip some export tests on torch 2.7 (#38677) 2025-06-12 12:47:15 +02:00
__init__.py 🚨🚨[core] Completely rewrite the masking logic for all attentions (#37866) 2025-05-22 11:38:26 +02:00
activations_tf.py Add tf_keras imports to prepare for Keras 3 (#28588) 2024-01-30 17:26:36 +00:00
activations.py Remove old code for PyTorch, Accelerator and tokenizers (#37234) 2025-04-10 20:54:21 +02:00
audio_utils.py Add CSM model (#36719) 2025-05-07 10:20:13 -04:00
cache_utils.py Updated deprecated typing imports with equivalents for Python 3.9+ (#38546) 2025-06-04 16:57:23 +00:00
configuration_utils.py Add support for MiniMax's MiniMax-Text-01 (#35831) 2025-06-04 09:38:40 +02:00
convert_graph_to_onnx.py Update ruff to 0.11.2 (#36962) 2025-03-25 16:00:11 +01:00
convert_pytorch_checkpoint_to_tf2.py Set weights_only in torch.load (#36991) 2025-03-27 14:55:50 +00:00
convert_slow_tokenizer.py Add optional RMSNorm support to BitNet quantization (config + layers) (#38087) 2025-05-16 12:38:06 +02:00
convert_slow_tokenizers_checkpoints_to_fast.py Use pyupgrade --py39-plus to improve code (#36843) 2025-03-20 14:39:44 +00:00
convert_tf_hub_seq_to_seq_bert_to_pytorch.py Use pyupgrade --py39-plus to improve code (#36843) 2025-03-20 14:39:44 +00:00
debug_utils.py Fix typos in comments (#37694) 2025-04-24 15:59:56 +01:00
dependency_versions_check.py ⚠️ Time to say goodbye to py37 (#24091) 2023-06-28 07:22:39 +02:00
dependency_versions_table.py Remove isort from dependencies (#38616) 2025-06-05 16:42:49 +00:00
dynamic_module_utils.py 🚨 🚨 Fix custom code saving (#37716) 2025-05-26 17:37:30 +01:00
feature_extraction_sequence_utils.py Use pyupgrade --py39-plus to improve code (#36843) 2025-03-20 14:39:44 +00:00
feature_extraction_utils.py Deprecate TF + JAX (#38758) 2025-06-11 17:28:06 +01:00
file_utils.py [core] Large/full refactor of from_pretrained (#36033) 2025-03-12 13:39:25 +01:00
hf_argparser.py Fix Optional type annotation (#36841) 2025-03-26 13:53:44 +00:00
hyperparameter_search.py Fix Optional type annotation (#36841) 2025-03-26 13:53:44 +00:00
image_processing_base.py 🚨 🚨 Fix custom code saving (#37716) 2025-05-26 17:37:30 +01:00
image_processing_utils_fast.py Add args support for fast image processors (#37018) 2025-05-16 12:01:46 -04:00
image_processing_utils.py Add Optional to remaining types (#37808) 2025-04-28 14:20:45 +01:00
image_transforms.py 🔴 Video processors as a separate class (#35206) 2025-05-12 11:55:51 +02:00
image_utils.py 🔴 Video processors as a separate class (#35206) 2025-05-12 11:55:51 +02:00
keras_callbacks.py Use pyupgrade --py39-plus to improve code (#36843) 2025-03-20 14:39:44 +00:00
masking_utils.py Fix masking utils (#38783) 2025-06-12 11:00:46 +02:00
model_debugging_utils.py Adds use_repr to model_addition_debugger_context (#37984) 2025-05-23 09:35:13 +00:00
modelcard.py fix: Add 'image-text-to-text' to TASK_MAPPING (#37107) 2025-04-02 14:51:03 +02:00
modeling_attn_mask_utils.py Fix attention mask expansion when converting to executorch (#38637) 2025-06-09 15:00:55 +00:00
modeling_flash_attention_utils.py Initialize flash attn flag (#38768) 2025-06-12 14:06:13 +00:00
modeling_flax_outputs.py Add Optional to types (#37163) 2025-04-03 16:38:01 +01:00
modeling_flax_pytorch_utils.py Use OSError (#38712) 2025-06-10 12:13:49 +00:00
modeling_flax_utils.py Deprecate TF + JAX (#38758) 2025-06-11 17:28:06 +01:00
modeling_gguf_pytorch_utils.py Support loading Gemma3 QAT GGUF models (#37649) 2025-04-22 11:23:17 +02:00
modeling_layers.py Introduce GradientCheckpointingLayer (#37223) 2025-04-22 11:33:31 +01:00
modeling_outputs.py Fix past_key_values type hint in model output types (#37953) 2025-05-13 13:36:49 +00:00
modeling_rope_utils.py Update composition flag usage (#36263) 2025-04-09 11:48:49 +02:00
modeling_tf_outputs.py Add Optional to types (#37163) 2025-04-03 16:38:01 +01:00
modeling_tf_pytorch_utils.py Stop TF weight rename reDOS (#38325) 2025-05-26 16:58:51 +01:00
modeling_tf_utils.py Deprecate TF + JAX (#38758) 2025-06-11 17:28:06 +01:00
modeling_utils.py Use OSError (#38712) 2025-06-10 12:13:49 +00:00
optimization_tf.py Fix Optional type annotation (#36841) 2025-03-26 13:53:44 +00:00
optimization.py fix: Propagate lr_scheduler_kwargs options to create LR Scheduler when LayerWiseDummyOptimizer is used (#34559) 2025-05-13 13:56:45 +02:00
processing_utils.py [video processors] support frame sampling within processors (#38105) 2025-06-12 09:34:30 +00:00
py.typed Add py.typed (#37022) 2025-04-02 14:17:27 +01:00
pytorch_utils.py protect dtensor import (#38496) 2025-05-30 17:36:00 +02:00
safetensors_conversion.py Change back to Thread for SF conversion (#35236) 2024-12-12 16:05:04 +01:00
testing_utils.py Fix Gemma2IntegrationTest (#38492) 2025-06-02 22:45:09 +02:00
tf_utils.py Add Optional to types (#37163) 2025-04-03 16:38:01 +01:00
time_series_utils.py Use pyupgrade --py39-plus to improve code (#36843) 2025-03-20 14:39:44 +00:00
tokenization_utils_base.py Deprecate TF + JAX (#38758) 2025-06-11 17:28:06 +01:00
tokenization_utils_fast.py refactor can_save_slow_tokenizer (#37722) 2025-05-23 17:29:38 +02:00
tokenization_utils.py Add Optional to types (#37163) 2025-04-03 16:38:01 +01:00
trainer_callback.py Fix Optional type annotation (#36841) 2025-03-26 13:53:44 +00:00
trainer_pt_utils.py Remove Deprecated verbose arg in LayerWiseDummyScheduler (#38197) 2025-05-19 13:49:11 +00:00
trainer_seq2seq.py [generation] Less verbose warnings by default (#38179) 2025-05-19 10:03:37 +00:00
trainer_utils.py update seed_worker to set seed based on worker_id and rank (#37980) 2025-05-12 15:59:16 +00:00
trainer.py Better typing for num_items_in_batch (#38728) 2025-06-11 16:26:41 +02:00
training_args_seq2seq.py [docs] Remove sortish_sampler (#35539) 2025-01-07 12:06:19 -08:00
training_args_tf.py Use pyupgrade --py39-plus to improve code (#36843) 2025-03-20 14:39:44 +00:00
training_args.py Reduce verbosity for average_tokens_across_devices=True and world size = 1 (#38785) 2025-06-12 14:02:53 +02:00
video_processing_utils.py [video processors] support frame sampling within processors (#38105) 2025-06-12 09:34:30 +00:00
video_utils.py [video processors] support frame sampling within processors (#38105) 2025-06-12 09:34:30 +00:00