🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

25- Transformer Basics
18 Questions
0 Views

25- Transformer Basics

Created by
@ThrillingTuba

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the main weakness of sequential processing in RNNs?

Each hidden state depends on the previous one, making it hard to parallelize.

How does the transformer architecture handle the issue of sequential processing in RNNs?

Transformer architecture uses attention mechanisms to process all tokens in parallel, without sequential dependencies.

What is one drawback of using attention mechanisms in the transformer architecture?

Attention mechanisms require additional computation.

Explain the concept of 'bottleneck' in the context of passing data along time in models.

<p>In traditional sequential models, there is a bottleneck as data passes through each time step sequentially.</p> Signup and view all the answers

Why is it important for a language model to consider the importance of different input tokens?

<p>Not all inputs are equally important, and their importance may vary across time steps.</p> Signup and view all the answers

How can a language model benefit from understanding the importance of specific input tokens?

<p>By attending more to relevant tokens, the language model can make more accurate predictions.</p> Signup and view all the answers

What is the purpose of attention in the transformer architecture?

<p>To provide the LM with weights to focus on certain inputs.</p> Signup and view all the answers

What are the matrices involved in Scaled Dot-Product Attention?

<p>Q (Matrix of queries), K (Matrix of keys), V (Matrix of values).</p> Signup and view all the answers

How is the vanishing gradient problem weakened in Scaled Dot-Product Attention?

<p>By using a scaling factor.</p> Signup and view all the answers

What is the purpose of masking in attention mechanisms?

<p>To mask parts of the input during training and decoding.</p> Signup and view all the answers

Why is Multi-Head Attention used in complex tasks?

<p>To capture different views of the input simultaneously, such as nouns, pronouns, and verbs.</p> Signup and view all the answers

What is the challenge with naive attention implementations regarding memory?

<p>They require significant memory for large context sizes, leading to bottlenecks.</p> Signup and view all the answers

What are some optimizations implemented in FlashAttention 2?

<p>scaled dot-product attention in a single CUDA kernel, blockwise processing, optimized use of GPU cache and VRAM</p> Signup and view all the answers

Why does Full attention in LongFormer not scale to a large context?

<p>Full attention in LongFormer does not scale to a large context because it requires computation for every word</p> Signup and view all the answers

What is the concept of Factorized Self-Attention in Sparse Transformer?

<p>Different heads can have different attention access patterns, certain access patterns are more efficient to compute</p> Signup and view all the answers

How does Positional Encoding help with the order of tokens in transformers?

<p>Positional Encoding is added to embeddings to compute position differences and preserve token order</p> Signup and view all the answers

What is the purpose of Rotary Embeddings (RoPE) according to the text?

<p>Rotary Embeddings aim to preserve relative, not absolute, location in the text</p> Signup and view all the answers

Why does PE not extend well to a context longer than dim/2 to dim of the embeddings?

<p>PE does not extend well to longer contexts because it only depends on relative, not absolute, location</p> Signup and view all the answers

More Quizzes Like This

Use Quizgecko on...
Browser
Browser