Keras on PyTorch now generates text 11.6x faster after 15 merged PRs
Between July and October 2026, 15 PRs landed in Keras, speeding up the PyTorch backend. Compiled Keras[torch] now generates text 11.6x faster, and torch.compile went from slowing Keras down to making it 6.56x faster than eager Keras.
- Keras[torch] text generation with torch.compile sped up 11.6x: from 87.8 to 7.54 ms per call
- torch.compile is now 6.56x faster than eager Keras: 16,975 vs 2,139 tokens per second
- Python calls per LLM forward pass dropped 12–23% across all four backends
- Key PRs: #23327 (attention), #23201 and #23647 (tree code) removed graph breaks
Read next
AI