#2121st of 41 in Training and fine-tuning

liger-kernel

Triton kernels that cut memory and raise throughput for LLM training

Stars
6.7k
License
BSD-2-Clause
Last commit
Oct 2026
Last release
Oct 2026
Language
Python
Stars, last 30 weeks+480
4 Apr 2026: 6,201 stars11 Apr 2026: 6,217 stars18 Apr 2026: 6,232 stars25 Apr 2026: 6,254 stars2 May 2026: 6,275 stars9 May 2026: 6,295 stars16 May 2026: 6,312 stars23 May 2026: 6,333 stars30 May 2026: 6,353 stars6 Jun 2026: 6,376 stars13 Jun 2026: 6,391 stars20 Jun 2026: 6,409 stars27 Jun 2026: 6,431 stars4 Jul 2026: 6,450 stars11 Jul 2026: 6,469 stars18 Jul 2026: 6,491 stars25 Jul 2026: 6,509 stars1 Aug 2026: 6,518 stars8 Aug 2026: 6,532 stars15 Aug 2026: 6,550 stars22 Aug 2026: 6,563 stars29 Aug 2026: 6,577 stars5 Sept 2026: 6,587 stars12 Sept 2026: 6,600 stars19 Sept 2026: 6,611 stars26 Sept 2026: 6,626 stars3 Oct 2026: 6,639 stars10 Oct 2026: 6,648 stars17 Oct 2026: 6,661 stars24 Oct 2026: 6,672 stars31 Oct 2026: 6,681 stars

6,201 on 4 Apr 20266,681 on 31 Oct 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Liger Kernel is a PyTorch library of Triton kernels for RMSNorm, RoPE, SwiGLU, CrossEntropy and FusedLinearCrossEntropy, plus chunked post-training losses such as DPO, ORPO, SimPO, KTO and JSD. A one-line patch swaps them into Hugging Face models. The README reports about 20% higher multi-GPU throughput and 60% lower memory on LLaMA 3-8B, with exact (non-approximated) computation.

Who it is for: Engineers training or fine-tuning LLMs on GPUs who need less memory use

Strengths

  • One-line patching of Hugging Face models; also usable as standalone modules
  • Works with FSDP, DeepSpeed and DDP, and integrates with Axolotl, LLaMA-Factory and TRL
  • Exact computation, checked by unit and convergence tests against runs without Liger
  • Chunked post-training losses (DPO, ORPO, SimPO, KTO) claim up to 80% memory savings

Weaknesses

  • Benchmarks come from one setup: LLaMA 3-8B on 8 A100s with FSDP1
  • Model patching APIs need transformers >= 5.0.0, and per-model support varies
  • cuTile and CuTe DSL backends are opt-in and CUDA-only, with newer-GPU targets (Hopper, Blackwell)
  • Training-side only; it does not serve or run inference

What it needs

  • GPU required
  • Needs torch >= 2.1.2, triton >= 2.3.1, transformers >= 5.0.0 (optional)
  • Models: Hugging Face transformers models, LLaMA 3, Qwen2-VL, Llama 3.2-Vision

Quick answers

Is liger-kernel open source?

Yes. Its code is on GitHub under the BSD-2-Clause license.

Does liger-kernel need a GPU?

Yes, it needs a GPU.

Also in Training and fine-tuning

See all 41
Also in Training and fine-tuning
RankProjectScore
1unslothDesktop and web app to run and fine-tune local models Live demo ↗ (opens in a new tab)78.9k starsApache-2.088 out of 100
2peftPython library for LoRA and other parameter-efficient fine-tuning of Transformers models Live demo ↗ (opens in a new tab)21.9k starsApache-2.086 out of 100
3deepspeedPyTorch library for distributed training of very large models with ZeRO43.3k starsApache-2.085 out of 100
#4verlReinforcement learning training library for LLM post-training with PPO and GRPO24.1k starsApache-2.084 out of 100
#5trlPost-training library with SFT, DPO, GRPO and KTO trainers19.6k starsApache-2.083 out of 100