Open bhack opened 1 week ago
Iirc, I think the team at meta showed it in a pretty nice way over here: https://github.com/facebookresearch/lingua/tree/main/apps/mamba/component
Edit: at least for Mamba2
Edit 2: I was too quick, i mistook it for compiling 🤦 ignore this
I am asking this cause https://github.com/huggingface/transformers/issues/33839.
But yes after exporting the model it could be also compiled so a complete example of export+compile it will be very helpful.
@mathuvu Do you plan to contribute your https://github.com/facebookresearch/lingua/tree/main/apps/mamba/component upstream?
Can you add a small example on how to export mamba models?
See https://github.com/pytorch/pytorch/issues/130150
https://pytorch.org/tutorials/intermediate/torch_export_tutorial.html#custom-ops
Thanks