Here is a simpler example:
Suppose we have a mixture of 3 experts for language modeling:
Expert 1 specializes in nouns
Expert 2 specializes in verbs
Expert 3 specializes in adjectives
The user input sentence is:
"The cat jumped quickly"
This gets split into tokens:
["The", "cat", "jumped", "quickly"]
Then each expert gets only the relevant tokens:
Expert 1 (nouns) gets: ["The", "cat"]
Expert 2 (verbs) gets: ["jumped"]
Expert 3 (adjectives) gets: ["quickly"]
Each expert then independently predicts the next token based on its specialty tokens.
For example, Expert 1 has seen the noun "cat" before. So it predicts the next token is likely another noun, article or adjective, that could describe "cat".
The predictions from the 3 experts for the next token are then combined together using weighted averages, based on how reliable each expert generally is. This final combined prediction is used to produce the next token in the sequence.
So in this way, different experts focus only on their specialty tokens and make independent predictions, which get merged to produce the final output.