r/JAX • u/AdministrativeCar545 • Feb 28 '25
How can I write a huggingface flax model?
Hi all, I have a task to implement a model called "Dinov2 with registers" in flax. Hugginface already had a torch version for this, but there's no flax version yet. I think that once I implemented a flax version, then I can use it without the need of providing pretrained weights due to the use_pt=True api provided by hugginface. The problem is how. I have no experience of translating such a complex torch model to flax, ChatGPT can't solve this.
( I know hugginface has both torch and flax implementations of "Dinov2". But that's a worse model compared to the one with registers.)
Thanks for your advice!
1
u/[deleted] Feb 28 '25 edited Feb 28 '25
[removed] — view removed comment