Why Can’t LLMs Count the R’s in “Strawberry”?
Why LLMs famously miscounted the r’s in strawberry, what tokenization hides from the model, and why newer models get it right.
The Blog
Deep dives on AI, large language models, statistics and software engineering, explained simply with clear visuals.
Why LLMs famously miscounted the r’s in strawberry, what tokenization hides from the model, and why newer models get it right.
What the KV cache is, why it makes LLMs fast, why the first token is slow, and why long contexts cost so much memory.
What temperature, top-k and top-p actually do when an LLM picks its next token, how they differ, and which values to use for your tasks.
LLMs often perform best when relevant information is at the beginning or end of a long prompt, and struggle when it is buried in the middle. Here is why it happens and how to fix it in your RAG systems.
With the rapid rise of large language models, most of us just build applications that consume third party API, this is so common we even have a word for it, “GPT wrapper”, and honestly, that works fine most of the time. You wire up a model, wrap some code around it, ship it, and everyone’s […]
Knowing the center point of your sample data can be very crucial in Statistics. We use the location measures to establish the center of the data, specifically mean, median and mode. Measures of location are mostly used to summarize data using just a single metric value. For example, given the height data of a million […]
Going back to one of my examples from previous articles in this series, where we talked about calculating the average height of the human population. I mentioned we could sample data from different races, ethnic groups, continents, countries etc to get a well balanced representation of the larger human population. But, one question comes if […]
What if I told you that the same mechanism powering ChatGPT, Claude, and virtually every cutting-edge AI system today traces back to a single 2017 research paper? Eight researchers, one groundbreaking idea and the world of AI was never the same. In our last article, Understanding Transformer LLMs From Scratch | Tokenizers, we explored how […]
In our last article, we explored the foundational distinction between descriptive and inferential statistics, two broad approaches to making sense of data. Building on that foundation, we now turn to another equally important concept: levels of measurement. When working with data, not all variables are created equal. Before diving into any statistical analysis, it’s essential […]
Have you ever wondered how scientists make claims about millions of people by studying just a few thousand? Or how pollsters predict election results without asking every single voter? The answer lies in two powerful concepts: Descriptive and Inferential Statistics. Let me show you exactly how this works with a simple question: What’s the average […]