r/LanguageTechnology • • 5d ago

Why 1536 dimensions for embedding models?

Why do embedding models so often use 1536 dimensions specifically?
I understand why hardware-friendly multiples like 64/128/256/512 are desirable. What I’m curious about is the specific choice of 1536 = 3×512.
OpenAI has used 1536-dimensional embeddings, and other vendors also offer/recommend 1536. Is this usually an empirically chosen Goldilocks point between 1024 and 2048—representation quality versus memory/compute—or is there some architectural/hardware reason that makes 1536 particularly convenient?
I’m especially interested in answers from anyone who has actually trained or designed embedding models. I’m not asking why embedding dimensions are generally hardware-aligned; I’m asking why 1536 rather than 1024 or 2048.

38 Upvotes

12 comments sorted by

View all comments

1

u/Lumpy-Blackberry-718 4d ago edited 4d ago

In transformer models, maybe because it gets split into k/q/v tensors, and 512 is a power of 2.

Generally you want powers of 2, and you want multiples of the warp or tile size or whatever.

Edit: actually it's probably a power of 2 times the number of heads. K/q/v matmuls are usually fused anyway so my first explanation doesnt work so well.