cd /news/artificial-intelligence/transformer-basics · home topics artificial-intelligence article
[ARTICLE · art-129561] src=garden.azl.au ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Transformer Basics

A technical reference on transformer architecture details that most tokenizers prepend a BOS token, which acts as a fixed landmark or "attention sink," while a space prefix yields the wrong token. The reference notes that every layer contains two sublayers — an MLP that moves information and attention that transforms it — and that all attention heads write to the same residual stream, with the MLP performing no cross-token communication. It also lists cross entropy loss and a notation table covering token embeddings, weight matrices, the residual stream, query/key/value/output matrices, residual stream dimension, and number of attention heads.

read1 min views2 publishedSep 14, 2026
Transformer Basics
Image: Garden (auto-discovered)

Most tokenizers prepend a BOS token.

  • ↳ fixed landmark or “attention sink”
  • space prefix gives you the wrong token

Two sublayers at every layer #

  1. MLP → move info
  2. Attention → transform info

All attention heads write to same residual stream.

MLP ⇒

↳ NO cross token communication

Cross entropy loss #

Notation Reference #

symbol meaning
token embedding / a -dim vector
weight matrix
residual stream
query, key, value, output matrices
residual stream dimension
number of attention heads
── more in #artificial-intelligence 4 stories · sorted by recency
── more on @bos token 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/transformer-basics] indexed:0 read:1min 2026-09-14 ·