Time-Series Forecasting with Foundation Models
Chronos, TimesFM, and Lag-Llama forecast series they have never seen. Learn how time series became token sequences, and when to use a foundation model over ARIMA.
Published on • August 6, 2026
AI Assistant

For decades, forecasting meant fitting a model per series: ARIMA, ETS, or a tuned XGBoost. Foundation models flipped that premise — a single pretrained network, trained on millions of series, can forecast a series it has never seen, with zero per-series fitting. In 2026 the practical question is no longer “do these models work” but “when is one the right tool.”
How time series became a language
The core trick is tokenization: scale the series, quantize the values into a fixed vocabulary, and train a transformer to generate the continuation. Forecast = a sample from a learned predictive distribution.
- Chronos (Amazon) — the original recipe. A T5-based encoder–decoder trained with cross-entropy over value tokens. Zero-shot, probabilistic. Chronos-2 extends it to multivariate and covariate-informed tasks and currently leads fev-bench, GIFT-Eval, and Chronos Benchmark II among public pretrained models.
- TimesFM (Google) — a decoder-only model over patched inputs; trained on Google’s internal corpus (Search trends, YouTube, Cloud monitoring), which shows in strong web-traffic performance. TimesFM 2.5: 200M params, 16k context, quantile forecasts.
- Lag-Llama — the first open-source time-series foundation model; a decoder-only model over lag features, probabilistic, best when fine-tuned.
The minimal Chronos example
import torch
from chronos import ChronosPipeline
pipeline = ChronosPipeline.from_pretrained(
"amazon/chronos-bolt-base", # small = 48M, base = 205M
device_map="cuda" if torch.cuda.is_available() else "cpu",
)
series = torch.tensor([1.0, 1.3, 0.9, 1.2, 1.5, 1.4, 1.7, 1.9, 1.6])
# sample 20 future trajectories, 12 steps ahead
samples = pipeline.predict(context=series, prediction_length=12, num_samples=20)
low, median, high = samples.quantile(dim=0, q=[0.1, 0.5, 0.9])
print("median forecast:", median)
You pass the history, ask for a horizon, and get back a distribution — the quantiles are the forecast band, not just a point estimate. That’s the practical difference from classical point forecasts.
TimesFM 2.5
import timesfm
model = timesfm.TimesFM_2p5_200M_torch.from_pretrained("google/timesfm-2.5-200m-pytorch")
model.compile(timesfm.ForecastConfig(max_context=1024, max_horizon=256, normalize_inputs=True))
forecast, quantile_forecast = model.forecast(
horizon=12,
inputs=[np.linspace(0, 1, 100)], # one series per entry
)
Zero-shot strengths and honest limits
Zero-shot means no task-specific training — but the models reward a bit of care:
- Context length matters. Zero-shot accuracy improves as you give more history, up to a series-specific ceiling. Lag-Llama’s authors recommend trying context lengths from 32 upward.
- They are trend-shrinkers, not trend-extrapolators. Research shows foundation models systematically under-extrapolate trends compared to ETS — they win on average, but not because they’re better at trend lines. For strong, clear trends in short data, classical methods can still win.
- They shine on short series. A break-even analysis across 30 datasets found foundation models unconditionally beat classical baselines on 15 of them; but when training data is tiny (<~700 samples) and seasonality is non-negligible, zero-shot foundation models skip the fitting entirely and often win outright — and fine-tuning can actively hurt on short series.
When to use a foundation model vs classical
| Situation | Pick |
|---|---|
| <~700 samples, no strong trend, seasonal | Zero-shot foundation model (no training) |
| Lots of historical data, clear trend | Classical (ETS/Theta/ARIMA) or fine-tuned FM |
| Need probabilistic forecast bands | Foundation model (Chronos/Chronos-2) |
| Edge / CPU / IoT, tiny models | Granite TTM or Chronos-Bolt tiny/mini |
| Web/digital metrics | TimesFM (trained on web-scale data) |
Putting It All Together
A production forecast service: load the smallest model that meets accuracy, batch series, return quantiles.
from fastapi import FastAPI
from pydantic import BaseModel
import torch
from chronos import ChronosPipeline
app = FastAPI()
pipeline = ChronosPipeline.from_pretrained("amazon/chronos-bolt-small", device_map="cpu")
class ForecastRequest(BaseModel):
series: list[float]
horizon: int = 12
@app.post("/forecast")
def forecast(req: ForecastRequest):
samples = pipeline.predict(
context=torch.tensor(req.series), prediction_length=req.horizon, num_samples=20
)
low, med, high = samples.quantile(dim=0, q=[0.1, 0.5, 0.9]).tolist()
return {"median": med, "p10": low, "p90": high}
For scale, deploy via AutoGluon-Cloud or SageMaker to batch-forecast millions of series nightly — Chronos-2 delivers 300+ series/second on a single A10G GPU.
Conclusion & Next Steps
Foundation models turned forecasting into zero-shot generation from a learned distribution, and they win when data is scarce and probabilistic answers matter. Next: benchmark a foundation model zero-shot against your current ARIMA/XGBoost on your own series before fine-tuning, tune context length, and reserve fine-tuning (LoRA) for cases with enough data to justify it.
References / Sources
- Chronos (Amazon). https://github.com/amazon-science/chronos-forecasting
- Chronos: Learning the Language of Time Series. https://arxiv.org/abs/2403.07815
- TimesFM (Google Research). https://github.com/google-research/timesfm
- Lag-Llama. https://github.com/time-series-foundation-models/lag-llama
- Break-even analysis of pretrained forecasters. https://arxiv.org/abs/2607.04919