Falcon-TST 2.0: Quantile Time Series Forecasting in Python

Ant International's open-source Falcon-TST 2.0 now tops the GIFT-Eval time series benchmark with a MASE of 0.666, ahead of models from Google, Amazon and Salesforce. It installs with a single pip command, and the API returns 21 quantiles per horizon — enough to build confidence bands without any extra sampling.

Why it matters

Falcon-2.0 is an encoder-only univariate time series foundation model trained with ORBIT (Omni-Range Bootstrap Incremental Training). Encoder-only means one forward pass maps the entire context window to the forecast — no autoregressive decoding, so latency drops and errors don't accumulate. That is a deliberate trade against the first Falcon's hierarchical mixture-of-experts decoder: you get faster, distribution-aware forecasting for single series, while Falcon-X covers heterogeneous multivariate series.

Key ideas

  • One pass, 21 quantiles. The API outputs quantiles 0.01, 0.05, 0.10 … 0.95, 0.99 in shape (B, 21, H) — enough to draw confidence bands without extra sampling.
  • Missing values are first-class. Pass an input_mask (1 = observed, 0 = missing), or just use np.nan inside the context. Handy for weekends, trading halts and misaligned calendars.
  • The median is your point forecast. Quantile index 10 is the 0.5 quantile — take it directly as the point prediction.

Code: forecast in three steps

pip install falcon-tst
import numpy as np
from falcontst import FalconClient

# B series, L = 512 lookback steps, H = 96 steps ahead
context = np.random.randn(32, 512)
input_mask = np.ones_like(context)   # 1 = observed, 0 = missing

client = FalconClient()
result = client.quantile_predict(
    context=context,
    prediction_length=96,
    model_name="Falcon-2.0",
    input_mask=input_mask,           # mark gaps / holidays as 0
)

prob = np.array(result["prob_prediction"])  # (B, 21, H)
point = prob[:, 10, :]               # median = 0.5 quantile
lo, hi = prob[:, 0, :], prob[:, -1, :]      # 1% / 99% bounds

For series with real gaps — FX rates across a weekend, or a calendar with exchange holidays — set the missing positions to 0 in input_mask and the model handles the rest.

Practical tips

  • Use the spread, not just the median. The 1%–99% band directly supports VaR-style exposure estimates. Ant International built Falcon-2.0 for cross-border payment FX risk management, where the tails are the point.
  • Keep the lookback window consistent. The API is built around fixed context lengths (512 in the examples). Feed a stable L — don't pad with random data.
  • Reproduce GIFT-Eval before trusting your domain. The repo ships an eval notebook (eval/falcon-2.ipynb). Foundation models generalize, but verify on your own series first.
  • Pick the right sibling. Univariate with quantiles → Falcon-2.0. Heterogeneous multivariate → Falcon-X. The hierarchical MoE research model → Falcon-1.0.
  • Plan the stack. If you are still weighing where foundation models fit into production, our 2026 AI Trends overview is a good starting point.

Resources

FAQ

Is Falcon-TST 2.0 free to use? Yes. The client and model are Apache-2.0 on GitHub (ant-intl/Falcon-TST), and pip install falcon-tst gives you the client. The quantile_predict API is the fastest way to run it.

How does Falcon-2.0 differ from Falcon-1.0 and Falcon-X? Falcon-2.0 is an encoder-only univariate model: one forward pass, 21 quantiles per horizon. Falcon-X targets multivariate series with heterogeneous variates, and Falcon-1.0 is the hierarchical MoE research version.

What does a MASE of 0.666 mean? MASE (mean absolute scaled error) is scale-free — lower is better. 0.666 is the best score on the GIFT-Eval suite, ahead of models such as Chronos and TimesFM on that benchmark.

Leave a Comment

Scroll to top