secretflow / spu

SPU (Secure Processing Unit) aims to be a provable, measurable secure computation device, which provides computation ability while keeping your private data protected.
https://www.secretflow.org.cn/docs/spu/en/
Apache License 2.0
243 stars 106 forks source link

PyTorch Support #308

Open deevashwer opened 1 year ago

deevashwer commented 1 year ago

I see that SPU already has experimental support for PyTorch. Has it been tested on a transformer model yet (even for inference)?

anakinxc commented 1 year ago

Hi @deevashwer

PyTorch support is still at it's very early stage, the demo is just showing it's potential...

Technically things like this might work fine with SPU.

deevashwer commented 1 year ago

Thanks! Is PyTorch support a priority for the SecretFlow team? If yes, is it possible to give a rough estimate on the timeline for this?

anakinxc commented 1 year ago

Thanks! Is PyTorch support a priority for the SecretFlow team? If yes, is it possible to give a rough estimate on the timeline for this?

Better PyTorch support is definitely something we would like to see, but it's not a priority at this point.

Feedbacks and inside thoughts that can help us make a better judgement are welcome :D

deevashwer commented 1 year ago

You probably already know this, but I would vouch for PyTorch simply because it is by far the most widely adopted framework and it unlocks the entire huggingface library. If you look here, everything is supported in PyTorch, and TF and JAX support is relatively sparse. All the state-of-the-art models (not just in NLP) are also typically released in PyTorch. So you stand to unlock all the models, if a robust support for PyTorch is added to SecretFlow.

anakinxc commented 1 year ago

You probably already know this, but I would vouch for PyTorch simply because it is by far the most widely adopted framework and it unlocks the entire huggingface library. If you look here, everything is supported in PyTorch, and TF and JAX support is relatively sparse. All the state-of-the-art models (not just in NLP) are also typically released in PyTorch. So you stand to unlock all the models, if a robust support for PyTorch is added to SecretFlow.

Thanks for the inputs, I'll bring this up to our team.

github-actions[bot] commented 1 year ago

Stale issue message. Please comment to remove stale tag. Otherwise this issue will be closed soon.

anakinxc commented 10 months ago

Hi @deevashwer

We just made some improvements on Torch support, check here. Feel free to give it a shot.

Be aware, due to an issue in huggingface/transformers, we do not support models from huggingface at this point.