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

  • 67Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Knowledge Storage
If a language model correctly predicts basketball after the prompt “Michael Jordan plays the sport of
,” this suggests that the model contains knowledge linking a person to a sport.

67 questions

  1. 1
    If a language model correctly predicts basketball after the prompt “Michael Jordan plays the sport of
    _____
    ,” this suggests that the model contains knowledge linking a person to a sport.
    Hint

    Think of the sport associated with Michael Jordan.

    Answer

    basketball

  2. 2
    Although a complete mechanistic explanation remains unsolved, research suggests that factual knowledge in transformer networks is stored primarily in the
    _____
    .
    Hint

    These are also abbreviated as MLPs and form one of the two major kinds of transformer blocks.

    Answer

    multi-layer perceptrons

  3. 3
    The toy factual example used to illustrate how an MLP might store knowledge is that
    _____
    plays basketball.
    Hint

    The example combines a first name, a last name, and a sport.

    Answer

    Michael Jordan

  4. 4
    In a transformer, attention allows vectors associated with different tokens to
    _____
    between one another.
    Hint

    Attention incorporates information from other positions in the sequence.

    Answer

    pass information

  5. 5
    The two major operations repeatedly applied to token vectors in a transformer are attention and
    _____
    .
    Hint

    The second operation is abbreviated MLPs.

    Answer

    multilayer perceptrons

  6. 6
    Before processing by a transformer, text is broken into smaller units called
    _____
    .
    Hint

    These units are typically words or pieces of words.

    Answer

    tokens

  7. 7
    Each token in the input is associated with a high-dimensional
    _____
    consisting of a long list of numbers.
    Hint

    This numerical representation is often called an embedding.

    Answer

    vector

  8. 8
    After many transformer operations, each vector should contain enough contextual and learned information to help predict the
    _____
    token.
    Hint

    The model is trained to predict what comes after the input text.

    Answer

    next

  9. 9
    The normalization operation in the transformer flow occurs between the attention and
    _____
    operations.
    Hint

    It is the other major block besides attention.

    Answer

    multilayer perceptrons

  10. 10
    The majority of a transformer's parameters live inside the
    _____
    blocks.
    Hint

    These blocks are the multilayer perceptron components.

    Answer

    MLP

  11. 11
    In a high-dimensional embedding space, different
    _____
    can encode different kinds of meaning.
    Hint

    The example involving gender uses a particular orientation in vector space.

    Answer

    directions

  12. 12
    Subtracting the embedding of “man” from “woman” produces a direction that can encode
    _____
    information.
    Hint

    The direction distinguishes masculine and feminine concepts.

    Answer

    gender

  13. 13
    Adding the woman-minus-man direction to the embedding of “uncle” places the result close to the corresponding
    _____
    noun.
    Hint

    The transformation changes a masculine relation to its counterpart.

    Answer

    feminine

  14. 14
    A vector flowing through a transformer acquires meaning from both the surrounding
    _____
    and the model's learned knowledge.
    Hint

    This includes the other words in the input.

    Answer

    context

  15. 15
    Because a vector must help predict what comes next, it ultimately needs to encode much more than the meaning of a single
    _____
    .
    Hint

    Tokens may represent complete words or word fragments.

    Answer

    word

  16. 16
    In the toy example, one direction represents the first name
    _____
    , another represents the last name Jordan, and a third represents basketball.
    Hint

    This is the first name in the example fact.

    Answer

    Michael

  17. 17
    The directions for Michael and Jordan in the toy example are assumed to be nearly
    _____
    to one another.
    Hint

    Their dot product is intended not to interfere with one another.

    Answer

    perpendicular

  18. 18
    If a vector's dot product with the Michael direction is one, the toy model interprets it as encoding a person whose first name is
    _____
    .
    Hint

    The dot product measures alignment with the first-name direction.

    Answer

    Michael

  19. 19
    In the toy model, a dot product of zero or a negative value with a feature direction means that the vector does not meaningfully
    _____
    with that direction.
    Hint

    Dot products measure directional similarity.

    Answer

    align

  20. 20
    Because “Michael Jordan” spans two tokens, an earlier
    _____
    block must pass information to the second token's vector.
    Hint

    This operation allows vectors at different positions to exchange information.

    Answer

    attention

  21. 21
    The computation inside an MLP is essentially two matrix multiplications with a simple
    _____
    function between them.
    Hint

    This function prevents the overall computation from remaining purely linear.

    Answer

    non-linear

  22. 22
    Each individual vector entering an MLP is processed independently, and the resulting vector is added to the
    _____
    vector.
    Hint

    This is the vector that flowed into the block.

    Answer

    original

  23. 23
    The same MLP operations are applied to every token vector in the sequence in
    _____
    .
    Hint

    The vectors do not wait for one another during this step.

    Answer

    parallel

  24. 24
    During the MLP step, the vectors associated with different tokens do not
    _____
    to one another.
    Hint

    Unlike attention, this operation treats each vector separately.

    Answer

    talk

  25. 25
    The first matrix multiplication in an MLP maps the input vector into a
    _____
    dimensional space.
    Hint

    The up projection has more rows than the size of the embedding space.

    Answer

    higher

  26. 26
    The rows of the first MLP matrix can be interpreted as vectors that take
    _____
    products with the input embedding.
    Hint

    Each row asks a question about alignment with the input vector.

    Answer

    dot

  27. 27
    If a row of the up projection matrix equals the sum of the Michael and Jordan directions, its dot product with an embedding of the full name produces a value of
    _____
    in the toy example.
    Hint

    Each of the two name directions contributes one.

    Answer

    two

  28. 28
    The rows of the up projection matrix can be viewed as asking different
    _____
    about features of the vector being processed.
    Hint

    Each row probes for a different property or direction.

    Answer

    questions

  29. 29
    The vector of learned parameters added after the first matrix multiplication is called the
    _____
    .
    Hint

    It shifts the intermediate values before the activation function.

    Answer

    bias

  30. 30
    For the Michael Jordan detector in the toy example, a bias of negative one makes the relevant intermediate value positive only when both name features are present, functioning like an
    _____
    gate.
    Hint

    This logic gate activates only when all required inputs are present.

    Answer

    AND

  31. 31
    In GPT-3, the up projection matrix has just under
    _____
    rows.
    Hint

    The content describes this as approximately the number of questions or neurons.

    Answer

    50,000

  32. 32
    For GPT-3, the number of rows in the up projection matrix is exactly
    _____
    times the number of embedding dimensions.
    Hint

    This is a design choice intended to be hardware-friendly.

    Answer

    four

  33. 33
    The shorthand used for the up projection matrix is
    _____
    .
    Hint

    The letter W is paired with the word indicating expansion into a higher-dimensional space.

    Answer

    W up

  34. 34
    The activation function that maps negative values to zero while leaving positive values unchanged is the
    _____
    .
    Hint

    It is commonly abbreviated ReLU.

    Answer

    rectified linear unit

  35. 35
    The ReLU is useful in the toy example because it converts the Michael Jordan detector into a clean positive-or-zero signal resembling an
    _____
    gate.
    Hint

    The output is positive only when both name features are present.

    Answer

    AND

  36. 36
    A smoother alternative to ReLU that models often use is called the
    _____
    .
    Hint

    Its name begins with “Gaussian” and ends with the same two letters as ReLU.

    Answer

    GELU

  37. 37
    In transformer terminology, the values produced after the first linear operation and activation are called
    _____
    .
    Hint

    These are the dots often shown in a neural-network layer diagram.

    Answer

    neurons

  38. 38
    A neuron is considered active when its value is
    _____
    .
    Hint

    The ReLU preserves values on this side of zero.

    Answer

    positive

  39. 39
    A neuron is considered inactive when its value is
    _____
    .
    Hint

    ReLU maps negative values to this value as well.

    Answer

    zero

  40. 40
    The second large matrix multiplication in an MLP uses the
    _____
    projection matrix to return to the embedding dimension.
    Hint

    This projection reverses the expansion performed by the up projection.

    Answer

    down

  41. 41
    When interpreting the down projection by columns, each column represents a
    _____
    in the original embedding space.
    Hint

    The columns have the same dimension as the embedding vectors.

    Answer

    direction

  42. 42
    In the toy example, the first column of the down projection matrix is learned to represent the
    _____
    direction.
    Hint

    This is the feature associated with the Michael Jordan detector.

    Answer

    basketball

  43. 43
    If the basketball-associated neuron is inactive and has value zero, its corresponding column contributes
    _____
    to the final result.
    Hint

    The column is multiplied by the neuron's value.

    Answer

    nothing

  44. 44
    The bias in the down projection is added to the output
    _____
    of the neuron values.
    Hint

    It is added every time, whether neurons activate or not.

    Answer

    regardless

  45. 45
    After the down projection, the MLP result is added to the vector that originally flowed into the block, producing the final
    _____
    result.
    Hint

    This addition preserves and updates the input representation.

    Answer

    residual

  46. 46
    Using GPT-3's approximate dimensions, the up projection matrix contains about
    _____
    parameters.
    Hint

    This comes from multiplying just under 50,000 rows by 12,288 embedding dimensions.

    Answer

    604 million

  47. 47
    The down projection matrix has the same number of parameters as the up projection matrix, but with a
    _____
    shape.
    Hint

    Its dimensions are reversed while the number of entries remains unchanged.

    Answer

    transposed

  48. 48
    Together, the up and down projection matrices in one GPT-3 MLP contain approximately
    _____
    parameters.
    Hint

    This is twice the approximately 604 million parameters in one projection matrix.

    Answer

    1.2 billion

  49. 49
    GPT-3 contains
    _____
    distinct MLPs through which the sequence of embedding vectors flows.
    Hint

    The content describes this as the number of repeated MLP blocks.

    Answer

    96

  50. 50
    Across all of GPT-3's MLP blocks, the total number of parameters is approximately
    _____
    .
    Hint

    Multiply roughly 1.2 billion parameters per block by 96 blocks.

    Answer

    116 billion

  51. 51
    The MLP parameters make up approximately
    _____
    of the total parameters in GPT-3.
    Hint

    They represent more than half and close to 67 percent of the network.

    Answer

    two thirds

  52. 52
    The grand total of parameters in the GPT-3 configuration discussed is approximately
    _____
    .
    Hint

    This includes attention, embedding, unembedding, and MLP parameters.

    Answer

    175 billion

  53. 53
    The hypothesis that features can be represented using nearly perpendicular directions is known as
    _____
    .
    Hint

    It describes multiple features being represented through combinations of neurons.

    Answer

    superposition

  54. 54
    In an n-dimensional space, the maximum number of mutually perpendicular vectors is
    _____
    .
    Hint

    The number equals the space's number of dimensions.

    Answer

    n

  55. 55
    Superposition increases representational capacity by allowing feature directions to be nearly perpendicular rather than exactly
    _____
    .
    Hint

    A small amount of interference or noise is tolerated.

    Answer

    perpendicular

  56. 56
    The example creates 10,000 random vectors in a space with
    _____
    dimensions.
    Hint

    The number of vectors is 100 times the number of dimensions.

    Answer

    100

  57. 57
    Even before optimization, random high-dimensional vectors tend to have angles close to
    _____
    degrees.
    Hint

    This angle represents approximate orthogonality.

    Answer

    90

  58. 58
    The optimization process in the vector demonstration repeatedly nudges the vectors to become more
    _____
    to one another.
    Hint

    It tries to reduce overlap between their directions.

    Answer

    perpendicular

  59. 59
    According to the Johnson-Lindenstrauss lemma, the number of nearly perpendicular vectors that can fit in a space grows
    _____
    with the number of dimensions.
    Hint

    The growth is much faster than a simple linear increase.

    Answer

    exponentially

  60. 60
    Superposition may help explain both why language models are difficult to
    _____
    and why they scale well.
    Hint

    Researchers try to determine what internal representations mean.

    Answer

    interpret

  61. 61
    If individual features are stored in superposition, a feature may appear not as one neuron activating but as a specific
    _____
    of neurons.
    Hint

    The feature is distributed across multiple units.

    Answer

    combination

  62. 62
    A tool used by interpretability researchers to extract features that are superimposed across neurons is a sparse
    _____
    .
    Hint

    It is a type of model used to recover underlying representations.

    Answer

    autoencoder

  63. 63
    Superposition is relevant not only to the embedding space but also to the vector of
    _____
    in the middle of an MLP.
    Hint

    This is the high-dimensional intermediate activation vector.

    Answer

    neurons

  64. 64
    Because of superposition, a GPT-3 MLP might probe for many more features than the approximately
    _____
    neurons suggested by its width.
    Hint

    This is the approximate number of rows in the up projection matrix.

    Answer

    50,000

  65. 65
    The short answer for how a language model is trained is
    _____
    .
    Hint

    This is the gradient-based learning method discussed earlier.

    Answer

    backpropagation

  66. 66
    Fine-tuning a model using human preferences is described as reinforcement learning with human
    _____
    .
    Hint

    The missing word refers to responses or evaluations provided by people.

    Answer

    feedback

  67. 67
    The observation that model performance changes predictably with model size is studied through
    _____
    laws.
    Hint

    These laws relate performance to quantities such as model size and data.

    Answer

    scaling

1 of 67
Question 1 of 67

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent