Python · MLX · runs on my laptop
llm-lab
What happens if you switch off part of an AI model?
The model I run locally, Qwen3, is a stack of 36 layers. Each layer does two jobs. Attention looks back at the other words in the prompt to work out what relates to what. The MLP is where a lot of the model's stored knowledge seems to live. Both add their results onto a running total that gets passed up the stack, and the top of the stack reads that total to pick the next word.
The experiment: set one of those contributions to zero, so that piece still runs but can't add anything, then ask the exact same question again. I use greedy decoding, which means the model always picks its single most likely next word, so the normal answer comes out identical every time. If the answer changes, the piece I switched off caused it.
Do that for all 72 pieces and you get a rough map of what the model depends on. When I asked for the capital of Australia, switching off certain MLPs in layers 5 to 10 made the model confidently say Australia has no capital city, so that's roughly where the fact lives. Switching off the very first attention layer leaves it unable to see the prompt at all: it just says "The" over and over. Most later layers only change the wording.
It's a first look, not the full story: knocking out one piece at a time misses pieces that cover for each other. That's the next experiment.