You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LIT documentation says Framework-agnostic and compatible with TensorFlow, PyTorch, and more, but I'm having a hard time figuring out what exactly I need to do in order to run a PyTorch model in LIT. To be specific, I would like to use PyTorch models written using the TorchText library and/or the HuggingFace Transformers library.
Yup - we'll release something for this very soon. The existing examples use TensorFlow on the backend, but everything from the Model class is returned as NumPy arrays so you can pretty much just replace the TF lines with their PyTorch equivalents.
The LIT documentation says
Framework-agnostic and compatible with TensorFlow, PyTorch, and more,
but I'm having a hard time figuring out what exactly I need to do in order to run a PyTorch model in LIT. To be specific, I would like to use PyTorch models written using the TorchText library and/or the HuggingFace Transformers library.When I looked through the code in https://github.com/PAIR-code/lit/blob/main/lit_nlp/examples/models/glue_models.py, I see references to
tf.keras
andtf.GradientTape
, which are obviously for TensorFlow.Would it be possible for you to please add one or two examples showing how to use PyTorch with LIT?
The text was updated successfully, but these errors were encountered: