liger-kernel
Efficient Triton kernels for LLM Training
Decision gist · record as of 2026-08-14
Yes, if you are training LLMs on GPU hardware. The package has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and integrates cleanly with standard PyTorch training workflows. Start with a trial on a small model to verify the stated performance gains apply to your setup; the exact speedup and memory savings depend on your hardware, model size, and training configuration.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torch >= 2.1.2 and triton >= 2.3.0 for CUDA; ROCm and Ascend NPU have different version requirements.
- GPU hardware (NVIDIA, AMD, or Ascend) is necessary for kernel execution.
- Low friction install with only torch and triton as runtime dependencies.
License · maintenance · safety
permissive license (permissive) — BSD 2-Clause permissive license allows commercial and private use with minimal restrictions, requiring only copyright notice retention in source and binary distributions.
last release 2026-07-23 (22 days) · last repo commit 2026-08-14 · 6,567 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 620,759 downloads/mo, #5,723 on PyPI
Alternatives
Verify before relying
pip install liger-kernel
from liger_kernel.chunked_loss import LigerFusedLinearORPOLoss
orpo_loss = LigerFusedLinearORPOLoss()
y = orpo_loss(lm_head.weight, x, target)- Whether the stated 20% throughput increase and 60% memory reduction apply to your specific model architecture and hardware setup
- Compatibility with specific transformer frameworks beyond those mentioned (Axolotl, LLaMA-Factory, etc.)
- Performance characteristics on non-A100 GPU hardware
What it is and what it does
Liger Kernel is a collection of Triton-based GPU kernels optimized specifically for large language model training. It implements fused operations for common LLM layers—RMSNorm, RoPE, SwiGLU, CrossEntropy, and post-training losses like DPO, ORPO, and CPO—that reduce memory overhead and increase computational efficiency through kernel fusion and in-place operations. The package requires only torch and triton as dependencies and integrates with PyTorch FSDP, DeepSpeed, and popular training frameworks like Hugging Face Trainer and Lightning.
The package is designed to work out of the box: you can patch a Hugging Face model with a single line of code or compose custom models using Liger's module APIs. It supports multi-GPU training across CUDA, ROCm, and Ascend NPU platforms. All computations are exact—no approximations—with forward and backward passes validated against standard implementations. The project is actively maintained by LinkedIn, with recent releases adding support for new loss functions and hardware platforms.
Use it for
- Fine-tune large language models like LLaMA 3-8B on consumer-grade or enterprise GPU clusters with reduced memory footprint and faster training time
- Implement post-training alignment tasks (DPO, ORPO, CPO) with up to 80% memory savings for distillation and preference optimization
- Train vision-language models (e.g., Qwen2-VL) on multi-GPU setups using FSDP or DeepSpeed with kernel-fused operations
- Extend context length or batch size in existing training pipelines by reducing per-layer memory overhead through kernel fusion
- Integrate optimized kernels into custom training loops or frameworks that already use torch and triton
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are training LLMs on GPU hardware.
The package has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and integrates cleanly with standard PyTorch training workflows. Start with a trial on a small model to verify the stated performance gains apply to your setup; the exact speedup and memory savings depend on your hardware, model size, and training configuration.
Install
liger-kernel on PyPI
Before you install
Low friction install with only torch and triton as runtime dependencies. The package is actively maintained with a recent release 22 days ago and 6567 repository stars, indicating solid community adoption and ongoing development.
Requires torch >= 2.1.2 and triton >= 2.3.0 for CUDA; ROCm and Ascend NPU have different version requirements. GPU hardware (NVIDIA, AMD, or Ascend) is necessary for kernel execution.
License in practice
BSD 2-Clause permissive license allows commercial and private use with minimal restrictions, requiring only copyright notice retention in source and binary distributions.
Quickstart
pip install liger-kernel
from liger_kernel.chunked_loss import LigerFusedLinearORPOLoss
orpo_loss = LigerFusedLinearORPOLoss()
y = orpo_loss(lm_head.weight, x, target)
Verify before relying
- Whether the stated 20% throughput increase and 60% memory reduction apply to your specific model architecture and hardware setup
- Compatibility with specific transformer frameworks beyond those mentioned (Axolotl, LLaMA-Factory, etc.)
- Performance characteristics on non-A100 GPU hardware
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagestorchtriton |
| Maintenance | Actively maintained 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 620,759 / month, #5,723 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: liger_kernel-0.8.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gpu kernel fusion”
- liger-kernelLiger Kernel provides optimized Triton kernels for LLM training,…
- transformer-engine-cu13Accelerates Transformer model training and inference on NVIDIA GPUs…
- transformer-engine-cu12Accelerates Transformer model training and inference on NVIDIA GPUs…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also sgl-kernel · helion · sglang-kernel · triton-ascend · transformer-engine-cu12 · flashinfer-python · torchao · transformer-engine · tokenspeed-triton · llamafactory