预览提示词
A clean, publication-quality schematic of a Transformer encoder architecture drawn as a vertical stack with data flowing bottom to top. At the base, show the input sequence ("The cat sat") feeding into a Token Embedding layer that combines element-wise with Positional Encoding. Above this, draw N stacked identical encoder blocks (label "Nx = 6"), each as a rounded box containing two sub-layers: a Multi-Head Self-Attention module (h = 8 heads) and a position-wise Feed-Forward network (d_ff = 2048), with each sub-layer wrapped by an "Add and Norm" residual connection drawn as a curved skip arrow plus LayerNorm. Include a side callout detailing scaled dot-product attention with Q, K, V projections and the softmax(QK^T/sqrt(d_k))V formula. Top the diagram with a Linear projection and Softmax output head over the vocabulary. Use a muted color palette, legible sans-serif labels, dimension annotations (d_model = 512), tidy aligned boxes, and a light background.




