## 1. How Do Large [[Language Models]] Work? - Core explanation - LLMs generate text by repeatedly answering a simple question: “Given what has been written so far, what token plausibly comes next?” Their striking competence arises because everyday language use is structured and repetitive enough that large‑scale learning from examples captures many of its regularities—even without explicit hand‑written rules. - Extended detail (conceptual) - Why a simple predictive goal works: Language encodes grammar, conventions, discourse moves, and typical inferences in stable usage patterns. When exposed to vast, diverse text, a model can internalize these patterns so that “continuing appropriately” reproduces much of what we regard as skillful language use (Wolfram). - Philosophical stance (Millière & Buckner): Don’t dismiss LLMs by saying “they are just statistics.” Treat the skeptical “Blockhead” view (mere lookup/regurgitation) as a hypothesis to test with empirical evidence—performance under distribution shifts, compositional generalization, probing [[internal representations]]—rather than a verdict delivered a priori (Redescription Fallacy). - What this is not: A claim that LLMs “think like humans” or possess intentions. It’s a claim about how much of language use is learnable from practice, and how far predictive competence travels. - Examples/analogies - Skilled continuation: An expert editor can often anticipate the next sentence in a draft because they’ve internalized how good writing tends to proceed. LLMs operationalize that anticipatory skill at massive scale. - Discussion question (occasional) - If a system reliably continues discourse appropriately across topics and styles, what (if anything) is missing for us to attribute linguistic competence—distinct from understanding or agency? ## 2. [[The Basic Idea]] - Core explanation - ChatGPT fundamentally does one thing: Produces a "reasonable continuation" of text based on what it has seen. Each step: given text so far → predict [[next token]]. "What one might expect someone to write after seeing billions of pages of text". Not retrieving text - generating it probabilistically. Each possible next word gets a probability. Uses "temperature" to control randomness vs. determinism. - Extended detail (conceptual) - At each step, the model assigns probabilities to possible next tokens and selects one. Repeating this yields sentences and paragraphs that fit [[the prompt]] and the prior text well enough to seem thoughtful. - Why the selection policy matters: Always choosing the single most likely token tends to collapse variation and can produce blandness or repetition. Allowing controlled randomness (sampling) selects from several plausible continuations, which supports variety while retaining coherence. This shows how “creativity‑like” behavior can naturally arise from probabilistic selection over learned patterns—no extra “creative module” is required (Wolfram). - Limits embedded in the objective: The pretraining goal is to sound like human writing, not to be truthful or safe. Truthfulness and safety must be layered on later (alignment), because they are not implied by likelihood of usage. - Callback to slide 1 - The surprise is not in the mechanism, but in language’s learnability: the simple loop (predict → add → repeat) rides on deep regularities present in ordinary text. ## 3. [[The Fundamental Task]] - Core explanation - At its core, what is ChatGPT doing when it generates text? Let's start with the simplest possible answer, then unpack the complexity. - Extended detail (conceptual) - ChatGPT predicts the next word, over and over again, based on patterns it learned from billions of pages of text. Everything else we'll discuss is about how it does this prediction well enough to seem intelligent. - Callback to slide 2 - This builds directly on [[the basic idea]] of reasonable continuation through probabilistic generation. ## 4. [[Key Takeaway]] - Core explanation - ChatGPT predicts the next word, over and over again, based on patterns it learned from billions of pages of text. Everything else we'll discuss is about how it does this prediction well enough to seem intelligent. - Extended detail (conceptual) - A single objective—predict the [[next token]]—can, at scale, reproduce a large share of [[the structure]] we attribute to intelligent language use: grammaticality, topic continuity, many inferential patterns, and stylistic flexibility. - Why this is philosophically important: We often assume coherent language must reflect deep internal reasoning. Wolfram suggests ordinary language is “law‑like” enough that prediction can emulate much of it. Millière & Buckner recommend replacing vague disputes about “understanding” with testable constructs (e.g., inferential vs referential semantic competence) and asking which are actually achieved. - Competence vs understanding: The model exhibits linguistic competencies shaped by usage patterns; whether that suffices for “understanding” depends on the bar you set. A cautious stance focuses on [[what can]] be demonstrated and replicated (performance, generalization, robustness), rather than metaphysical attributions. - Discussion question (occasional) - If what we call “reasonableness” in language often follows usage‑regularities, what remains uniquely human about reasoning? Where does prediction fall short? ## 5. Next-Token Prediction - Core explanation - Given text so far: "The best thing about AI is its ability to" Task: Predict what word comes next The model produces probabilities for thousands of possible next words "learn" (high probability) "adapt" (high probability) "zebra" (very low probability) It adds the chosen word, then repeats this process. - Extended detail (conceptual) - The operative question is always: “Given the current context, what token plausibly follows?” If the model has learned how grammatical and discourse constraints manifest in usage, this step alone produces coherent text when repeated. - Why a probability model yields structure: Grammar and discourse leave stable fingerprints on which continuations are likely: pronoun antecedents, agreement, rhetorical moves (e.g., premise → therefore), topic re‑introductions. Learning these fingerprints is enough to maintain local and global coherence without explicit symbolic rules. - Core caveat: Likelihood of occurrence is not the same as truth. The model is faithful to “how people write,” not by default to “how the world is.” Truth‑tracking requires extra signals (verification tools, retrieval, [[human feedback]]). - Discussion question (occasional) - If common usage diverges from truth (e.g., myths, stereotypes), what additions best realign the model—human preference learning, retrieval of evidence, tool‑based computation? ## 6. [[The Puzzle]] of Language Prediction - Core explanation - We expect shallow parroting from prediction, yet observe multi‑paragraph coherence, analogies, and seemingly reasoned explanations. Why? - Extended detail (conceptual) - Conceptual resolution (Wolfram): The model learns a geometry where contexts and tokens occupy a “[[meaning space]].” Moving through this space by predicting next tokens often corresponds to following sensible semantic trajectories. The appearance of reasoning can emerge because the learned space encodes regularities of use, including many inferential relationships, even without explicit rules. - Philosophical angle (Millière & Buckner): This supports “neurocompositional” computing: continuous vector spaces can implement composition and constraint satisfaction. It challenges the claim that connectionist systems must be either trivial pattern matchers or mere implementations of a hidden symbolic engine. - Where this falls short: Some reasoning tasks (e.g., rigorous mathematics, causal inference under intervention) require stronger guarantees than pattern completion typically provides—often benefitting from explicit tools or formal methods. - Callback to slide 4 - Distinguish appearance of reasoning from guarantees of truth or validity; many everyday “reasoning‑like” moves are regular enough to be learned as usage patterns. ## 7. "You shall know a word by the company it keeps" — J.R. Firth, 1957 - Core explanation - Words that appear in similar contexts tend to have similar meanings. - Extended detail (conceptual) - Usage‑based meaning: observing the contexts in which words appear reveals how they are used. LLMs leverage this to learn inferential relations (definitions, paraphrase, entailment patterns) by tracking large‑scale co‑occurrence and substitution patterns. - Philosophical import: This resonates with meaning‑as‑use (Wittgenstein) and underwrites the model’s inferential semantic competence. It shows why the model can define, rephrase, and “understand” relations among words without explicit dictionaries or rules. - What it does not settle: Reference and grounding. Knowing how a term is used in text is not identical to being able to pick out its real‑world referent. Externalist views suggest reference can be inherited via linguistic communities; others argue direct world interaction or extralinguistic signals are needed. - Discussion question (occasional) - Suppose a model masters usage‑based relations and produces consistently appropriate inferences. Is that sufficient for linguistic competence, or must competence also include direct world anchoring? Why? ## 8. Historical Foundations - Core explanation - Two lineages shaped modern LLMs: (1) symbolic approaches (explicit rules, grammars), (2) statistical approaches (patterns [[from data]]). The decisive twist was joining the distributional idea that “meaning is reflected in use” with scalable learning that absorbs long‑range structure from diverse corpora. - Extended detail (conceptual) - Why symbolic fell short in practice: brittle coverage, heavy manual engineering, difficulty keeping pace with the variety and subtlety of real usage. Why early statistical fell short: short-range n‑grams miss long dependencies and discourse phenomena. The deep‑learning turn adopted the usage‑based philosophy but used representations that flexibly generalize across contexts, domains, and genres. - Philosophical heritage: Harris and Firth’s distributional hypothesis (and Wittgenstein’s meaning‑as‑use) provide the conceptual basis for learning meaning from patterns of occurrence rather than stipulating it in rules. - Discussion question (occasional) - What is gained—and lost—when we trade explicit, inspectable rules for learned representations that generalize implicitly? How does that shift our standards of “explanation”? ## 9. From Words to Vectors to Transformers - Core explanation - Tokens are represented as vectors whose meanings adapt to context; transformers allow every token to consider every prior token, so the model can decide what is most relevant right now. Together, this supports coherent continuation across sentences and paragraphs. - Extended detail (conceptual) - Why vectors help: Geometry captures families of uses and relations, making it easy to extend learned patterns to new combinations (e.g., using a known pattern with a novel proper name). Contextualization refines meaning dynamically (polysemy: “bank” as river vs finance). - Why attention helps: Relevance is learned, not fixed. The model can weigh distant yet crucial cues (e.g., a name introduced paragraphs earlier) when choosing its next step. This flexible, data‑driven notion of what matters replaces brittle, hand‑coded heuristics. - Callback to slides 5–6 - The “meaning space” becomes operational with contextual vectors; the “usage‑based” idea scales because attention can retrieve whatever prior detail is relevant to continue sensibly. ## 10. Building Blocks - Core explanation - The basic unit an LLM processes - typically a word or word fragment. GPT models use ~50,000 tokens. "metaphysics" = 3 tokens: "met" + "aph" + "ysics". Numbers can be split awkwardly: "940" is one token, "941" is two tokens. - Extended detail (conceptual) - Four conceptual ingredients suffice for broad linguistic competence: 1. tokens (fine‑grained text units), 2. contextual vectors (how the model currently “sees” what’s been said), 3. attention (learned relevance to prior tokens), 4. selection among plausible continuations (choosing the next token). - Why these are enough to scale: Tokens let the model reuse subparts flexibly across languages and rare forms. Contextual vectors encode the current situational meaning of each token, capturing subtle cues like tone, discourse role, and local entailments. Attention surfaces what matters now from anything said before; it’s a learned, data‑driven relevance function, not a fixed rule. Choosing the next token operationalizes “keep going in a way that fits” across styles and topics; repeating this builds paragraphs and essays that track the prompt’s intent. - What’s not required here: hand‑built grammars or symbolic rules. The learned process internalizes a large portion of those constraints via exposure to their usage traces. ## 11. Token - Core explanation - Before Tokenization Raw text: "The philosopher's understanding" Includes spaces, punctuation, morphology Potentially infinite possible strings After Tokenization Sequence: ["The", "philos", "opher", "'s", "understand", "ing"] Each mapped to a number Fixed vocabulary of ~50,000 tokens. - Extended detail (conceptual) - Tokens are small units (often subwords) rather than full words. This granularity helps cover multiple languages, morphology, and rare or novel forms, allowing the model to generalize compositionally rather than relying on memorized whole words. - Why tokenization matters conceptually: It enables compositional coverage—new inflections and compounds can be handled by recombining familiar pieces. It preserves crucial written signals—punctuation, quoting, whitespace patterns—that carry discourse structure and tone. It reduces the reliance on exact matches; the system can recognize and use meaningful subparts, which supports generalization. - Consequences for competence and limits: Better coverage often improves fluency across diverse inputs. But tokenization quirks (e.g., number splits) can hinder specific competencies like arithmetic formatting unless supplemented (e.g., tools). - Discussion question (occasional) - If a model’s behavior depends on a particular tokenization, does that undermine claims about “language competence,” or is tokenization just an implementation detail like orthography? ## 12. From Text to Processable Units - Core explanation - Converting raw text into tokens and numerical representations is not a mere technicality; it preserves and standardizes the very cues (ordering, punctuation, markers of quotation and emphasis) that the model exploits to infer how to continue appropriately. - Extended detail (conceptual) - Why formalization conserves meaning cues: Written language is saturated with structural signals—commas, dashes, line breaks, quotes—that guide inference and discourse structure. Tokenization makes these signals machine‑legible. Mapping tokens to vectors gives the model a uniform way to “place” each piece so that similarity and difference become actionable. Adding positional information encodes order, enabling the model to distinguish constructions that are formally similar but semantically distinct (“only even numbers are allowed” vs “even numbers are only allowed”). - Philosophical relevance: This shows how “mere formatting” participates in meaning‑as‑use; meaning lives not just in lexical items but also in their patterned arrangement and presentation. ## 13. Word Embeddings: Meaning as Geometry - Core explanation - Traditional approach: words are discrete symbols with no inherent relationship Embedding approach: words become points in a high-dimensional space Words with similar meanings cluster together spatially Relationships between words become geometric relationships Example: king - man + woman ≈ queen Vector arithmetic captures semantic analogies This enables statistical learning from distributional patterns. - Extended detail (conceptual) - The model places tokens in high‑dimensional spaces where distances reflect usage‑based similarity and directions capture stable relations (e.g., role–filler, part–whole). Crucially, these positions are context‑sensitive, so a token’s “meaning” adapts to how it is used in the current passage. - Why geometry supports competence: If terms that regularly substitute for one another cluster together, the model can generalize behaviors (definitions