when they say some transformer is a decoder only, how does cross attention work if…
- User
when they say some transformer is a decoder only, how does cross attention work if nothing is passed to the encoder?
Assistant
Good question. When a transformer is used as a decoder only, there is no encoder layer. However, the decoder still uses self-attention and cross-attention mechanisms.
For self-attention, the decoder attends to its own previous outputs. This allows it to incorporate context from what it has decoded so far.
For cross-attention, even though there is no encoder, the decoder can still attend to some external context. This is often an input sequence, like the source sentence in a translation task. The decoder attends to this input at each step to determine what to decode next.
So in summary:
- Self-attention allows the decoder to incorporate its own previous outputs
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.