Feature request: Kernels metadata in the models

Feature Request: Kernel Metadata for Models

When Kernels were introduced, this idea immediately came to mind: being able to link the kernels used in a model repo, in a way very similar to how datasets are linked.
I imagine they might look like this:

And the YAML code could then be like this, for example:

---
kernels:
  - kernels-community/flash-attn3
---
# Model Card

Advantages

The advantages are:

  • a user can immediately know whether their GPU is compatible or not for training
  • Many users use tags to express the kernel, but this can create confusion. Some might use “flash-attention” or “flash_attn.” Having the ability to directly insert the kernel solves this problem.

I hope you like it and that the Hugging Face team might consider implementing it.
Thanks for have reading :heart::hugs:

I like it, but “a user can immediately know whether their GPU is compatible or not for training” shouldn’t be effected by the kernels used. If they use flash-attn and the user does more training without flash attention it would still train.

Oh, sorry, I didn’t know that. I thought it had an influence, but I probably misunderstood the documentation. I’m still a bit of a beginner with models in general.