What is the size of the vector representation of an inference with a transformer with…
- User
What is the size of the vector representation of an inference with a transformer with embedding dimension d and context length L after going through a transformer layer, before going into the next transformer layer? What is the size of the representation before going through the final softmax to make a prediction?
Assistant
The size of the vector representation of an inference with a transformer after going through a transformer layer with embedding dimension d and context length L is d times the number of heads (usually d) times the sequence length (L) after self-attention. This is followed by a feed-forward network (FFN) with input and output dimensions that are d times the number of heads times the sequence length. The output of the FFN is added to the original input, and a residual connection and layer normalization are applied. The resulting vector is the input representation to the next transformer layer.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.