transformers/tests
Abu Bakr Soliman 49b5ab6a27
Support QuestionAnswering Module for ModernBert based models. (#35566)
* push ModernBertForQuestionAnswering

* update ModernBertForQuestionAnswering

* update __init__ loading

* set imports for ModernBertForQuestionAnswering

* update ModernBertForQuestionAnswering

* remove debugging logs

* update init_weights method

* remove custom initialization for ModernBertForQuestionAnswering

* apply make fix-copies

* apply make style

* apply make fix-copies

* append ModernBertForQuestionAnswering to the pipeline supported models

* remove unused file

* remove invalid autoload value

* update en/model_doc/modernbert.md

* apply make fixup command

* make fixup

* Update dummies

* update usage tips for ModernBertForQuestionAnswering

* update usage tips for ModernBertForQuestionAnswering

* add init

* add lint

* add consistency

* update init test

* change text to trigger stuck text

* use self.loss_function instead of custom loss

By @Cyrilvallez

Co-authored-by: Cyril Vallez <cyril.vallez@gmail.com>

* Update modeling_modernbert.py

make comparable commit to even it out

* Match whitespace

* whitespace

---------

Co-authored-by: Matt <rocketknight1@gmail.com>
Co-authored-by: Orion Weller <wellerorion@gmail.com>
Co-authored-by: Orion Weller <31665361+orionw@users.noreply.github.com>
Co-authored-by: Cyril Vallez <cyril.vallez@gmail.com>
2025-03-26 21:24:18 +01:00
..
agents use torch.testing.assertclose instead to get more details about error in cis (#35659) 2025-01-24 16:55:28 +01:00
bettertransformer Fix typos in tests (#36547) 2025-03-05 15:04:06 -08:00
deepspeed chore: fix typos in the tests directory (#36813) 2025-03-21 10:20:05 +01:00
extended [tests] skip tests for xpu (#33553) 2024-09-19 19:28:04 +01:00
fixtures Implementation of SuperPoint and AutoModelForKeypointDetection (#28966) 2024-03-19 14:43:02 +00:00
fsdp HPU support (#36424) 2025-03-12 09:08:12 +01:00
generation [chameleon] fix num image token check (#36918) 2025-03-24 12:36:08 +01:00
models Support QuestionAnswering Module for ModernBert based models. (#35566) 2025-03-26 21:24:18 +01:00
optimization Just import torch AdamW instead (#36177) 2025-03-19 18:29:40 +00:00
peft_integration Fix pipeline+peft interaction (#36480) 2025-03-03 18:01:43 +00:00
pipelines Update ruff to 0.11.2 (#36962) 2025-03-25 16:00:11 +01:00
quantization Change GPUS to GPUs (#36945) 2025-03-25 17:25:39 +01:00
repo_utils [Modular] skip modular checks based on diff (#36130) 2025-02-13 12:53:21 +00:00
sagemaker Change GPUS to GPUs (#36945) 2025-03-25 17:25:39 +01:00
tensor_parallel fix typos in the tests directory (#36717) 2025-03-17 17:45:57 +00:00
tokenization Fix PretrainedTokenizerFast check => Fix PretrainedTokenizerFast Save (#35835) 2025-02-13 12:00:33 +01:00
trainer Remove deprecated training arguments (#36946) 2025-03-26 16:44:48 +00:00
utils [Utils] torch version checks optionally accept dev versions (#36847) 2025-03-25 10:58:58 +00:00
__init__.py
test_backbone_common.py Align backbone stage selection with out_indices & out_features (#27606) 2023-12-20 18:33:17 +00:00
test_configuration_common.py Refactor Attention implementation for ViT-based models (#36545) 2025-03-20 15:15:01 +00:00
test_feature_extraction_common.py
test_image_processing_common.py Make the flaky list a little more general (#36704) 2025-03-14 12:15:32 +00:00
test_image_transforms.py Uses Collection in transformers.image_transforms.normalize (#36301) 2025-02-21 18:38:41 +01:00
test_modeling_common.py Support QuestionAnswering Module for ModernBert based models. (#35566) 2025-03-26 21:24:18 +01:00
test_modeling_flax_common.py Fix typos in tests (#36547) 2025-03-05 15:04:06 -08:00
test_modeling_tf_common.py fix typos in the tests directory (#36717) 2025-03-17 17:45:57 +00:00
test_pipeline_mixin.py Add image text to text pipeline (#34170) 2024-10-31 15:48:11 -04:00
test_processing_common.py Support return_tensors in audio chat templates (#34601) 2025-03-25 11:08:47 +01:00
test_sequence_feature_extraction_common.py
test_tokenization_common.py chore: fix typos in the tests directory (#36813) 2025-03-21 10:20:05 +01:00
test_training_args.py Fix TrainingArguments.torch_empty_cache_steps post_init check (#36734) 2025-03-17 16:09:46 +01:00