Adventure 8
Adventure 8
Adventure 8
Adventure 8
Adventure 8
Adventure 8
"The weather today is really ___"Word | Probability | |
nice | 35% | |
bad | 20% | |
hot | 15% | |
cold | 8% | |
... 199,996 more | tiny |
Adventure 8
Adventure 8
Adventure 8
Adventure 8
Model | Year | Parameters | |
GPT-1 | 2018 | 117M | |
GPT-2 | 2019 | 1.5B | |
GPT-3 | 2020 | 175B | |
GPT-4 | 2023 | ~1.7T (estimated) | |
Claude 3 Opus | 2024 | undisclosed, similar scale |
Adventure 8
Adventure 8
Adventure 8
Adventure 8
"King" and "Queen" end up close. "Apple" and "Banana" close. "Apple" and "Tuesday" far apart. Deep dive next week — today just know: Stage 1 turns words into numbers.
Adventure 8
Adventure 8
Adventure 8
Adventure 8
Adventure 8
"An LLM is a __________ machine. To produce each word, it goes through three stages: First, it __________ the input by turning it into __________ . Second, it __________ using a mechanism called __________ . Third, it __________ a probability over the next word."
Adventure 8
Adventure 8
Adventure 8
Adventure 8
Adventure 8
Adventure 8
TRAINING | INFERENCE | ||
WHO | Foundation model labs (5–10 companies) | Everyone — you, startups, enterprises | |
WHEN | Once, takes 3–6 months | Every single API call | |
COST | $100M–$1B per run | $0.0001–$0.10 per call | |
HARDWARE | 10,000+ GPUs for months | 1–8 GPUs for seconds | |
DATA | Trillions of words | Just your one prompt | |
OUTPUT | Model weights file (~1 TB) | The response to one query |
Adventure 8
Adventure 8
# 1: Import the Anthropic library
from anthropic import Anthropic
# 2: Create a "client" — your phone line to Claude
client = Anthropic()
# 3-7: Send a message and get a response
response = client.messages.create(
model="claude-sonnet-4-5", # Which Claude model
max_tokens=1024, # Cap on response length
messages=[
{"role": "user", "content": "Hello! What's the capital of France?"}
]
)
# 8: Print the answer
print(response.content[0].text)messages. The structure never changes.Adventure 8
from anthropic import Anthropicclient = Anthropic()() means "make a new one." Auto-reads your API key from the environment.model="claude-sonnet-4-5"max_tokens=1024messages=[{"role": "user", "content": "..."}]role: user = us speaking. role: assistant = Claude's response. This list can grow into a multi-turn chat.print(response.content[0].text)Adventure 8
Adventure 8
Adventure 8
Adventure 8
Adventure 8
Adventure 8
Next week — Inside the Machine: We crack open the box. Tokens become number-vectors. Attention becomes spotlights. You'll see exactly how "predicting the next word" turns into intelligence.
Adventure 8