Open-source project
Nixtla/neuralforecast avatar
Nixtla/neuralforecast

NeuralForecast: Nixtla's PyTorch Model Zoo for Time Series

Scalable and user friendly neural :brain: forecasting algorithms.

4,278 stars510 forksPythonApache-2.0

At a glance

What is it?
NeuralForecast wraps more than 30 neural forecasting architectures behind a scikit-learn style fit and predict interface, with Ray and Optuna for tuning. It is a serious library, but it is not a small dependency and not a replacement for a simple statistical baseline.
Who is it for?
Adopt NeuralForecast if you already run PyTorch, have many related series with enough history, and want NHITS, NBEATSx, TFT or a long-horizon transformer behind one fit/predict call. Do not adopt it for a handful of short series, for edge deployment where a torch plus ray install is unacceptable, or as a first tool if you have not yet established a statistical baseline.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The gap NeuralForecast is trying to close

The README is unusually blunt about the problem it targets. Published neural forecasting research, it argues, is hard to use and often fails to beat statistical methods while costing far more compute. NeuralForecast is Nixtla's answer: a curated set of implementations, each one expected to be accurate and efficient enough to justify the GPU time. That framing matters when you evaluate it, because it means the library is not trying to be a general deep learning framework. It is trying to be a catalogue of models that have already earned their place.

The intended user is a forecasting practitioner who is comfortable with pandas and scikit-learn but does not want to reimplement NBEATS or PatchTST from a paper. The README lists MLP, LSTM, GRU, RNN, TCN, TimesNet, BiTCN, DeepAR, NBEATS, NBEATSx, NHITS, TiDE, DeepNPTS, TSMixer, TSMixerx, MLPMultivariate, DLinear, NLinear, TFT, Informer, AutoFormer, FedFormer, PatchTST, iTransformer, StemGNN and TimeLLM. That is a wide spread, from linear baselines to transformer architectures, and the presence of DLinear and NLinear alongside TimeLLM says something: the library would rather include a simple model that wins on some datasets than only the fashionable ones.

How the fit and predict loop actually works

The core object is NeuralForecast, constructed with a list of model instances and a frequency string. Calling fit trains every model in that list on a single long-format dataframe; calling predict returns forecasts for all of them. The README describes the interface as unified with StatsForecast, MLForecast and HierarchicalForecast, meaning the same dataframe shape goes in and the same shape comes out. If you have used StatsForecast, the mental model transfers directly.

Underneath, the models are PyTorch modules trained through PyTorch Lightning, which is why pytorch-lightning appears as a pinned dependency rather than an optional one. Data wrangling and visualisation are delegated to utilsforecast and coreforecast, which are separate Nixtla packages. Automatic hyperparameter tuning runs on Ray or Optuna, and the README points to Auto models for that path. Probabilistic forecasting is handled through adapters for quantile losses and parametric distributions rather than being baked into each architecture, and the README also mentions interpretability methods for trend, seasonality and exogenous components. The dependency list is the honest description of the architecture: this is a torch training loop with a pandas front door.

Installing NeuralForecast and running NBEATS on AirPassengers

The README gives two installation routes, pip and conda-forge. Both install the full dependency set, including torch and ray, so expect a large environment. The pyproject file requires Python 3.10 or newer and lists torch>=2.9.1 and pytorch-lightning>=2.0.0,<2.6.0 as hard dependencies.

bash
pip install neuralforecast

The conda route is the alternative if you prefer conda-forge packages:

bash
conda install -c conda-forge neuralforecast

The README's minimal example uses the bundled AirPassengers dataframe, so you can run it without supplying your own data. It builds a NeuralForecast object with a single NBEATS model, an input_size of 24, a horizon h of 12 and max_steps of 100, sets freq to 'ME', then fits and predicts.

python
from neuralforecast import NeuralForecast
from neuralforecast.models import NBEATS
from neuralforecast.utils import AirPassengersDF

nf = NeuralForecast(
    models = [NBEATS(input_size=24, h=12, max_steps=100)],
    freq = 'ME'
)

nf.fit(df=AirPassengersDF)
nf.predict()

What you should see is a dataframe of twelve future points per series. One thing the README example does not dwell on: max_steps=100 is a toy setting for a demonstration, not a training budget. If you copy this snippet onto real data and get poor forecasts, the step count is the first thing to raise, before you conclude that the model is wrong for your problem.

Where NeuralForecast is the wrong tool

