Update chronos.py - model.device (#11)

*Issue #, if available:* N/A

*Description of changes:*

Thanks for the very clean impl of the Model, Tokenizer, and Pipeline. 

I was curios about it and found a minor improvement in the API - what do
you think about it? Feel free to close. Change is untested.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
This commit is contained in:
Michael Feil 2024-03-15 02:30:33 -07:00 committed by GitHub
parent 7ba945c995
commit ef786e9864
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -204,7 +204,10 @@ class ChronosModel(nn.Module):
super().__init__()
self.config = config
self.model = model
self.device = model.device
@property
def device(self):
return self.model.device
def forward(
self,