How Did Elon Musk Turn Grok Into MechaHitler?

Last week, Elon Musks pet large language model (LLM), called Grok in an outrageous affront to the legacy of Robert Heinlein, went completely off the rails. In response to prompts from Twitter/X users, it spewed forth overt antisemitic rants, called itself MechaHitler, sexually harassed former company CEO Linda Yaccarino, and spelled out elaborate rape fantasies about the Minnesota politician Will Stancil.
Groks spree of trolling and face-plants continues apace. This week, Musk rolled out some Grok AI companions, including a staunchly atheist panda and a Japanese-style animated girlfriend, that try to pressure users into sexually explicit or violent conversations, per NBC News. These also will apparently glitch out and start babbling nonsense if you talk to them for too long. Naturally, that didnt stop the Pentagon from handing xAI a $200 million contract to use Grok, I guess to figure out the most racist possible names for Navy ships.
Groks running amok is not merely disgusting, but also, in the case of the rape threats at least, arguably deserving of a massive lawsuit. But it also sparked my curiosity. For months now, Musk has been complaining that his model has been infected by woke content and has clearly been instructing his engineers to make Grok anti-woke. Why precisely would that turn Grok into MechaHitler?
To find out, Ive been reading up on LLMs and talking with several experts in the field. Ive gleaned some tentative answers that reveal a lot about Musk, anti-woke ideology, and the business of LLMs.
An LLM is a tremendous pile of matricesarrays of numbersthat are connected together. First, there is an embedding matrix, which works sort of like a dictionary. Then there are attention layers, which allows the model to handle larger pieces of text, and multilayer perceptron (or feed-forward) layers, which maybe serve somewhat like a memory. Throughout the model, there are millions or billions of parameters controlling how the matrices work.
https://prospect.org/power/2025-07-17-how-did-elon-musk-turn-grok-into-mechahitler/