Closed joecummings closed 1 year ago
@Nayef211 Thoughts on the with_generation_utils
on the model bundle versus having this as a separate class to import?
@Nayef211 Thoughts on the
with_generation_utils
on the model bundle versus having this as a separate class to import?
I think the with_generation_utils
is probably a cleaner way to do it and reduces code duplication. I would just make sure to clearly document this parameter so users understand what it does and how it's used.
@atalman @osalpekar Why is torchdata
no longer being picked up in smoke_tests.py?
Makes
GenerationUtils
TorchScript-compatible w/ T5 model.This PR makes the following changes:
GenerationUtils
annn.Module
and TorchScript-compatiblewith_generation_utils
toT5Bundle.get_model()
that returns a T5 model wrapped in a TorchScript-compatibleGenerationUtils
classTesting:
GenerationUtils
get_model
withwith_generation_utils=True
and confirming that it is Torchscriptable and provides the correct results.