1. Home
  2. Explore
  3. Computer Science
  4. Where LLMs Store Facts

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Where LLMs Store Facts

  • 64Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Stored Knowledge
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What does the prompt “Michael Jordan plays the sport of ___” illustrate about a language model?

Tap to flipClick to flipspace

Correctly predicting “basketball” suggests that the model contains information associating Michael Jordan with basketball.

Or swipe the card

64 cards

  1. What does the prompt “Michael Jordan plays the sport of ___” illustrate about a language model?

    Correctly predicting “basketball” suggests that the model contains information associating Michael Jordan with basketball.

  2. Where do research findings suggest that factual knowledge is primarily stored in transformer networks?

    In the multilayer perceptrons (MLPs) within the network.

  3. What is the main unresolved issue concerning factual knowledge in large language models?

    Exactly how facts are stored and represented inside the model.

  4. What are the two major computational components repeatedly used in a transformer?

    Attention and multilayer perceptrons (MLPs), with normalization steps also occurring between operations.

  5. What is the proposed role of MLPs in a transformer?

    They may provide extra capacity for storing and processing factual information.

  6. What is the toy fact used to explain how an MLP might store knowledge?

    That Michael Jordan plays basketball.

  7. What is the basic computation performed by an MLP block?

    A matrix multiplication, addition of a bias, a nonlinear activation function, a second matrix multiplication, and another bias addition.

  8. What happens to the output of an MLP before it leaves the block?

    The MLP output is added to the original vector that entered the block.

  9. Do vectors corresponding to different tokens communicate with one another inside an MLP step?

    No. Each vector is processed independently and in parallel.

  10. Why can understanding the MLP’s effect on one vector explain its effect on an entire sequence?

    Because the same operations are applied independently and in parallel to every token vector.

  11. What is the overall flow of information in a language model transformer?

    Text is split into tokens, tokens become vectors, and those vectors repeatedly pass through attention, normalization, and MLP operations before producing a next-token prediction.

  12. What is a token in a language model?

    A small chunk of text, usually a word or part of a word.

  13. What is associated with each token after tokenization?

    A high-dimensional vector containing a long list of numerical values.

  14. What must the final vector representations contain to support next-token prediction?

    Enough information from the input context and the model’s learned knowledge to predict what token comes next.

  15. What does attention contribute to token vectors?

    It allows vectors to incorporate information from other tokens in the context.

  16. How can directions in a high-dimensional vector space represent meaning?

    Different directions can encode different features or concepts.

  17. What classic word-embedding example illustrates a gender direction?

    Subtracting the embedding of “man” from “woman” and adding that difference to “uncle” produces a vector near the embedding of the corresponding feminine noun.

  18. What does a vector’s dot product with a feature direction indicate?

    How strongly the vector aligns with that feature direction.

  19. What three directions are assumed in the Michael Jordan toy example?

    Directions representing the first name Michael, the last name Jordan, and basketball.

  20. How would a vector represent the full name Michael Jordan under the toy assumptions?

    Its dot products with both the Michael direction and the Jordan direction would be one.

  21. Why must an earlier attention block pass information to the second token in “Michael Jordan”?

    Because the name spans two tokens, but the second vector must encode both the first and last names.

  22. What does the first matrix multiplication in an MLP do conceptually?

    It computes many dot products that probe the input vector for different features.

  23. How can the rows of the MLP’s first matrix be interpreted?

    As vectors or directions in the input embedding space.

  24. If a row of the first MLP matrix equals the Michael direction, what does its dot product measure?

    Whether the input vector encodes the first name Michael.

  25. Why can a row equal to M+JM + JM+J detect both Michael and Jordan?

    Because (M + J) dot E = M dot E + J dot E, so the dot products add together.

  26. What value would the M+JM + JM+J detector produce for a vector encoding both Michael and Jordan under the toy assumptions?

    A value of two before the bias is applied.

  27. What is the purpose of the bias added after the first matrix multiplication?

    It shifts the intermediate values so that the desired feature combination can be selectively activated.

  28. What is the up-projection matrix in an MLP?

    The first large matrix, which maps the input embedding into a higher-dimensional intermediate space.

  29. How many rows does the up-projection matrix have in the GPT-3 example?

    Just under 50,000 rows, exactly four times the embedding dimension.

  30. Why is a nonlinear function needed between the two MLP matrix multiplications?

    A purely linear operation cannot represent the nonlinear relationships required by language.

  31. What does the ReLU activation function do?

    It maps negative values to zero and leaves positive values unchanged.

  32. How does ReLU make the toy Michael Jordan detector behave like an AND gate?

    It preserves a positive activation only when both Michael and Jordan are present, while clipping zero or negative values to zero.

  33. What is GELU, and how does it relate to ReLU?

    GELU is a smoother activation function with a broadly similar shape and purpose to ReLU.

  34. What does it mean for a transformer neuron to be active?

    Its post-activation value is positive.

  35. What do the neurons in the middle of an MLP correspond to?

    The values produced after the first linear transformation, bias addition, and nonlinear activation.

  36. What is the down-projection matrix?

    The second large matrix that maps the intermediate neuron vector back to the original embedding dimension.

  37. How can multiplication by the down-projection matrix be understood column by column?

    Each column is multiplied by its corresponding neuron value, and the resulting scaled columns are added together.

  38. What does a column of the down-projection matrix represent?

    The direction added to the embedding-space output when the corresponding neuron is active.

  39. How does the toy MLP add the basketball feature to a Michael Jordan vector?

    The Michael-and-Jordan detector activates a neuron, whose down-projection column adds the basketball direction to the vector.

  40. What is the role of the down-projection bias?

    It adds a fixed vector to the output regardless of the neuron activations.

  41. What is the complete conceptual sequence for storing the toy fact in an MLP?

    Detect Michael and Jordan with the up projection, use bias and activation to implement an AND-like detector, then use the down projection to add basketball.

  42. How many neurons does a GPT-3 MLP block have per input token in the example?

    Just under 50,000 neurons.

  43. How many total neuron activations occur across a GPT-3 MLP block for an input sequence?

    Approximately 50,000 times the number of tokens in the input.

  44. How many parameters are in the GPT-3 up-projection matrix?

    About 604 million.

  45. How many parameters are in the GPT-3 down-projection matrix?

    About 604 million.

  46. How many parameters do the two main GPT-3 MLP matrices contain together?

    Approximately 1.2 billion parameters per MLP.

  47. How many distinct MLP blocks does GPT-3 have in the example?

    Ninety-six.

  48. How many total parameters are devoted to GPT-3’s MLP blocks?

    About 116 billion parameters.

  49. What fraction of GPT-3’s total parameters are in its MLP blocks?

    Approximately two-thirds.

  50. What is the approximate total parameter count of GPT-3 in the example?

    About 175 billion parameters.

  51. Why might individual MLP neurons rarely represent one clean feature?

    Because multiple features may be encoded using overlapping combinations of neurons, a phenomenon called superposition.

  52. What is the basic idea of superposition in neural networks?

    A network represents many features using directions that are not exactly orthogonal but are nearly perpendicular.

  53. How many exactly perpendicular feature directions can fit in an nnn-dimensional space?

    At most nnn mutually perpendicular directions.

  54. What changes when feature directions are allowed to be nearly perpendicular rather than exactly perpendicular?

    Many more feature directions can fit into the same high-dimensional space, at the cost of some noise or interference.

  55. What happens to the number of nearly perpendicular vectors as dimensionality increases?

    The number can grow exponentially with the number of dimensions.

  56. What did the 100-dimensional vector illustration demonstrate?

    It showed that 10,000 vectors—100 times the number of dimensions—can be optimized so that pairwise angles lie approximately between 89 and 91 degrees.

  57. Why are random high-dimensional vectors often close to perpendicular?

    Their pairwise angles are naturally concentrated near 90 degrees.

  58. How might superposition help large language models scale?

    A space with more dimensions can store far more than a proportional number of independent ideas.

  59. Where might superposition be relevant inside an MLP?

    Both in the embedding space and in the intermediate vector of neuron activations.

  60. How would superposition change the appearance of a feature in neuron activations?

    A feature would appear as a specific combination of neurons rather than as one neuron activating by itself.

  61. What tool is used by some interpretability researchers to recover features hidden in superposition?

    A sparse autoencoder.

  62. Why are MLP computations relatively easy to describe but difficult to interpret?

    Their operations are simple matrix multiplications and nonlinearities, but the meaning encoded in high-dimensional vectors and distributed activations is complex.

  63. What type of neural network structure does a transformer MLP resemble?

    A basic feedforward neural network with a linear transformation, a nonlinear activation, and another linear transformation.

  64. What major aspects of language-model training remain to be discussed after studying transformer components?

    The language-model cost function, reinforcement learning from human feedback, and scaling laws.

Card 1 of 64
Card 1 of 64

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent