# linkedin/Liger-Kernel

Efficient Triton Kernels for LLM Training

Repository: https://github.com/linkedin/Liger-Kernel
Canonical: https://ross.abutalabs.com/products/liger-kernel
Homepage: https://linkedin.github.io/Liger-Kernel/
Language: Python
License: BSD-2-Clause
License Family: permissive
Topics: llm-training, triton, finetuning, gemma2, llama, llama3, llms, mistral, phi3, triton-kernels, hacktoberfest
Last push: 2026-08-26T21:48:55+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 54
- inputs: {"age_days": 757, "days_push": 7, "days_rel": 15, "gap_med": 19, "n_releases_24m": 26}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6588, forks 586 (observed 2026-08-28T04:09:45.498985+00:00)

## What it is
Liger Kernel is a collection of Triton kernels designed to make LLM training faster and more memory-efficient, offering drop-in replacements for layers like RMSNorm, RoPE, SwiGLU, and fused cross-entropy. It patches Hugging Face models with one line of code, boosting multi-GPU training throughput by ~20% and cutting memory usage by up to 60%, with additional kernels for post-training losses like DPO and ORPO.

## Use cases
- speed up multi-GPU LLM fine-tuning throughput
- reduce GPU memory usage when training large language models
- train LLaMA or Mistral models with longer context lengths without OOM
- optimize post-training alignment losses like DPO and ORPO
- patch Hugging Face models with efficient fused kernels
- enable larger batch sizes and massive vocabularies during training

## When to choose
- you are fine-tuning supported LLMs (LLaMA, Mistral, Gemma, Phi) on NVIDIA or AMD GPUs
- you hit OOM errors during training and need memory savings without changing model behavior
- you use PyTorch FSDP, DeepSpeed, or Flash Attention and want compatible kernel optimizations
- you need memory-efficient post-training losses for alignment or distillation

## When to avoid
- you are not training or fine-tuning LLMs (e.g., inference-only or non-transformer workloads)
- your model architecture is not yet supported by Liger's kernel set
- you need a pure PyTorch implementation without Triton or GPU dependencies
- you are training on CPUs or non-GPU hardware

## Facets
- artifact type: library
- maturity: active
- function: llm-training, gpu-computing, machine-learning, deep-learning
- domain: large-language-models, machine-learning, gpu-computing, deep-learning
- platform: python
- tags: triton-kernels, finetuning, memory-optimization, huggingface, fused-kernels, post-training, flash-attention, gpu, linux

## Member repositories
- linkedin/Liger-Kernel (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:45.498985+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:43:34.671923+00:00, confidence not recorded.
  - readme: https://github.com/linkedin/Liger-Kernel (fetched 2026-08-28T04:09:45.498985+00:00, sha d3658ddb98e1)
  - homepage: https://linkedin.github.io/Liger-Kernel/ (fetched 2026-08-29T08:39:58.201571+00:00, sha d0a274af7a8b)
  - registry_pypi: https://pypi.org/pypi/liger-kernel/json (fetched 2026-08-29T08:39:58.211166+00:00, sha 8eec8580116d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
