transformers/tests/trainer
Hamza Benchekroun 797860c68c
Some checks are pending
Self-hosted runner (benchmark) / Benchmark (aws-g5-4xlarge-cache) (push) Waiting to run
Build documentation / build (push) Waiting to run
New model PR merged notification / Notify new model (push) Waiting to run
Slow tests on important models (on Push - A10) / Get all modified files (push) Waiting to run
Slow tests on important models (on Push - A10) / Slow & FA2 tests (push) Blocked by required conditions
Self-hosted runner (push-caller) / Check if setup was changed (push) Waiting to run
Self-hosted runner (push-caller) / build-docker-containers (push) Blocked by required conditions
Self-hosted runner (push-caller) / Trigger Push CI (push) Blocked by required conditions
Secret Leaks / trufflehog (push) Waiting to run
Update Transformers metadata / build_and_package (push) Waiting to run
feat: add flexible Liger Kernel configuration to TrainingArguments (#38911)
* feat: add flexible Liger Kernel configuration to TrainingArguments

Add support for granular Liger Kernel configuration through a new
`liger_kernel_config` parameter in TrainingArguments. This allows users
to selectively enable/disable specific kernels (rope, swiglu, cross_entropy,
etc.) instead of the current approach that rely on default configuration.

Features:
- Add `liger_kernel_config` dict parameter to TrainingArguments
- Support selective kernel application for all supported models
- Maintain full backward compatibility with existing `use_liger_kernel` flag

Example usage:
```python
TrainingArguments(
    use_liger_kernel=True,
    liger_kernel_config={
        "rope": True,
        "swiglu": True,
        "cross_entropy": False,
        "fused_linear_cross_entropy": True
    }
)
Closes #38905

* Address comments and update Liger section in Trainer docs
2025-06-19 15:54:08 +00:00
..
__init__.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_data_collator.py add FlashAttentionKwargs and seq_idx to flat collator (#36456) 2025-04-16 15:45:03 +02:00
test_trainer_callback.py fix: prevent second save in the end of training if last step was saved already (#36219) 2025-02-20 17:38:52 +01:00
test_trainer_distributed_loss.py fix bug in distributed loss test (#38166) 2025-05-16 16:21:35 +00:00
test_trainer_distributed_worker_seed.py enable trainer test cases on xpu (#38138) 2025-05-15 12:17:44 +00:00
test_trainer_distributed.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_trainer_fsdp.py fix FSDP + torch.compile bug when saving pretrained model (#37725) 2025-05-06 17:51:28 +02:00
test_trainer_seq2seq.py [generation] Less verbose warnings by default (#38179) 2025-05-19 10:03:37 +00:00
test_trainer_tpu.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_trainer_utils.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_trainer.py feat: add flexible Liger Kernel configuration to TrainingArguments (#38911) 2025-06-19 15:54:08 +00:00