When running an LLM would applying the unembedding matrix to the average of multiple…
- User
When running an LLM would applying the unembedding matrix to the average of multiple token embeddings result in the same logit distribution as first applying the unembedding matrix on all embeddings and only then averaging out all of the logits?
Assistant
No, these two operations would not produce the same result. This is because matrix multiplication doesn't commute with averaging in the way you're describing.
Let me break this down mathematically:
Option 1: Average embeddings first, then unembed
- Take embeddings e₁, e₂, ..., eₙ
- Average them: ē = (1/n) × Σeᵢ
- Apply unembedding matrix W: logits = W × ē
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.