Liger-kernel

Latest version: v0.5.2

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.5.2

What's Changed
* Disable Qwen2 VL test for with logits conv test by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/463
* Fix Qwen2VL mrope for transformers 4.47.0 by li-plus in https://github.com/linkedin/Liger-Kernel/pull/464
* Revert Workaround of Disabling QWEN2_VL in Convergence Tests by austin362667 in https://github.com/linkedin/Liger-Kernel/pull/466


**Full Changelog**: https://github.com/linkedin/Liger-Kernel/compare/v0.5.1...v0.5.2

0.5.1

What's Changed
* Fix liger orpo trainer import error by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/459
* Update pyproject.toml by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/462


**Full Changelog**: https://github.com/linkedin/Liger-Kernel/compare/v0.5.0...v0.5.1

0.5.0

Highlights
1. **Post Training Loss**: Introducing the first open-source optimized post-training losses in Liger Kernel with ~80% memory reduction, featuring DPO, CPO, ORPO, SimPO, JSD, and more. No more OOM nightmares for post-training ML researchers!
<img src="https://github.com/user-attachments/assets/19efbd07-f70b-4573-a3be-33fa80e7c4e1" alt="image" width="400">

2. **AMD CI**: With AMD’s generous sponsorship of MI300s, we’ve integrated them into our CI. Special thanks to Embedded LLM for building the AMD CI infrastructure. 428
3. **XPU Support**: In collaboration with Intel, we now support XPU, demonstrating comparable performance gains with other vendors. 407

What's Changed
* Adds the CPO Alignment Loss Function by pramodith in https://github.com/linkedin/Liger-Kernel/pull/382
* Qwen2-VL Training Example w/ Liger by tyler-romero in https://github.com/linkedin/Liger-Kernel/pull/389
* Support Qwen2-VL's multimodal RoPE implementation by li-plus in https://github.com/linkedin/Liger-Kernel/pull/384
* add xpu device support for `rms_norm` by faaany in https://github.com/linkedin/Liger-Kernel/pull/379
* fix qwen2 import failure in test by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/394
* Add Chunked SimPO Loss by pramodith in https://github.com/linkedin/Liger-Kernel/pull/386
* Add script to reproducibly run examples on Modal by tyler-romero in https://github.com/linkedin/Liger-Kernel/pull/397
* add nn.module support for chunked loss function by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/402
* Generalize JSD to FKL/RKL by yundai424 in https://github.com/linkedin/Liger-Kernel/pull/393
* Enable keyword arguments for liger functional by hongpeng-guo in https://github.com/linkedin/Liger-Kernel/pull/400
* add reference model logps to chunkedloss interface and fix dpo loss fn by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/405
* Optimize CE Loss by casting dtype to float32 inside kernel by pramodith in https://github.com/linkedin/Liger-Kernel/pull/406
* Xpu support by mgrabban in https://github.com/linkedin/Liger-Kernel/pull/407
* Fix `get_batch_loss_metrics` comments by austin362667 in https://github.com/linkedin/Liger-Kernel/pull/413
* Add rebuild to CI by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/415
* Fix os env by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/416
* Adjust QWEN2 VL Loss `rtol` by austin362667 in https://github.com/linkedin/Liger-Kernel/pull/412
* [tiny] Add QwQ to readme (same arch as Qwen2) by tyler-romero in https://github.com/linkedin/Liger-Kernel/pull/424
* Enhance Cross Entropy Softcap Unit Test by austin362667 in https://github.com/linkedin/Liger-Kernel/pull/423
* Add ORPO Trainer + support HF metrics directly from chunked loss functions + fixes to avoid torch compile recompilations by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/429
* Add Build Success/Fail Badge by hebiao064 in https://github.com/linkedin/Liger-Kernel/pull/431
* Switch amd-ci to use MI300X runner. by saienduri in https://github.com/linkedin/Liger-Kernel/pull/428
* [CI] rename ci and add cron job for amd by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/433
* [CI] shorten ci name by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/434
* update ci icon on readme by bboyleonp666 in https://github.com/linkedin/Liger-Kernel/pull/440
* Introduce Knowledge Distillation Base by austin362667 in https://github.com/linkedin/Liger-Kernel/pull/432
* [AMD] [CI] Clean up `amd-ci` by tjtanaa in https://github.com/linkedin/Liger-Kernel/pull/436
* Add xpu in env report by abhilash1910 in https://github.com/linkedin/Liger-Kernel/pull/443
* Specify scheduled CI in AMD badge by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/446
* improve code quality for chunk loss by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/448
* Add paper link and formula for preference loss by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/449
* Make kernel doc lean by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/450
* Fix LigerCrossEntropyLoss Reduction Behavior for "None" Mode by hebiao064 in https://github.com/linkedin/Liger-Kernel/pull/435
* add eng blog by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/452
* add chunked loss to readme by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/453
* change chunked readme by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/454
* add sponsorship and collab by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/457
* version bump to 0.5.0 by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/455
* Add HIP (ROCm) and Liger Kernel to env report by Comet0322 in https://github.com/linkedin/Liger-Kernel/pull/456

