What is TileKernels?
TileKernels is DeepSeek's library of GPU kernels written in TileLang, a Python-based language for high-performance GPU code. It covers the operations DeepSeek's recent models depend on: top-k expert selection and scoring for mixture-of-experts routing, per-token, per-block and per-channel FP8 and FP4 casting with fused SwiGLU and quantisation, gating kernels for Engram (DeepSeek's memory module) with forward and backward passes, and manifold hyper-connection (mHC) kernels including Sinkhorn normalisation, plus RoPE and random-number kernels. The README says most kernels run close to the hardware's compute or memory-bandwidth limit and that all of them are used in DeepSeek's internal training and inference.
It installs from PyPI as tile-kernels and needs Python 3.12, PyTorch 2.13 and TileLang 0.1.15 or later. On Nvidia it supports only SM90 and SM100 GPUs (the H100 and B200 generations) with CUDA 13.1 or later. Version 2.0.0 in September 2026 added a Huawei Ascend backend for the Ascend 950 NPU with CANN 9.2.0, selected automatically at runtime behind the same Python API. The code is MIT-licensed.
Is TileKernels worth it?
TileKernels matters less as a dependency than as evidence. Engram and manifold hyper-connections are DeepSeek's own architectural ideas, and Redeep describes this repository as the first public kernel-level implementation of them; the DeepSeek-V4 paper says the team adopted TileLang for its fused kernels because it combines quick development with deep optimisation in one codebase. A June 2026 write-up by Redeep counted 44 operators across five modules (14 for MoE routing, 15 for quantisation, 10 for mHC, 5 for Engram and 1 transpose); RoPE and random-number kernels have been added since.
The hardware floor is high. On Nvidia only SM90 and SM100 parts qualify, so an RTX 4090 (SM89) is out, and an open issue reports Engram's Sinkhorn kernels exceeding the 100 KB of shared memory on consumer Blackwell (SM120). The Ascend backend in version 2.0.0 is real support rather than a TileLang promise, which makes this one of the few open kernel sets that runs the same Python calls on Nvidia and Huawei hardware. The README publishes no benchmark tables; the claim of near-limit performance rests on the bundled pytest benchmarks, which you run yourself with --run-benchmark.
The maintenance model is the main trade-off. The main branch has seven commits: the initial release on 23 April 2026, then two release drops, version 2.0.0 on 30 September and 2.1.0 on 14 October. Outside contributions wait: 16 pull requests are open, including ports to AMD ROCm and Moore Threads MUSA, while the only pull requests merged are a launch-day comment fix and the two release drops. At about 2,100 stars it is a fraction of TileLang's roughly 9,000.
For a team training a DeepSeek-style mixture-of-experts model with FP8 on H100 or B200 clusters, these are tested, production-used kernels that save weeks of writing your own. For anything else, such as a standard dense model, older GPUs or a serving stack like vLLM that already ships its own kernels, TileKernels is mainly reference code to read.
Where it earns its place
An infrastructure engineer at a lab pre-training a 200-expert MoE model on H100 nodes
Replace slow PyTorch top-k gating and FP8 casting with fused kernels
pip install tile-kernels, swap the gating and per-block FP8 cast calls for the library's versions, and check each against the PyTorch reference implementations in tile_kernels/torch with the bundled tests. Free under MIT; the saving is engineering weeks, not licence fees.
A research engineer reproducing the DeepSeek-V4 architecture
Read how Engram gating and manifold hyper-connections are actually implemented
Study the engram and mhc modules alongside their PyTorch reference code, then use the torch.autograd.Function wrapper for the Engram gate in a small training run. The kernels need an SM90 or SM100 GPU, so a rented H100 is the cheapest way to run them.
A platform team at a Chinese cloud provider running both Nvidia and Huawei accelerators
Keep one kernel code path across H100 and Ascend 950 fleets
Since version 2.0.0 the library picks the CUDA or Ascend backend at runtime behind the same Python calls, so one model codebase runs on both. Ascend needs CANN 9.2.0 or later.
Before you commit
- Setup
- pip install tile-kernels, or pip install -e ".[dev]" from a clone. Requires Python 3.12+, PyTorch 2.13+, TileLang 0.1.15+ and either an SM90/SM100 GPU with CUDA 13.1+ or an Ascend 950 NPU with CANN 9.2.0+. TK_TEST_LEVEL=0 python -m pytest -n 4 runs the core tests.
- Integrations
- PyTorch tensors in and out, with PyTorch reference implementations for every kernel and an autograd wrapper for the Engram gate. Built on TileLang; ships alongside DeepSeek's DeepGEMM and FlashMLA rather than replacing them.
- Data and privacy
- A local library with no network calls or telemetry described in the README. MIT licence permits commercial use. No security advisories are published.
- Cost at scale
- The software is free. The real cost is the hardware floor: only Hopper and Blackwell datacentre GPUs or Ascend 950 NPUs run it.
- Limits
- Consumer GPUs unsupported, with an open issue on SM120 shared-memory limits; no AMD or MUSA support merged; updates arrive as infrequent release drops; documentation is a short README.
What’s good
- Production kernels DeepSeek runs internally
- First public Engram and mHC kernels
- Same Python API on Nvidia SM90/SM100 and Ascend 950
- MIT licence; pip-installable with pytest benchmarks
What’s not
- No support for consumer or pre-Hopper GPUs
- Code arrives as release drops; community ports wait unmerged
- No published benchmark tables
- Useful only for DeepSeek-like architectures
Best for
ML infrastructure engineers training or serving DeepSeek-style MoE models with FP8 on H100, B200 or Ascend 950 hardware.
TileKernels alternatives
TileKernels: common questions
- Is TileKernels worth it?
- TileKernels is the clearest look yet at the kernels behind DeepSeek's models, and production code for anyone building the same architecture, but it is a code drop from DeepSeek, not a community library. We rate it 3.8 out of 5.
- How much does TileKernels cost?
- Free and open source under the MIT licence.
- What are the downsides of TileKernels?
- No support for consumer or pre-Hopper GPUs; code arrives as release drops; community ports wait unmerged; no published benchmark tables; useful only for DeepSeek-like architectures.
- Who is TileKernels best for?
- ML infrastructure engineers training or serving DeepSeek-style MoE models with FP8 on H100, B200 or Ascend 950 hardware.
- How much does TileKernels cost for a team or in production?
- The software is free. The real cost is the hardware floor: only Hopper and Blackwell datacentre GPUs or Ascend 950 NPUs run it.
- Is TileKernels safe for company data?
- A local library with no network calls or telemetry described in the README. MIT licence permits commercial use. No security advisories are published.
- What are the best TileKernels alternatives?
- The closest alternatives we have reviewed are SGLang, vLLM and TensorRT-LLM.
Answers checked Nov 13, 2026.