google-research / timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
https://research.google/blog/a-decoder-only-foundation-model-for-time-series-forecasting/
Apache License 2.0
3.55k stars 300 forks source link

RAM size #137

Open Yeoonsu opened 2 weeks ago

Yeoonsu commented 2 weeks ago

Hi there,

I’m encountering issues with the model crashing frequently. Could you please provide guidance on how to adjust the model parameters to reduce memory usage?

Also, could you share the amount of RAM you have available when running this model? I’m currently using a laptop with 16GB of RAM. plus, I don't have GPU.

Thank you!

(sorry, I'm very beginner.)

import timesfm

tfm = timesfm.TimesFm(
    context_len=256,
    horizon_len=128,
    input_patch_len=32,
    output_patch_len=128,
    num_layers=20,
    model_dims=1280, 
    backend="cpu"
)

tfm.load_from_checkpoint(repo_id="google/timesfm-1.0-200m")
cagaoloz commented 1 week ago

You can try it on Google colab. I tried it on a machine with 12 ram cpu on Colab and it works smoothly and comfortably. As far as I know, horizon_len should be maximum 96.