Skip to main content

Posts

Featured

What Are Tokens in LLMs? Complete Guide to Tokenization

Tokens in LLMs 1. What is a Token? A token is the basic unit of text that a Large Language Model (LLM) processes. An LLM does not directly process complete words or sentences. It first breaks the input text into smaller pieces called tokens . A token can be: A complete word Part of a word A punctuation mark A symbol Sometimes a space combined with a word Example ChatGPT is amazing! The tokenizer might split it into: ["Chat", "GPT", " is", " amazing", "!"] The exact tokens depend on the tokenizer used by the model. 2. Why Do LLMs Use Tokens? Neural networks work with numbers , not raw text. Therefore, text goes through several steps: Text ↓ Tokenizer ↓ Tokens ↓ Token IDs ↓ Embeddings ↓ Transformer ↓ Next Token Prediction For example: "I love AI" may...

Latest posts

Large Language Models (LLMs): A Beginner's Guide

Searching for a software engineering job? Here's a strategy that has worked better for me than relying only on LinkedIn.

TypeScript Interview Questions and Answers

Understanding Memoization in react

Code Splitting

Will devin replace software engineers ?

Controller NestJs : The NestJs Journey with Shiv (Part-2)

Introduction of NestJs : The NestJs Journey with Shiv (Part-1)

How can we use multiple express session in NodeJS

C++ Introduction (Part 1)