Skip to content

t0

T0 from The Forecasting Company, plus every hub model.

extra CPU tag GPU tag families models example
t0 :t0 :t0-gpu T0 1 t0

License

The registry crafts T0 with license_accepted=True. The checkpoint is gated. Accept the model card and set a Hugging Face token before the first load.

Start a server

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

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": "t0"
}'
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":"t0"}'
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="t0",
    )
print(result.predictions)

Models

T0

T0Forecaster extra t0 1 model

The registry sets license_accepted=True. The checkpoint is gated. Each target is forecast on its own. Point forecasts are the median.

model checkpoint
t0 theforecastingcompany/t0-alpha

Also loadable here

Next steps