how-transformers-work SKILL.md skillA
how-transformers-work from michalstrnadel/source-to-skill is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add michalstrnadel/source-to-skill/how-transformers-work@git:20261004.d77ddfaPins git:20261004.d77ddfa in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- michalstrnadel/source-to-skill
- Path
examples/how-transformers-work/SKILL.md- Versions recorded
- 1
- Latest version
- git:20261004.d77ddfa, committed Oct 4, 2026
- Size
- 6,137 bytes
- Repository stars
- 7
- License
- MIT
How the Transformer and its attention mechanism work, synthesized from the original paper (Vaswani et al., "Attention Is All You Need"), 3Blue1Brown's "Attention in transformers, step-by-step" video, and Jay Alammar's "The Illustrated Transformer". Load when explaining or implementing self-attention, Q/K/V, multi-head attention, masking, positional encoding, encoder-decoder vs decoder-only, transformer dimensions and parameter counts, or when reconciling the different notations and intuitions…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# How transformers work
Three canonical explanations of one architecture: the paper that defined it
[S1], a visual walkthrough of attention in a GPT-style model [S2], and an
illustrated tour of the full encoder-decoder [S3]. They agree on the math;
they differ in framing, notation, example dimensions and what they call the
key insight — see [disagreements.md](disagreements.md) before quoting one
source's convention as "the" convention.
## Core ideas
1. **Attention is a learned, content-based weighted sum.** Each position
emits a query; every position emits a key and a value; query-key dot
products, scaled by 1/sqrt(d_k) and softmaxed, weight the sum of values.
Formula: `Attention(Q,K,V) = softmax(QK^T / sqrt(d_k)) V`. [S1][S2][S3]
2. **Attention exists to put context into token vectors.** A token's initial
embedding is a context-free lookup ("mole" is the same vector in every
sentence); attention blocks move information between positions so the
vector comes to mean the word *in this context* ("it" absorbs "animal";
"creature" absorbs "fluffy blue"). [S2][S3]
3. **Q, K and V are three separate learned projections.** In the paper's
…Read the whole file at its exact version.
How to install
mdr add michalstrnadel/source-to-skill/how-transformers-work@sha256:b84bbb84d19b1188The line at the top of this page pins the label git:20261004.d77ddfa, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_hsy2gjjlyp354eft)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Oct 4, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (6137 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
michalstrnadel/source-to-skill · 7 stars · license MIT · pushed 2026-10-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_hsy2gjjlyp354eft GET https://markdownregistry.com/api/v1/resolve?ref=michalstrnadel/source-to-skill/how-transformers-work GET https://markdownregistry.com/api/v1/blob/b84bbb84d19b1188000b5ea577b7ca7fa10e3100649200c196bc159ef341e9a7
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.