A projection maps a vector into a different space by multiplying it by a matrix. In practice, it can squeeze a large embedding into fewer dimensions while keeping information useful for a chosen task. section 1.16
Squeezing an embedding
Imagine flattening a 3D shape into a thin plate. A projection could squash a 12,288-dimensional embedding into 100 dimensions focused on ideas such as “Barks,” “Mammal,” and “Pet,” discarding other dimensions. The useful directions are learned rather than designed by hand. section 1.16
A projection plays several roles in AI systems:
- Transforms an embedding from one vector length to another, such as 10,000 dimensions to 2,000. section 1.25
- Produces the output scores used to assign a probability to every possible next token. section 1.21
- Aligns representations from different modalities, such as turning an image embedding into an embedding comparable to an LLM’s “cat” token. section 1.32
A short PyTorch example defines an embedding, applies a linear projection, and places both operations in sequence. section 1.25
The matrix determines which direction the space is squeezed toward, but the resulting dimensions are not automatically human-readable. Their parameters are learned during training, so interpreting a projected dimension can be difficult. section 1.16 section 1.25





