Làkk AI GUIDE

FlashAtention

FlashAttention algorithm la buy sakkanal mémoire bi, muy xayma benn mémoire bi transformateur yi di def waaye du musa bind matrix mémoire bu mag bi ngir yeexal mémoire GPU bi.

2 simili jàngDañu mujjee yeesal

Résumé

It made long-context training and inference dramatically faster and cheaper.

Plongeur bu xóot

Fàttaliku buñ miin dafay xayma poñ ci peeru token bu nekk, muy defar benn matrix N-by-N. Ngir 4000 token yu toppalante, loolu mooy 16 milioŋ ciy poñ, te dañu wara bind matrix bi ci mémoire bandwidth bu kawe bi (HBM) ci GPU bi. Trafic mémoire bi mooy jafe-jafe bi, du math bi. FlashAttention, bi Tri Dao ak ay naataango dugal ci 2022, dafay yamale xayma bi suko defee matrix bi du musa am njariñ. Dafay liggéey ci toppalante yi ci ay carreaux yu méngoo ak GPU bi tuuti, ultra-gaaw ci puce SRAM, di ordinatër softmax di yokk lumuy dem. Resultaa bi mingi méngoo ci wàllu math ak attention standard waaye dafay jëfandikoo memory bu néew lool te dafay daw lu gëna gaaw lu bari yoon, loolu mooy tax palanteer yu gëna gudd.

Gis-gis xarala

Li am solo mooy 'softmax ci net bi' boole ci carreaux. FlashAttention dafay yab ay blok yu ndaw yu laaj, caabi, ak valeur ci SRAM, xayma ay génnug bàyyi xel ci wàll, ba noppi di gëna yokk xaalis biy daw ginaaw bi blok yu bees yegsee suko defee normalisasioŋ softmax des ci yoon wi te du gis poñ yépp benn yoon. Ndax musul denc matrix N-by-N ci HBM, memory bi dafay scale lineaire moo gën quadratique, kernel bi dafay boole ci benn GPU ngir wàññi memory biy yeex lire ak bind.

njeextalu pexe

Gaawaay ak yaatuwaay

Liggéeyukaay yi ci làkk yi mën nañu gëna gaaw te duñu yàq deggoo gi.

Dugg ak yegg

Dafay yaatal jëfandikoo gi ci làkk yi ak ci anam yi ñuy jokkoo.

dogal yu gëna leer

Ekip yi mën nañu gëna yàgg ci àtte ci jamono ji otomatisation di liggéey ci baamtu.

Ëlëgu FlashAttention

FlashAttention nekk na xeetu tabax buñ jagleel. FlashAttention-2 gëna yombal xaaj liggéeyu GPU, ba noppi FlashAttention-3 dafay jëfandikoo man-mani Hopper yu bees yu melni asynchrony ak FP8 bu woyof. Xaarandil wéyal co-design ak chips, boole bu gëna xóot ci serwëru inference ngir këyitu dokimaa yu gudd, ak variant yuñ defar ngir palanteer yu néew wala yuy gliise. Bi palanteer yi di push ci ay milioŋ ciy token, kernels IO-aware yu mel ni yii dañuy wéy di nekk lu am solo ngir mëna wéyal tàggat ak liggéey njëg yi.

Doxal ci àdduna dëgg

Taggat xeetu làkk yu mag yu melni Llama ak sistem yu nuroo ak GPT ci anam wu gëna gaaw te gëna néew njëgu GPU

Liggéey ay assistant chat yu yàgg yuy jël téere yépp wala base code te duñu jeexal mémoire bi

Gaawaale ay pipeline yuy tënk këyit yuy liggéey ay fukki junni token ci benn yoon

Xool bu am doole ak transformatër multimodal fu ay patch nataal yu guddu di tax bàyyi xel di seer

Risk yi ak balustrade yi

Lépp lu jaarul yoon mën na dugg ci rapoor yi, jàppale ci liggéey bi, wala ci njariñu gëstu bi.

Sensibilite bu gaaw mën na jur njariñ yu wuute ci laajte yu noonu mel.

Done yu am solo mën nañu feeñ sudee seytu jëfandikoo gi néew doole.

Roadmap ngir samp gi

1

Mandargal formaa génne gi, melokaan bi, ak standard kalite yi laata ngay dugal ko.

2

Tontu yu am solo ak balluwaay yu wóor saa yu dëggu bi di am solo.

3

Fexeel am barabu xool nit ñi ngir am njariñ yu am solo.

4

Toppal anami gacce yi ak di faral di tàggataat ay laaj wala def-liggéey.

Weyal di banneexu

Free newsletter

Get the daily AI briefing

Three verified AI stories every weekday morning, written in plain English. Free forever, no ads.

One email each weekday. Unsubscribe in one click. We never sell or share your address.

Test yourself

Take the FlashAttention quiz

Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.

Tambalil quiz

Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation

Laaj yi ñuy faral di laaj

What is FlashAttention?

FlashAttention algorithm la buy sakkanal mémoire bi, muy xayma benn mémoire bi transformateur yi di def waaye du musa bind matrix mémoire bu mag bi ngir yeexal mémoire GPU bi. Taggat ci contexte bu yagg ak inference gëna gaaw te gëna xéewale.

Lan mooy jafe-jafe bi gëna mag ci FlashAttention ci bàyyi xel buñ miin?

Foofu lañuy bàyyi xel ci mémoire bi: yóbbu matrix bu rëy bi N-by-N ci mémoire bu am bandwidth bu rëy mooy ëpp doole ci waxtu wi, du arithmétique bi ci boppam.

Ak naka lay méngoo ak génnug FlashAttention ak bàyyi xel buñ miin?

FlashAttention dafay xayma benn valeur biy bàyyi xel; Dafay yamale xayma bi ngir moytu matrix bi yépp nekk.

Ban mémoire GPU la FlashAttention di jëfandikoo ngir defar ay done ci biir ay carreaux?

FlashAttention dafay yab ay carreaux yu ndaw ci SRAM bu gaaw bi ci puce GPU bi, suko defee liggéey bu diis bi nekk ci wetu jumtukaayi ordinatër yi.

Ban pexe mooy may FlashAttention mu xayma softmax te du gis poñ yépp benn yoon?

Benn softmax ci net bi dafay wéy di dox ay maksimum ak ay som, di rescaling ay resultaa yu bees yi su carreaux yu bees yi ñëwee suko defee normalisation bu mujj bi jub.

Lan la FlashAttention-3 jëfandikoo ci?

FlashAttention-3 ñu ngi ko defaree ak GPU Hopper yu bees yi, ñuy jëfandikoo jëfandikoo bu asynchrone ak FP8 bu woyof ngir yokk gaawaay bi.