Per layer embedding in Gemma model
- User
Per layer embedding in Gemma model
Assistant
The Gemma models use per-layer embeddings in an interesting way. Here's how it works:
In Gemma, each transformer layer has its own learned input embeddings that get added to the token embeddings before that layer processes them. This is different from standard transformer architectures where you typically just have:
- Token embeddings at the input
- Positional embeddings added once
Instead, Gemma has:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.