引導式測驗 · 中等 等級

Flash注意力測驗

檢查 FlashAttention 如何在計算精確注意力的同時減少高頻寬記憶體流量,以及哪些硬體會更改 FlashAttention-3 目標。

相關引導路徑閃光注意力
問題 1 的 8

標準注意力中 FlashAttention 目標的主要瓶頸是什麼?

預覽每個問題8 問題

當您參加測驗時,就會出現答案和解釋。

  1. 標準注意力中 FlashAttention 目標的主要瓶頸是什麼?
    • 讀寫大型注意力矩陣會降低 GPU 記憶體速度
    • 浮點數乘法的次數
    • 輸入文字進行標記化的成本
    • GPU 之間的網路延遲
  2. FlashAttention 的輸出與標準注意力相比如何?
    • 這是一個以精確度換取速度的近似值
    • 它在數學上是相同的(精確的)
    • 它僅適用於短序列
    • 它改變了模型的權重
  3. FlashAttention 透過處理圖塊中的資料來利用哪些 GPU 記憶體?
    • 大但慢的高頻寬記憶體 (HBM)
    • CPU 的 RAM
    • 體積小但速度非常快的片上 SRAM
    • 磁碟儲存
  4. 什麼技術可以讓 FlashAttention 計算 softmax 而無需立即查看所有分數?
    • 完全跳過softmax
    • 將所有分數四捨五入為零
    • 在CPU上預先計算softmax
    • 具有運行重新縮放功能的線上(增量)softmax
  5. 由於完整的注意力矩陣從未儲存在 HBM 中,因此記憶體使用量大致如下:
    • 與序列長度線性相關
    • 與序列長度成二次方
    • 與序列長度呈指數關係
    • 與序列長度無關
  6. Which numeric format does FlashAttention-3 use in its Hopper-focused experiments to accelerate attention?
    • Only 64-bit floating point
    • FP8, with techniques to manage its numerical error
    • Integer text tokens
    • No reduced-precision format
  7. What work-partitioning change does FlashAttention-2 introduce to improve GPU parallelism?
    • It stores the complete attention matrix in HBM
    • It replaces attention with convolution
    • It reduces non-matrix-multiplication work and improves parallelization across thread blocks and warps
    • It uses only CPU execution
  8. In FlashAttention-3, what lets data movement overlap with computation?
    • Replacing attention with a lookup table
    • Computing all scores in host memory
    • Disabling the softmax step
    • Asynchronous execution on Hopper hardware