LLM training speedup 19% by switching to built-in GELU

rasbt · x · 2026-08-20

A case study by Giles Thomas shows that replacing a hand-rolled GELU activation function with PyTorch's built-in version increased LLM training speed from 21,000 tokens/second to 25,000 tokens/second.

This demonstrates that prioritizing optimized functions provided by deep learning frameworks can yield significant performance gains outside of educational contexts.

Original post →

More from Infra

Infra channel →