New Contributors
* li-plus made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/384
* faaany made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/379
* hongpeng-guo made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/400
* mgrabban made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/407
* hebiao064 made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/431
* saienduri made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/428
* bboyleonp666 made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/440
* abhilash1910 made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/443
* Comet0322 made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/456

0.4.2

Highlights

Fix https://github.com/linkedin/Liger-Kernel/issues/390 https://github.com/linkedin/Liger-Kernel/issues/383

What's Changed
* modify readmes and create license/acknowledgement docs by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/377
* Add Chunked ORPO Loss by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/362
* Refactor `LigerFusedLinearPreferenceBase` by pramodith in https://github.com/linkedin/Liger-Kernel/pull/381
* Support Chunked DPO Loss Kernel by austin362667 in https://github.com/linkedin/Liger-Kernel/pull/378
* Fix flce not being patched after reverting in convergence test by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/385
* Qwen2-VL Bug / Incompatibility Fixes by tyler-romero in https://github.com/linkedin/Liger-Kernel/pull/388
* Fix incomplete RMSNorm patch by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/392


**Full Changelog**: https://github.com/linkedin/Liger-Kernel/compare/v0.4.1...v0.4.2

0.4.1

Highlights

1. **Gemma 2 Support**: The long pending gemma 2 is finally supported thanks to Tcc0403! He has implemented the nasty softcapping in fused linear cross entropy (https://github.com/linkedin/Liger-Kernel/pull/320) and discovered the convergence issue which later fixed by ByronHsu and Tcc0403 together. (https://github.com/linkedin/Liger-Kernel/pull/376)

2. **CrossEntropy Patching FIx**: If you use monkey patch for `CrossEntropy` (Not FLCE), it is actually not patched after transformers `4.46.1`. This is because `CrossEntropy` was replaced with `F.cross_entropy` in the model code. We fixed the issue in the PR (https://github.com/linkedin/Liger-Kernel/pull/375)

3. **GroupNorm Kernel**: Our new contributor pramodith implemented a GroupNorm kernel https://github.com/linkedin/Liger-Kernel/pull/375 with 2x Speedup.

What's Changed
* BUG: Fix bug in layer norm tests. by pramodith in https://github.com/linkedin/Liger-Kernel/pull/359
* Support Z Loss in CE by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/239
* Improve compatibility to access the base models by why-in-Shanghaitech in https://github.com/linkedin/Liger-Kernel/pull/340
* poke test again by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/360
* Kernels for GroupNorm by pramodith in https://github.com/linkedin/Liger-Kernel/pull/353
* Remove trailing newline. by ckckjw in https://github.com/linkedin/Liger-Kernel/pull/364
* Fix typo in the description of FusedLinearJSD by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/366
* Updates Readme to add GroupNorm by pramodith in https://github.com/linkedin/Liger-Kernel/pull/365
* Support FusedLinearCrossEntropy for Gemma2 by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/320
* Rotate modal and pypi tokens by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/372
* Fix release password by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/373
* Support CE after grad acc fix by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/375
* Support out-of-place RMSNorm to fix gemma2 by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/376

New Contributors
* pramodith made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/359
* why-in-Shanghaitech made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/340
* ckckjw made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/364

**Full Changelog**: https://github.com/linkedin/Liger-Kernel/compare/v0.4.0...v0.4.1

0.4.0

Highlights

1. **AMD GPU**: We have partnered with [Embedding LLM](https://embeddedllm.com/) to adjust the Triton configuration to fully support AMD! With version 0.4.0, you can run multi-GPU training with 26% higher speed and 60% lower memory usage on AMD. See the full blogpost from https://embeddedllm.com/blog/cuda-to-rocm-portability-case-study-liger-kernel. edenzzzz docshotgun tjtanaa

2. **Technical Report**: We have published a technical report on arXiv (https://arxiv.org/pdf/2410.10989) with abundant details.

3. **Modal CI**: We have moved our entire GPU CI stack to Modal! Thanks to intelligent Docker layer caching and blazingly fast container startup time and scheduling, we have reduced the CI overhead by over 10x (from minutes to seconds).

4. **LLaMA 3.2-Vision Model**: We have added kernel support for the LLaMA 3.2-Vision model. You can easily use `liger_kernel.transformers.apply_liger_kernel_to_mllama` to patch the model. tyler-romero shivam15s

5. **JSD Kernel**: We have added the JSD kernel for distillation, which also comes with a chunking version! Tcc0403 yundai424 qingquansong

6. **HuggingFace Gradient Accumulation Fixes**: We have fixed the notorious HuggingFace gradient accumulation issue (https://github.com/huggingface/transformers/pull/34191) by carefully adjusting the cross entropy scalar. You can now safely use v0.4.0 with the latest HuggingFace gradient accumulation fixes (transformers>=4.46.2)!


What's Changed
* Acknowledgement in NOTICE file by momochen in https://github.com/linkedin/Liger-Kernel/pull/287
* Add JSD kernel by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/264
* Cancel in-progress but out-of-date GPU actions by tyler-romero in https://github.com/linkedin/Liger-Kernel/pull/289
* Fix assert_verbose_allclose bugs by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/261
* fix qwen2-vl: create correct rope position_ids when position_ids is None by Sanster in https://github.com/linkedin/Liger-Kernel/pull/276
* Add missing Qwen2-VL monkey patch test by tyler-romero in https://github.com/linkedin/Liger-Kernel/pull/283
* FIX: tl.program_id() does indeed not have a cast method in triton2.3.1 by wizyoung in https://github.com/linkedin/Liger-Kernel/pull/274
* RMSNorm aggregation by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/255
* FEAT Adding experimental feature : Triton mm int8xint2 by MekkCyber in https://github.com/linkedin/Liger-Kernel/pull/195
* Add beta support for jsd by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/290
* chore: update cross_entropy.py by eltociear in https://github.com/linkedin/Liger-Kernel/pull/293
* Apache and MIT license reference by momochen in https://github.com/linkedin/Liger-Kernel/pull/294
* Monkeypatch for Llama 3.2-Vision by tyler-romero in https://github.com/linkedin/Liger-Kernel/pull/282
* Add FusedLinearJSD by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/300
* Move `logits.float()` call by ringohoffman in https://github.com/linkedin/Liger-Kernel/pull/308
* Added contributors and back to top by barbarian360 in https://github.com/linkedin/Liger-Kernel/pull/304
* Add ignore_index and label to jsd and fl-jsd by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/306
* Monkey patch layer norm in mllama by shivam15s in https://github.com/linkedin/Liger-Kernel/pull/302
* Introducing Liger Kernel Guru on Gurubase.io by kursataktas in https://github.com/linkedin/Liger-Kernel/pull/316
* Update citation and add tech report by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/317
* fix FLCE AMP issue by yundai424 in https://github.com/linkedin/Liger-Kernel/pull/318
* fix fused JSD with ignore index by yundai424 in https://github.com/linkedin/Liger-Kernel/pull/330
* Add missing ignore_index tests by Tcc0403 in https://github.com/linkedin/Liger-Kernel/pull/310
* docs(CONTRIBUTING): fix typo by novanish in https://github.com/linkedin/Liger-Kernel/pull/331
* Fix huggingface GA issue for llama by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/333
* Fix incorrect training of first and last Medusa heads by chiwanpark in https://github.com/linkedin/Liger-Kernel/pull/325
* Fix FusedLinearJSD precision issue when using AMP by yundai424 in https://github.com/linkedin/Liger-Kernel/pull/336
* Fix llama forward patch by hiyouga in https://github.com/linkedin/Liger-Kernel/pull/339
* [AMD] [ROCm] Pick `num_warps` based on platform by tjtanaa in https://github.com/linkedin/Liger-Kernel/pull/326
* set up modal ci by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/344
* avoid duplicate ci by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/345
* Aggressively trim unit test bloat by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/346
* Trim conv test by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/348
* merge two tests into one by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/349
* broadcast grad acc fix to all models by ByronHsu in https://github.com/linkedin/Liger-Kernel/pull/354

New Contributors
* Sanster made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/276
* MekkCyber made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/195
* ringohoffman made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/308
* barbarian360 made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/304
* kursataktas made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/316
* novanish made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/331
* hiyouga made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/339
* tjtanaa made their first contribution in https://github.com/linkedin/Liger-Kernel/pull/326

**Full Changelog**: https://github.com/linkedin/Liger-Kernel/compare/v0.3.1...v0.4.0

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.