Skip to content

timesfm3

Google TimesFM 3, plus every hub model.

extra CPU tag GPU tag families models example
timesfm3 :timesfm3 :timesfm3-gpu TimesFM 3 1 timesfm_3

License

The registry crafts TimesFM 3 with license_accepted=True. Weights use the TimesFM non-commercial license.

Start a server

docker run --rm -p 8000:8000 sktime/tserve:timesfm3 timesfm_3
uv pip install "tserve[server,timesfm3]"
uv run tserve timesfm_3
pip install "tserve[server,timesfm3]"
tserve timesfm_3

Check what loaded:

curl -s http://127.0.0.1:8000/models

Predict

Python needs the client extra on the caller.

curl -s http://127.0.0.1:8000/predict -H "Content-Type: application/json" -d '{
  "past": {
    "timestamp": ["2024-01-01", "2024-01-02", "2024-01-03", "2024-01-04", "2024-01-05"],
    "sales": [120, 135, 128, 142, 138]
  },
  "time": "timestamp",
  "target": ["sales"],
  "fh": 3,
  "model": "timesfm_3"
}'
curl.exe -s http://127.0.0.1:8000/predict -H "Content-Type: application/json" -d '{"past":{"timestamp":["2024-01-01","2024-01-02","2024-01-03","2024-01-04","2024-01-05"],"sales":[120,135,128,142,138]},"time":"timestamp","target":["sales"],"fh":3,"model":"timesfm_3"}'
from tserve.client import Client

past = {
    "timestamp": ["2024-01-01", "2024-01-02", "2024-01-03", "2024-01-04", "2024-01-05"],
    "sales": [120, 135, 128, 142, 138],
}

with Client("http://127.0.0.1:8000") as client:
    result = client.predict(
        past=past,
        time="timestamp",
        target=["sales"],
        fh=3,
        model="timesfm_3",
    )
print(result.predictions)

Models

TimesFM 3

The registry sets license_accepted=True. Weights use the TimesFM non-commercial license. Point forecasts are the median. Native quantile levels are 0.1 through 0.9.

model checkpoint
timesfm_3 google/timesfm-3.0-pytorch

Also loadable here

Next steps