huggingface / huggingface/diffusers
[optimization] help us know which kernels we should integrate in Diffusers
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
This issue is for knowing which kernels we should integrate into the library through kernels.
Currently, we leverage kernels for different attention backends (FA2, FA3, and SAGE). However, other layers can be optimized as well (RMS Norm, for example), depending on the model size and input payload being used to benchmark that.
I did take a crack at this once, i.e., replacing the norm layers with their optimized counterparts, but didn't realize any noticeable gains. But maybe this is different now.
Resources / notes
- There's a bunch of kernels we maintain in https://huggingface.co/kernels-community, which could be repurposed in this case.
- We can also work together with the community to port impactful kernels and host them through https://huggingface.co/kernels-community and make sure they are
kernelscompatible. transformersgain benefits from this paradigm in terms of latency improvements (@MekkCyber can provide details). Some relevant PRs can be found here: https://github.com/huggingface/transformers/commits?author=MekkCyber (look for PRs with titles starting with "[kernels]")
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non sono indicati file o test. Inizia esaminando l’integrazione esistente di kernels per FA2, FA3 e SAGE, quindi esegui benchmark su livelli candidati come RMS Norm con diverse dimensioni dei modelli e payload di input. Il lavoro è completato quando sono stati identificati i kernels con miglioramenti significativi e determinati quelli adatti all’integrazione tramite kernels.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, pytorch
- Ambito
- machine-learning, performance
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100