The heaviest constraint is the dependency tree. torch, pytorch-lightning, ray[train,tune], optuna, scipy and tornado all install by default, even if you only want to fit one small model once. The pyproject file does make pyspark, fugue and pyarrow optional under a spark extra, so that part is at least avoidable. But there is no lightweight extra that strips ray or optuna for users who never intend to tune. For a lambda function or a container with a size limit, that is a real problem, and it is the first thing to check before adopting.

The second constraint is data volume. Neural models here need enough history to fill input_size and enough series to learn from. The README's transfer learning section is explicitly aimed at predicting with little to no history, which is an acknowledgement that the standard training path needs history you may not have. If you have a single short series, a statistical model from StatsForecast will very likely match or beat a neural model at a fraction of the cost, and nothing in the README claims otherwise.

Third, the project classifies itself as Development Status :: 4 - Beta in pyproject.toml. That is a self-description, not a criticism, but it means API details can move between minor versions. The release history shows three releases in roughly two months, which is a fast cadence to keep up with if you pin loosely.

NeuralForecast versus Darts, and versus Nixtla's own StatsForecast

The most common comparison is with Darts. Both are Python libraries that put neural forecasting models behind a friendly API, but they differ in scope. Darts is a general time series library that also covers classical models, anomaly detection and preprocessing pipelines. NeuralForecast is narrower: it is a model collection plus a training harness, and it expects you to bring your own dataframe and your own evaluation. The practical difference is that NeuralForecast leans on the Nixtla ecosystem (utilsforecast, coreforecast, StatsForecast, MLForecast, HierarchicalForecast) for everything around the model, while Darts tries to keep that inside one package. If you want one dependency, that points one way. If you already use StatsForecast and want a consistent interface across statistical and neural models, it points the other.

The more interesting comparison is internal. Nixtla also maintains StatsForecast, and NeuralForecast shares its interface deliberately. The README's own framing, that neural methods often fail to beat statistical ones, is an argument for running both and letting the results decide. NeuralForecast is not positioned as a replacement for StatsForecast. It is positioned as the second thing you try.

Licence, maintenance and the cost of upgrading

NeuralForecast is Apache-2.0, and the repository ships a THIRD_PARTY_LICENSES.md file generated by a Makefile target that runs pip-licenses and a filtering script. That is a good sign for anyone shipping the library inside a product: the transitive licence inventory is maintained rather than left to the reader. Apache-2.0 is permissive and includes a patent grant. This is not legal advice; the point is only that the licence is permissive and the project tracks its own dependencies.

Maintenance is active. The last push was on 2026-09-09, and v3.2.2 was released on 2026-09-08, with v3.2.1 on 2026-08-04 and v3.2.0 on 2026-07-10. The repository is not archived. That cadence has a cost: pytorch-lightning is pinned to a range below 2.6.0, so a Lightning upgrade can block a NeuralForecast upgrade until Nixtla widens the pin. The Makefile shows a uv-based development environment (uv sync --all-extras --frozen), and a uv.lock is checked in, which suggests the maintainers test against a locked set. If you pin NeuralForecast, pin the lockfile equivalent in your own environment too.

Editorial conclusion

Adopt NeuralForecast if you already run PyTorch, have many related series with enough history, and want NHITS, NBEATSx, TFT or a long-horizon transformer behind one fit/predict call. Do not adopt it for a handful of short series, for edge deployment where a torch plus ray install is unacceptable, or as a first tool if you have not yet established a statistical baseline. Before committing, verify that your series length justifies the input_size you plan to set, check the installed torch and pytorch-lightning versions against the pinned ranges in pyproject.toml, and confirm the licence terms that apply to your own distribution.

Frequently asked questions

What is NeuralForecast?

It is a Python library from Nixtla that collects more than 30 neural forecasting models, from MLP and LSTM to NBEATS, NHITS, TFT and long-horizon transformers, behind a scikit-learn style fit and predict interface. The README describes it as favouring proven accurate and efficient models with a focus on usability.

Can NeuralForecast be used with LSTM models?

Yes. LSTM is one of the models listed in the README's model collection, alongside GRU, RNN and TCN. Models are imported from neuralforecast.models and passed as a list to the NeuralForecast constructor.

How does NeuralForecast compare with Darts?

Both put neural forecasting models behind a Python API, but NeuralForecast is narrower: it is a model collection and training harness that relies on the Nixtla ecosystem (utilsforecast, coreforecast, StatsForecast, MLForecast) for surrounding tooling, whereas Darts bundles classical models and preprocessing in one package. The README positions NeuralForecast's interface as unified with the other Nixtla libraries.

Official sources

  1. License: Apache-2.0
  2. Nixtla/neuralforecast on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/nixtla-neuralforecast.svg)](https://hysenlabs.com/projects/nixtla-neuralforecast)