AI Pulse by Inblix

Hugging Face just made GPT-OSS's best tricks part of every model

Hugging Face Blog · Sep 11, 2025 · 2 min read · Read original article →

Curated by the Inblix editorial team


Featured image for article: Hugging Face just made GPT-OSS's best tricks part of every model

Remember how GPT-OSS got those impressive efficiency numbers? The secret wasn’t just the architecture — it was a stack of custom kernels that kept memory use low and throughput high. Hugging Face just baked those same tricks into transformers in a way that works across the library, not just for OpenAI’s model. And they’re downloadable pre-compiled from the Hub, so you skip the dependency hell entirely.

This is a genuinely big deal for anyone running open models locally. The update introduces a use_kernels=True flag that pulls pre-built binaries for things like Liger RMSNorm and MegaBlocks MoE operations. When you enable it, you’ll see log messages confirming the library is swapping in community-contributed kernels optimized for your hardware — CUDA or ROCm, training or inference. No compiling CUDA code yourself, no chasing compatible versions of five different kernel libraries.

OpenAI’s GPT-OSS relies heavily on this approach. The blog post walks through how decorators like @use_kernel_forward_from_hub("RMSNorm") and @use_kernel_forward_from_hub("MegaBlocksMoeMLP") point directly to repos from liger_kernels and megablocks. The system checks your device and workload, then downloads the right binary on first use. It’s clean enough that the RMSNorm kernel is already being reused across multiple models, and the MoE kernel could apply to any future mixture-of-experts architecture.

There’s a catch, though. These kernels aren’t compatible with the new MXFP4 quantization — inference falls back to bfloat16 if you use them. The team is refreshingly direct about this: benchmark your own system to find the sweet spot between memory and throughput for your specific setup. In their testing, the kernel advantage really showed at larger batch sizes. For smaller workloads, you might be better off with the quantization. The broader point is that transformers is becoming less of a model library and more of an optimization platform. Features like Flash Attention 3 with attention sink support, tensor parallelism, and continuous batching are all landing as composable pieces, not one-off integrations for a single model.

💡 Key Takeaways

  1. Hugging Face's kernels system downloads pre-built binaries from the Hub, eliminating the need to manually compile CUDA code for custom operations like RMSNorm and MoE layers.
  2. The `use_kernels=True` flag automatically selects optimized kernels for your specific device and workload, with community contributions from liger_kernels and megablocks already integrated.
  3. These downloadable kernels conflict with MXFP4 quantization — enabling them forces bfloat16 inference, so you need to benchmark which combination gives you the best memory-throughput balance for your use case.
  4. The same kernel infrastructure is designed for reuse: RMSNorm already serves multiple models, and the MegaBlocks MoE kernel can be applied to any future mixture-of-experts architecture.

Keep reading: See related articles below for more coverage on this topic.

Get smarter about AI

The sharpest AI news, curated daily. Delivered free to your inbox.

Learn more

Glossary terms

← Back to all articles