Menu

How does a language model decide what a word means?
📰

How does a language model decide what a word means?

DEV Community: nlp·BitIlia·4 days ago
#D3EjEyWJ
#devtonlp#devto#dev#word#words
Long article (1608 words) — no AI summary yet.
Reading 0:00
15s threshold

A Large Language Model has never tasted food. It hasn’t learnt that being chased by a dog is a different experience from being chased by a puppy, and yet, when asked if “Queen” is closer to “King” or “Pizza”, it has no struggle identifying it. So, what is going on when a model “understands” a word?

It doesn’t know what a word means. Instead it works it out using maths. Today, I will go over that maths and try and explain it in the way that felt most clear and accessible to me. The numbers I will be using are from the Word Vector Lab, which I released with a friend to visualise this.

Words are just lists of numbers

Before a model can use a word, it creates a numeric representation of that word. Each word (technically, a token) is represented as a vector. They are called embeddings and are the heart of every modern LLM. This idea became mainstream, but how are the vectors calculated? People don’t sit down and calculate vectors manually.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.