Files
Liger-Kernel/test/transformers
Vaibhav JindalandClaude Opus 4.6 8e6232a08f Add Liger Kernel support for Ministral models (#1166)
This PR was generated automatically by Claude Code with minimal human
intervention. Claude uses the skill written in #1167 to generate this PR
and test it out.

Ministral (model_type: "ministral") is a separate model type in
transformers v5+ with its own MinistralForCausalLM class. This adds full
Liger Kernel optimization support including RoPE, RMSNorm, SwiGLU,
CrossEntropyLoss, and FusedLinearCrossEntropy.

## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->

- Adds full Liger Kernel optimization for Ministral models (model_type:
"ministral") in transformers v5+
- Patches: RoPE, RMSNorm, SwiGLU, CrossEntropyLoss,
FusedLinearCrossEntropy
- All 5 tests (instance patching + 4 convergence) validated on H100 GPU

<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->

## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->

<!-- 
Replace BLANK with your device type. For example, A100-80G-PCIe

Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them. 
-->

- Hardware Type: <BLANK>
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-27 22:21:31 +00:00
..
2025-05-31 11:40:49 -07:00
2025-05-14 23:53:13 -07:00