JIT-compiled GPU GEMM kernels for quantized inference
Actively maintained. Last release 2 weeks ago, commits in 26 of the last 26 weeks. A safe choice.
pip install humming-kernelsHumming
Humming is a high-performance, lightweight, and highly flexible JIT (Just-In-Time) compiled GEMM kernel library specifically designed for quantized inference. It is developed by Ant Group and the vLLM community, and ships as the quantized GEMM backend in vLLM.
Read the launch blog: Announcing Humming: Fast, Flexible Kernels for Quantized Inference.
Key Features
- High Flexibility
- Supports inference for any weight type under 8-bit across FP16 / BF16 / FP8 / FP4 / INT8 / INT4 activations (provided the activation's dynamic range covers the weight type).
- Supports various quantization strategies (WNA16, W8A8, W4A8, W4A4, MXFP4/MXFP8, NVFP4, and more).
- Supports various scale types (BF16, FP16, E4M3, E5M2, and UE8M0).
- Supports both Dense GEMM and MoE GEMM (Indexed and Grouped layouts).
- Broad Hardware Support: every NVIDIA architecture from SM75 (Turing) onward, including Hopper, Blackwell (SM100/103/110/120/121), and Rubin, plus CUDA-compatible devices such as T-Head's Zhenwu 810E.
- High Performance: outperforms strong baselines (vLLM Marlin, FlashInfer, DeepGEMM) across many representative dense and MoE workloads. See Performance.
- Ultra-Lightweight
- Minimal dependencies: Requires only PyTorch and a CUDA compiler (NVCC or NVRTC).
- Compact footprint: the wheel is only about 500 KB; kernels are compiled on demand and cached, typically in a few seconds per layer.
Performance
Kernel microbenchmarks span M = 1 to 8192 with a cold L2 cache; MoE numbers sum the Gateup and Down GEMMs. Highlights:
| Workload | Device | Result |
|---|---|---|
| Dense W4A16 | Hopper / Blackwell | ~3–4× over cuBLAS at small M; up to ~2× vLLM Marlin on H200 and >3× on B300 at large M |
| MoE W4A16 (MXFP4 / MXINT4 / NVFP4) | H200 / B300 | ~2× vLLM Marlin on H200; up to ~5× on B300 (Grouped) |