AI News selected for Professionals and Decision Makers
Hands On Model Tooling And Research Updates

Profiling in PyTorch (Part 2): From nn.Linear to a Fused MLP

02:00 · June 11, 2026 · Hugging Face Blog

Profiling in PyTorch (Part 2): From nn.Linear to a Fused MLP

Summary

The second installment in this PyTorch profiling series moves from raw matrix multiplication to the nn.Linear module that underpins most transformer blocks. The author shows that nn.Linear is essentially a thin wrapper around the same GEMM-plus-bias pattern examined in Part 1, but now expressed through aten::addmm so that the bias addition occurs inside the cuBLAS kernel’s epilogue rather than as a separate write to HBM. Because the epilogue already fuses the bias, torch.compile has little additional work to perform on a lone linear layer; the only measurable change is the removal of a few microseconds of CPU-side view and stride bookkeeping.

Stacking three such layers with a GeGLU activation produces a representative MLP block. In eager mode the profiler records five distinct GPU kernels per forward pass—three GEMMs plus separate pointwise launches for the GELU and the subsequent multiplication—plus repeated cudaOccupancyMaxActiveBlocksPerMultiprocessor queries on the linear paths. The intermediate activation tensor between the gate and up projections must travel through HBM twice, adding roughly 50 MB of memory traffic for the chosen batch and sequence lengths.

When torch.compile is applied, the two pointwise operations and the intervening reshape collapse into a single Triton kernel that keeps the intermediate values in registers. The three GEMM kernels remain byte-for-byte identical to their eager counterparts, confirming that the compiler’s benefit lies in eliminating the CPU dispatch chain and the extra HBM round-trip rather than in altering the matrix-multiplication code itself. Layout descriptors embedded in the kernel names (for example, _tn_ versus _nn_) reveal that cuBLAS selects different tiling strategies for the down-projection, which explains the observed 10 % runtime difference despite identical FLOP counts.

The post closes by replacing the compiled MLP with an expert-written Triton kernel taken from the Hugging Face Hub. This substitution lets the reader compare hand-tuned memory access patterns against both the eager and compiled baselines on an A100, reinforcing how profiler traces can guide the decision of whether further fusion or a custom kernel is worthwhile.

Why it matters

Directly addresses production-level PyTorch optimization, kernel fusion, and profiling for ML Engineers building or tuning models, with actionable scripts and trace interpretation that Dutch teams can apply immediately.

More in this beat
hugging-faceinference-performancekernel-generationml-engineeringnvidiapytorchtransformerstriton
Nova: An End-to-End MLIR Compiler for Deep Learning

06:00 · August 4, 2026

Nova: An End-to-End MLIR Compiler for Deep Learning

Nova's approach to maximizing GPU efficiency and reducing memory overhead is highly relevant for Dutch AI researchers and SMEs aiming to train models cost-effectively and sustainably. Its deep technical insights into MLIR and hardware-aware optimizations provide actionable knowledge for advancing AI infrastructure and Green AI initiatives in the Netherlands.

Relevance 85 · Audience 95

Fine-tune video and image models at scale with NVIDIA NeMo Automodel and 🤗 Diffusers

17:57 · July 17, 2026

Fine-tune video and image models at scale with NVIDIA NeMo Automodel and 🤗 Diffusers

Directly addresses production-level challenges for ML Engineers: distributed training setups, VRAM efficiency via sharding, parameter-efficient fine-tuning, and reproducible MLOps configs. Actionable recipes enable Dutch teams to fine-tune large models without checkpoint conversion while balancing quality and compute cost.

Relevance 88 · Audience 92

Hugging Face and Cerebras bring Gemma 4 to real-time voice AI

02:00 · July 1, 2026

Hugging Face and Cerebras bring Gemma 4 to real-time voice AI

This article is highly relevant for ML Engineers as it provides a practical, open-source architecture for solving critical latency bottlenecks in real-time voice AI. Dutch AI teams can directly implement this modular stack using the provided repositories to build responsive conversational agents and embodied AI solutions.

Relevance 80 · Audience 90

Up to 3.2x Faster Inference with LFM2.5-DSpark

18:52 · August 20, 2026

Up to 3.2x Faster Inference with LFM2.5-DSpark

Directly addresses production inference challenges like memory-bound decode latency and GPU/edge deployment for ML Engineers, with quantitative benchmarks and open implementations applicable in Dutch AI workflows.

Relevance 85 · Audience 90

KernelArc: A Multi-Agent Framework for GPU Kernel Optimization

06:00 · August 19, 2026

KernelArc: A Multi-Agent Framework for GPU Kernel Optimization

High technical depth and novelty in multi-agent kernel search; directly actionable for Dutch AI/HPC teams working on performance engineering; IMEC affiliation adds EU relevance for advanced GPU workloads.

Relevance 78 · Audience 85

Deploy local agents everywhere with LFM2.5-2.6B

15:58 · August 4, 2026

Deploy local agents everywhere with LFM2.5-2.6B

Strong focus on production inference constraints, latency, token throughput, and agent tooling directly addresses ML Engineer needs for efficient local deployment. Benchmarks and ecosystem support offer actionable data for Dutch teams building privacy-preserving on-device AI solutions aligned with EU priorities.

Relevance 78 · Audience 85