linkedin / linkedin/Liger-Kernel
[NPU Roadmap, Updated to 2026-Q2] NPU support for Liger-Kernel
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 603
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 47
Description
2026 Q2 Roadmap
Thanks to the Liger-Kernel team for their strong support of our work in Q1 2026. β€π§‘πππ€ππ
We will keep contributing to the Liger-Kernel + NPU community in Q2. This roadmap details the future plans for NPU native support. Welcome to join in the discussion.
Integrated into training software
In order to promote Liger-Kernel, we need to integrate it into real production scenarios to verify its performance in actual training and inference tasks.
We selected four training frameworks: VeOmni, LLaMA-Factory, verl and ms-swift, which are widely used in real production scenarios. We will continue to demonstrate the effectiveness of using Liger-Kernel in these software applications.
| Software | APIs | PR |
|---|---|---|
| VeOmni | LigerRMSNorm liger_rotary_pos_emb LigerSwiGLUMLP |
https://github.com/ByteDance-Seed/VeOmni/pull/415 |
| LLaMA-Factory | apply_liger_kernel_to_qwen3 | https://github.com/hiyouga/LlamaFactory/issues/10386 https://github.com/hiyouga/LlamaFactory/pull/10493 |
| verl | _apply_liger_kernel_to_instance | https://github.com/verl-project/verl/pull/6244 |
| ms-swift | apply_liger_kernel_to_qwen3_moe | https://github.com/modelscope/ms-swift/pull/9227 |
Performance Enhancement: Part 2
Following this plan, the performance of some kernels still hasn't met the standard and will be continuously optimized in Q2. For example:
- https://github.com/linkedin/Liger-Kernel/pull/1222
- https://github.com/linkedin/Liger-Kernel/pull/1219
- https://github.com/linkedin/Liger-Kernel/pull/1210
- https://github.com/linkedin/Liger-Kernel/pull/1206
- https://github.com/linkedin/Liger-Kernel/pull/1183
- https://github.com/linkedin/Liger-Kernel/pull/1178
- https://github.com/linkedin/Liger-Kernel/pull/1174
- https://github.com/linkedin/Liger-Kernel/pull/1164
- https://github.com/linkedin/Liger-Kernel/pull/1154
- https://github.com/linkedin/Liger-Kernel/pull/1153
- https://github.com/linkedin/Liger-Kernel/pull/1426
Skills
Due to the differences in programming logic between triton-ascend and triton, migrating kernels to NPU inevitably incurs a time cost for performance optimization.
To address this issue, we have developed a series of skills for AI programming tools.
We'll keep polishing these SKILL docs.
Support for more NPU machine types
Similarly, this includes three aspects: enabling functionality, ensuring accuracy within the error tolerance, and performance optimization.
Current support:
- Atlas 900 A2 POD (64G), which can be used for benchmark tasks.
- Atlas 800I A2 (32G), used by CI machines. This model NPU machine type not be used for benchmark work.
Planned support:
- Atlas 800T A3 (64G):
Improvement of NPU CI work
Currently, the NPU CI status badge can only be displayed in the README.
We plan to find a way to mark the CI status badge in NPU-related PRs. This would simulate the state after native CI integration and achieve the effect of checking PR quality.
2026 Q1 Roadmap
Thanks very much to Liger-Kernel for accepting our first native support pr.
This roadmap details the future plans for NPU native support. Welcome to join in the discussion.
NPU Native Support
This shows how Liger-Kernel works on NPU.
- https://github.com/linkedin/Liger-Kernel/pull/955
- https://github.com/linkedin/Liger-Kernel/pull/965
- https://github.com/linkedin/Liger-Kernel/pull/987
- https://github.com/linkedin/Liger-Kernel/pull/1111
Unit Test Coverage Improvement: Functionality & Precision
The accuracy of all kernels in Liger-Kernel must be within the acceptable tolerance. This task can be accomplished by checking the actual execution results of all test cases in the ./test folder.
We have done the following work to ensure that all test cases under ./test/transformers have passed.
List of each kernel's first PR:
- cross_entroy: https://github.com/linkedin/Liger-Kernel/pull/1148
- dyt: https://github.com/linkedin/Liger-Kernel/pull/1124
- embedding: https://github.com/linkedin/Liger-Kernel/pull/1028
- fused_add_rms_norm: https://github.com/linkedin/Liger-Kernel/pull/1070
- fused_linear_cross_entroy: https://github.com/linkedin/Liger-Kernel/pull/1164
- fused_linear_jsd: https://github.com/linkedin/Liger-Kernel/pull/1151
- fused_neighborhood_attention: https://github.com/linkedin/Liger-Kernel/pull/1034
- geglu: https://github.com/linkedin/Liger-Kernel/pull/996
- group_norm: https://github.com/linkedin/Liger-Kernel/pull/1144
- grpo_loss: https://github.com/linkedin/Liger-Kernel/pull/1146
- jsd: https://github.com/linkedin/Liger-Kernel/pull/1134
- kl_div: https://github.com/linkedin/Liger-Kernel/pull/1118
- layer_norm: https://github.com/linkedin/Liger-Kernel/pull/1113
- llama4_rope: https://github.com/linkedin/Liger-Kernel/pull/1035
- poly_norm: https://github.com/linkedin/Liger-Kernel/pull/1114
- qwen2vl_mrope: https://github.com/linkedin/Liger-Kernel/pull/992
- rms_norm: https://github.com/linkedin/Liger-Kernel/pull/1099
- rope: https://github.com/linkedin/Liger-Kernel/pull/992
- softmax: https://github.com/linkedin/Liger-Kernel/pull/1087
- sparsemax: https://github.com/linkedin/Liger-Kernel/pull/1104
- swiglu: https://github.com/linkedin/Liger-Kernel/pull/995
- tvd: https://github.com/linkedin/Liger-Kernel/pull/998
Additionally, the test cases under ./test/transformers can serve as the foundation for NPU CI to guard future pull requests.
Due to certain policy restrictions, Liger-Kernel cannot be natively integrated into NPU CI. Therefore, we have marked the NPU CI status badge in the README.
We will look for a more convenient solution in the future.
Performance Enhancement: Part 1
Unit tests can be used to APIs functionality and precision. However, as third-party devices may not fully align in their usage patterns of Triton, a performance optimization process is required.
Regarding the evaluation criteria, we have designed it as follows: The speedup ratio of each kernel compared to huggingface/torch should be greater than 1.
The progress of this task can be tracked in this rfc issue.
Benchmark Enhancement
To enable benchmarks to run reliably across devices with different memory capacities (e.g., 32G and 64G NPUs), we collaborated with the community to redesign the benchmark framework. The key improvements include:
-
Device memory awareness: Introduced runtime memory probing (
estimate_kernel_peak_memory) to automatically detect available device memory and determine safe execution parameters, ensuring benchmarks can run successfully on different device types without OOM. -
Standardized benchmark dimensions: Defined two orthogonal benchmark dimensions β D1 (non-model dimension sweep, e.g., sequence length) and D2 (model config sweep across real-world architectures from
MODEL_REGISTRY), providing a more comprehensive and structured view of kernel performance.
Phase 1 (Foundation) and Phase 2 (Model-config sweep) have been completed. Phase 3 (Rollout and visualization) is planned for future work.
- https://github.com/linkedin/Liger-Kernel/pull/1116
- https://github.com/linkedin/Liger-Kernel/pull/1163
Co-Author: @momochen
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up β it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the Q2 roadmap and the linked performance plan in issue #1159; review the listed integration, benchmark, machine-support, and CI work. The issue does not identify a single file, test, or unclaimed task, so a contributor would need to choose and scope one item before coding. Done would require completing that selected item and validating it on the named NPU, test, or CI path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd, machine-learning, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100