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.03k stars 227 forks source link

Memory guidance #25

Open microprediction opened 1 month ago

microprediction commented 1 month ago

Can you provide approximate memory requirement guidance for using the model?

piratos commented 1 month ago

indeed it went OOM in my laptop, switching to a larger server, a simple

import timesfm

tfm = timesfm.TimesFm(
    context_len=128,
    horizon_len=64,
    input_patch_len=32,
    output_patch_len=128,
    num_layers=20,
    model_dims=1280,
    backend="gpu",
)
tfm.load_from_checkpoint(repo_id="google/timesfm-1.0-200m")

Seems to take around 18G of vram