Musk Says Grok’s Training Stack Is Now Built in C and C++
He adds AI is not good enough for high performance software.
Elon Musk has revealed that the software stack used to pre-train xAI’s Grok models is now built internally using C and C++.
Musk said in a post on X that Grok 4.8, which he described as a 2.5-trillion-parameter model, is expected to complete pre-training this week before moving into reinforcement learning.
Our C/C++ training stack was written by humans. AI is not yet good enough for extremely high performance software (but it will be).
— Elon Musk (@elonmusk) September 14, 2026
Musk said xAI’s reinforcement learning infrastructure remains more fragmented, describing it as “a legacy pile of many different third-party software systems” that the company plans to replace over time.
The disclosure has sparked discussion among engineers about whether lower-level programming can deliver efficiency gains for large-scale AI training.

Google software engineer Patrick C Toulme suggested that xAI’s C++ stack could be contributing to its model development speed through higher model FLOPs utilisation (MFU).
Musk also said the stack uses assembly code and direct calls to NVIDIA GPU accelerators, allowing the software to optimise more closely for the underlying hardware.




