Why do LLMs use tokens instead of words : Decision That Makes AI Possible

Imagine you ask ChatGPT a simple question:

“Explain Redis in simple words.”

To us, this is just a normal English sentence.

But an LLM doesn’t process that sentence as complete words. Before the model can understand anything, the text is first broken into smaller units called tokens.

Why?

Why can’t an LLM simply process the words we type? Or, if words are difficult to handle, why not process every character individually?

The answer reveals one of the most important engineering decisions behind modern Large Language Models.

Understanding tokens also helps explain:

  • Why LLM APIs charge per token
  • Why context windows are measured in tokens
  • How models deal with words they have never seen before
  • Why tokenization happens before the Transformer processes your prompt

Let’s understand it from an engineering perspective.

Why LLMs Use Tokens Instead of Words

How a Backend System Scales from 1 User to 1 Million Users

Most developers learn technologies like Redis, Kafka, Load Balancers, CDNs, Kubernetes, and Microservices separately.

They know what these technologies are.

But very few understand why these technologies exist in the first place.

The truth is that most scalable systems don’t start with Redis.

They don’t start with Kafka.

They don’t start with Kubernetes.

And they definitely don’t start with dozens of microservices.

Real systems evolve gradually.

They evolve because every stage of growth introduces a new bottleneck.

Once that bottleneck becomes painful enough, engineers introduce a new architectural component to solve it.

This article walks through the complete journey of how a backend system evolves from serving a handful of users to serving millions.

Internal working of HashMap in Java 8 & Beyond

How HashMap internally works in java is the most asked interview question. Even with just 1–2 years of experience, you’ve likely used HashMap in your code. However, many developers are unaware of how it actually works under the hood.

This article dives deep into the internal mechanics of HashMap, explaining how the get, put, operations work behind the scenes. I am going to discuss the internal working of HashMap in java with diagrams and code examples.

How HashMap works internally video tutorial

What Really Happens When You Instantiate a HashMap in Java