How HF kernels replace torch ops: SiLU case with compiled implementations

tomaarsen · x · 2026-12-03

tomaarsen shows a concrete example of Sentence Transformers adopting Hugging Face kernels: Qwen's SiLU activation, normally a sequence of torch ops, is replaced by a class calling a precompiled implementation from kernels-community/activation. The repo ships compiled variants for multiple activations (SiluAndMul, Silu, Gelu, GeluTanh) across ABI/platform targets, built with kernel-builder and torch.compile-compatible.

Original post →

More from Infra

Infra channel →