Aha, so it's decided per token, not per input. I thought at first the LLM chooses a "submodel" based on the input and then follows it to generate the whole output.
Thanks a lot.
Thanks a lot.
https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_pr...
Each different color highlight is a generated by a different expert.
You can see that the "experts" are more experts of syntax than concepts. Notice how the light blue one almost always generates puncuation and operators. (until later layers when the red one does so)
I'm honestly not too sure the mechanism behind which experts gets chosen. I'm sure it's encoded in the weights somehow, but I haven't gone too deep into MoE models.
Then you get some strange ones where parts of whole words are generated by different experts.
Makes me think that there’s room for improvement in the expert selection machinery, but I don’t know enough about it to speculate.