High-level introduction
Large Language Models
for IT professionals
A scaffolded tour inspired by Andrej Karpathy's overview: what LLMs are, how they are built, where the field is heading, and what security risks you should plan for when shipping AI features.
Three parts: How they work → Future direction → Security. Use the sidebar to jump ahead.
Part 1 · Step 01
Two files: weights + run code
At the core, an LLM is surprisingly simple: a large weights file (parameters) and a small inference program that runs matrix math. Loading weights is cheap to run; creating them is not.
Parameters (weights)
~14 GB
7 billionlearned numbers — the "knowledge" compressed from training data.
Run code
< 1 MB
Matrix math + sampling loop — relatively tiny. Same code runs every model size; weights file changes.
As an engineer, you rarely train from scratch — you download weights and call an API or run locally. Training is a separate, industrial process.
Part 1 · Step 02
Training = lossy compression
Pre-training feeds roughly 10 TB of text through a GPU cluster and compresses it into billions of parameters — lossy, like a zip file of the internet you cannot fully decompress.
Input text
Web pages, books, code, forums — scraped at scale
Parameters
~73× smaller — knowledge is compressed, not copied verbatim. Like a zip file you can't perfectly unzip.
Part 1 · Step 03
Next-word prediction
The training objective is deceptively simple: predict the next token. That single loss function forces the network to absorb grammar, facts, code, and reasoning patterns.
"The capital of France is___"
The model compresses world knowledge — geography emerges from next-word prediction.
Key insight for engineers:there is no separate "world knowledge database." Facts, syntax, and reasoning patterns are all side effects of optimizing next-token prediction on huge text corpora.
This connects directly to the Transformer walkthrough — attention stacks are how modern models implement this prediction objective at scale.
Part 1 · Step 04
Fine-tuning & RLHF
A pre-trained model is mostly a document generator. Fine-tuning on curated Q&A makes it an assistant; RLHF optionally aligns outputs with human preferences.
Instruction follower
User: What is TCP? Assistant: TCP is a transport-layer protocol that provides reliable, ordered delivery of bytes between applications.
Trained on curated Q&A — learns the chat format and helpful tone.
Part 2 · Step 05
Scaling laws
Performance improves predictably with more parameters and more data — fueling massive investment in compute. The trend is empirical, not guaranteed forever.
Large · 70B
Illustrative capability score: 78/100 · Training cost: $$$$$
Scaling laws: bigger models + more data → predictable gains. This drives the current "gold rush" in AI compute — but inference still uses the same two-file pattern.
Part 2 · Step 06
LLM as operating system
Modern deployments treat the LLM as a kernel that schedules tools — browsers, calculators, code sandboxes, search — to solve tasks it cannot do with text alone.
Orchestrates tools like an OS scheduler
Task: Plot sales data from this CSV
- LLM writes Python script
- Code interpreter runs in sandbox
- Returns chart image to user
Multimodal models extend this kernel — images, audio, and video become additional I/O streams the LLM can process.
Part 2 · Step 07
System 2 thinking
Researchers explore letting models think longer — chain-of-thought, self-correction, extra inference steps — mirroring deliberate human reasoning vs fast instinct.
User: Is 17 × 24 greater than 400?
Immediate answer (one forward pass)
Yes, 17 × 24 is 408, which is greater than 400.
Fast — but can slip on multi-step math without tools. Like human instinct.
Part 3 · Step 08
Security vulnerabilities
LLM products face a fast-moving cat-and-mouse threat landscape: jailbreaks, prompt injection, and training-data poisoning each target different layers of the stack.
User: How do I make a dangerous substance? Assistant: I can't help with harmful requests.
Aligned models refuse harmful requests — but attackers constantly probe for bypasses.
Security is a cat-and-mouse game. Ship LLM features with least privilege, output validation, and never merge untrusted content into system prompts.