:rotating_light: Kernels=True ?! (#47773)
* kernel native
* fix warning
* have to fix other modular to be coherent
* remove useless
* use native lib as well
* modular
* combine them
* doc
* ignore kwargs, allow og
* fix
* gdn like paths (missing conv of olmo hybrid)
* olmo hybrid fused conv style
* fix
* fix
* poc mamba2, kernel must compile but torch seems to match
* kernels match --> hf kernels will be needed
* style
* quick fixes
* mamba2 works
* mamba2 suite of models
* oops
* conv1ds across other models
* let's try this
* mamba base implementation
* fixups as per review comments
* fixup mamba tests and other issues
* make no shape check by default (single padded sample should also work)
* remove todo
* propogate mamba1
* style
* fix mambapy + enable on jamba
* zamba1
* style
* fix early cast (leads to non fp32 norm)
* fix padding free path
* fix offload
* bump kernels
* remove todo
* avoid onnx export and fix mamba2 test
* fix bamba test
* update falcon mamba - aligned with all other devices
* oops
* kernels=True by default
* fixup tests that require kernels (at model load time)
* let's apply kernels where we can! only on non inherited classes ignore kernels for now
* moe
* style
* oops
* fix offline (disable in any case), fix run kernels to use prepared per class
* test
* fix
* let's make them also inherit as special cases
* come ooon
* kernels is default install
* forgot that one
* add todo
* fix versioning for newer torch
* it got duplicated
* at least push this
* yes yes
* initial implementation to reset kernelization
* enable new kernels lifecycle
* clarify
* fix bad models and bad imports
* generate test with kernels
* how did that pass before
* fix wrong set of precedence
* we need a gpu
* current state of kernels
* compile
* full refactor in how we do this
* fix kernels tests for the most part, docstring to go over style
* remove deprecated
* make rope inference only
* this is needed for the fused stuff -> needs some other core to check...
* drop llama4
* ok thats the better way to fix it
* fix this to new revision as well
* missed this
* uncomment qwen ones
* update references
* update mamba to official version
* make fa more robust
* better
* fix a bunch of issues
* fix
* style
* rm kernels uninstall
* small fixes
* last beam fix
* fixes part1
* fix fa undeer static caches
* quick fixes
* fix
* make this not compile
* esmfold
* last fixes
* style
* fa fixes
* last kernel (being uploaded rn)
* style
* remove those workarounds
* update
* fix
* lets revert this part for now
* make completely reverted
* add regression test
* small cleanup
* style
* fix helpers
* model fixes
* style
* fix offloading device match
* make this simpler
* fix
* other offload fix for wav2vec2
* fix hooks
* fix fa
* update version
* cb w/o kernels for now too flaky
* oops
* review comments
* fix flags
* update rocm
* Disable kernels before wrapping a model in nn.DataParallel
A kernel is bound to the layer it was set on, so the `nn.DataParallel`
replicas would all run the layers of the first device. Disable kernels with
a warning instead; DDP (`torchrun`, `accelerate launch`) keeps them.
* update and enable training
* this is too much, lets patch .train call
* some quick fixes
* style
* bump kernels
* review
* fix default
* fix lfm3
* style
* review
* raise min version
* keep bc for that, doesnt hurt
* make it default, small cleanup
* fix this
---------
Co-authored-by: Cyril Vallez <cyril.vallez@gmail.com>
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
Co-authored-by: Marc Sun <marc@huggingface.co>