Wrapping everything in a single class for the ease of deployment #17828
Unanswered
Ajith-Shenoy
asked this question in
code help: NLP / ASR / TTS
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey team,
I am very new to lightning , so far I'm very impressed. But the parts that are troublesome for me are dealing with hugging face transformer based models.
The environment I am using is heavily space limited a hugging face model.bin is around 3x more compact than a checkpoint object while saving , and there is no straightforward way of saving the model.bin directly as far as I've seen.
Coming to my core query , can I encapsulate the perks of Lightning module in my own custom classes ?
From a deployment point of view I have a python class created that helps me train , save , and predict on new text data using the hugging face library for "text classification".
It implements methods to :
Inspired from : BERT Fine-Tuning by Chris McCormick and Nick Ryan
Can I use all these utilities methods along with the perks that Lightning provides ? especially the logging and in the training_step of the model ? The mixed Precision training is something I'm a huge fan of.
ideally I would want a class:
Beta Was this translation helpful? Give feedback.
All reactions