Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesGenerative AI FundamentalsHow LLMs Work Under the Hood
Lines of text sliced into coloured tokensA language model continues the phrase “Unfortunately,” and picks the next word from three optionsA prompt made of four parts: role, task, context, format
Course

Generative AI Fundamentals

Module 1 · What is Generative AI
01What is Generative AI02How LLMs Work Under the Hood03Overview of Major Models
Module 2 · Working with AI: Basics
04Prompt Basics05Context and Memory in LLMs06Hallucinations and AI Limitations
Module 3 · AI in Real Tasks
07Writing and Editing with AI08Coding with AI09Building a Personal AI Workflow
Generative AI Fundamentals · Lesson 2

How LLMs Work Under the Hood

We cover tokens, embeddings, and next-token prediction — no math required, but deep enough to understand model behavior.

30 min readUpdated Nov 9, 20262 questions in quizReady prompt included

Tokens: the atoms of a language model

LLMs read text in chunks called tokens: sub-words, whole words, punctuation. How many words fit in a token depends on the model's tokenizer. On Claude 4.7 and later, 1M tokens ≈ 555k words (older Claude models fit ≈ 750k). On Gemini, 1 token ≈ 4 characters, and 100 tokens ≈ 60–80 English words.

"Hello, world!" → ["Hello", ",", " world", "!"]  // 4 tokens (illustrative)

Why this matters:

  • Context limits are measured in tokens
  • Rare words (niche terms) break into more tokens → cost more
  • API pricing is per token
  • The same text produces different token counts on different models

The rest of this lesson opens after a free sign-up

Sign up with email or Google: the first two lessons of every course stay open for good, and the whole catalog is open for 7 days. No card needed.

Sign up freeOr a trial lesson, no sign-up →
In this lesson
Tokens: the atoms of a language modelEmbeddings: meaning as a vectorTransformers: the attention mechanismPretraining and fine-tuningReasoning modelsTemperature: the mechanics and what changedPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free