amazon-science / chronos-forecasting

Chronos: Pretrained (Language) Models for Probabilistic Time Series Forecasting
https://arxiv.org/abs/2403.07815
Apache License 2.0
2.38k stars 273 forks source link

How to do inference without connecting to HuggingFace? #35

Open ForestsKing opened 6 months ago

ForestsKing commented 6 months ago

The connection between my server and Hugging Face is not very smooth. I have downloaded the model weights. I would like to know if it is possible to close the connection to Hugging Face before calling Chronos, it often takes a lot of time and may fail. Thanks!

abdulfatir commented 6 months ago

@ForestsKing typically, using a HF model prefix should not have a significant overhead. However, if you're facing issues with your connection, you might try downloading the model first and loading from a local path. Here's how to do it:

pipeline = ChronosPipeline.from_pretrained( "./checkpoints/chronos-t5-small", device_map="cuda", torch_dtype=torch.bfloat16, )

ForestsKing commented 6 months ago

Thank!

lostella commented 6 months ago

Leaving open as FAQ