Exercise 3: Why One Decoder-Only Model Replaces Two Separate Pipelines — Possible Solution ==================================================================== WHAT nlp1-6 AND nlp1-7 EACH REQUIRED ------------------------------ Per nlp1-10's own capstone (recapped in this chapter's own finding-box), nlp1-6's sentiment classifier and nlp1-7's NER tagger were "genuinely separate pipelines" — different output layers (sigmoid vs. softmax over multiple tags), different training objectives, and separately trained models, despite sharing the same underlying LSTM mechanism. Neither model could perform the other's task at all. HOW THIS CHAPTER'S OWN REFRAMING WORKS ------------------------------ Per this chapter's own example, sentiment becomes the text "Review: ... Sentiment:" and NER becomes the text "Sentence: ... Named entities:". Both are now simply text, passed into the identical decoder-only model, which does what it always does — predict the most probable continuation of whatever text it's given. For the sentiment framing, a well-trained model's most probable continuation is something like "positive" or "negative"; for the NER framing, its most probable continuation is a list of identified entities. No part of the underlying model changes between the two. WHAT SPECIFICALLY CHANGES BETWEEN THE TWO CASES ------------------------------ Only the input text itself — the specific words used to frame the task and the specific content being asked about. The model's own weights (every W_Q/W_K/W_V matrix, every feed-forward parameter, per llm1-4 and llm1-5), its architecture (the causally-masked decoder-only stack, this chapter), and its training objective (next-token prediction) are all completely identical in both cases. WHAT SPECIFICALLY DOES NOT CHANGE ------------------------------ Unlike nlp1-6/nlp1-7's own genuinely different sigmoid-vs-softmax output layers and separately trained parameters, a decoder-only model never swaps out any component for a different task. There is exactly one output mechanism (a probability distribution over the entire vocabulary, at every generation step, per llm1-2's own tokenization), used identically regardless of what task the input text is framing. WHY THIS IS THE PRECISE MECHANICAL DELIVERY OF nlp1-10's THIRD CLAIM ------------------------------ Per this chapter's own finding-box, nlp1-10 asserted that an LLM offers "one flexible architecture instead of many task-specific pipelines" without proving the mechanism. This example shows exactly what makes that true: since the model's only real capability is "predict the next token given this text," and since nearly any task can be expressed as some text whose most probable continuation is the desired answer, one single trained model can be steered toward arbitrarily many different tasks purely through how the input is framed — with zero architectural change required between them, unlike nlp1-6 and nlp1-7's own genuinely separate, purpose-built pipelines. WHY THIS WORKS AS AN ANSWER ------------------------------ It contrasts nlp1-6/nlp1-7's own genuinely separate architectures with this chapter's own single decoder-only model, walks through the specific sentiment/NER reframing example to show exactly what changes (only the input text) and what doesn't (weights, architecture, objective), and connects this directly to nlp1-10's own third claim as the concrete mechanism that makes it true.