Patch Time Series Transformer in Hugging Face

📰 Hugging Face Blog

Hugging Face introduces Patch Time Series Transformer for time series forecasting

intermediate Published 1 Feb 2024
Action Steps
  1. Install the PatchTST library
  2. Load and prepare a time series dataset
  3. Configure the PatchTST model
  4. Train the model for forecasting
Who Needs to Know This

Data scientists and machine learning engineers can benefit from this new model for improving forecasting accuracy in their projects

Key Insight

💡 PatchTST is a new model for time series forecasting that can be used for various applications

Share This
📈 Improve time series forecasting with PatchTST

Key Takeaways

Hugging Face introduces Patch Time Series Transformer for time series forecasting

Full Article

Published Time: 2024-02-01T00:00:00.330Z

# Patch Time Series Transformer in Hugging Face

[![Image 1: Hugging Face's logo](https://huggingface.co/front/assets/huggingface_logo-noborder.svg)Hugging Face](https://huggingface.co/)

* [Models](https://huggingface.co/models)
* [Datasets](https://huggingface.co/datasets)
* [Spaces](https://huggingface.co/spaces)
* [Buckets new](https://huggingface.co/storage)
* [Docs](https://huggingface.co/docs)
* [Enterprise](https://huggingface.co/enterprise)
* [Pricing](https://huggingface.co/pricing)
*
*
* * *

* [Log In](https://huggingface.co/login)
* [Sign Up](https://huggingface.co/join)

[Back to Articles](https://huggingface.co/blog)

# [](https://huggingface.co/blog/patchtst#patch-time-series-transformer-in-hugging-face---getting-started) Patch Time Series Transformer in Hugging Face - Getting Started

Published February 1, 2024

[Update on GitHub](https://github.com/huggingface/blog/blob/main/patchtst.md)

[- [x] Upvote 14](https://huggingface.co/login?next=%2Fblog%2Fpatchtst)
* [![Image 2](https://cdn-avatars.huggingface.co/v1/production/uploads/1591565751512-noauth.jpeg)](https://huggingface.co/mineshj1291 "mineshj1291")
* [![Image 3](https://huggingface.co/avatars/0618b34fccffd043b85ea13bb4097056.svg)](https://huggingface.co/monoloco42 "monoloco42")
* [![Image 4](https://huggingface.co/avatars/a17e03d87bdfc5ea91d868729b539dc5.svg)](https://huggingface.co/TheSilentOne "TheSilentOne")
* [![Image 5](https://huggingface.co/avatars/f9cc86a7d2bbd4bc73815efa414fecf8.svg)](https://huggingface.co/georgeaustralia "georgeaustralia")
* [![Image 6](https://huggingface.co/avatars/86194456844c7b2b5389de36cb258472.svg)](https://huggingface.co/RichardForests "RichardForests")
* [![Image 7](https://huggingface.co/avatars/2db8386b4e84f89ab11bdb8b26ecdb74.svg)](https://huggingface.co/cvel94 "cvel94")
* +8

[![Image 8: Nam Nguyen's avatar](https://huggingface.co/avatars/63cebb0eb33c147567962963889ce928.svg)](https://huggingface.co/namctin)

[Nam Nguyen namctin Follow](https://huggingface.co/namctin)

guest

[![Image 9: Wesley M. Gifford's avatar](https://huggingface.co/avatars/8833ff37c5ccc477f1593cd8ad5a1208.svg)](https://huggingface.co/wmgifford)

[Wesley M. Gifford wmgifford Follow](https://huggingface.co/wmgifford)

guest

[![Image 10: Arindam Jati's avatar](https://huggingface.co/avatars/910e7b583672613ce3c9042eec947c0b.svg)](https://huggingface.co/ajati)

[Arindam Jati ajati Follow](https://huggingface.co/ajati)

guest

[![Image 11: Vijay Ekambaram's avatar](https://huggingface.co/avatars/18330ad9834f1ff7eec3c7f545e94e6b.svg)](https://huggingface.co/vijaye12)

[Vijay Ekambaram vijaye12 Follow](https://huggingface.co/vijaye12)

guest

[![Image 12: Kashif Rasul's avatar](https://cdn-avatars.huggingface.co/v1/production/uploads/1669189789447-629f3b18ee05727ce328ccbe.jpeg)](https://huggingface.co/kashif)

[Kashif Rasul kashif Follow](https://huggingface.co/kashif)

[![Image 13: Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/patch_tst.ipynb)

* [Quick overview of PatchTST](https://huggingface.co/blog/patchtst#quick-overview-of-patchtst "Quick overview of PatchTST")

* [Installation](https://huggingface.co/blog/patchtst#installation "Installation")

* [Part 1: Forecasting on the Electricity dataset](https://huggingface.co/blog/patchtst#part-1-forecasting-on-the-electricity-dataset "Part 1: Forecasting on the Electricity dataset")
* [Set seed](https://huggingface.co/blog/patchtst#set-seed "Set seed")

* [Load and prepare datasets](https://huggingface.co/blog/patchtst#load-and-prepare-datasets "Load and prepare datasets")

* [Configure the PatchTST model](https://huggingface.co/blog/patchtst#configure-the-patchtst-model "Configure the PatchTST model")

* [Train model](https://huggingface.co/blog/patchtst#train-model "Train model")
Read full article → ← Back to Reads

Related Videos

5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
10-Phase Generative AI Roadmap 2026 | LLMs & AI Agents | #shorts
10-Phase Generative AI Roadmap 2026 | LLMs & AI Agents | #shorts
SCALER
How LLMs Use Tools | Tool Binding & Tool Calling in LangChain Explained | @SCALER
How LLMs Use Tools | Tool Binding & Tool Calling in LangChain Explained | @SCALER
SCALER
8-Phase NLP Roadmap 2026 | AI & Machine Learning | #shorts
8-Phase NLP Roadmap 2026 | AI & Machine Learning | #shorts
SCALER
Adaptive-Compute LLMs: MIT's New AI Breakthrough #ai #coding #machinelearning #AIresearch
Adaptive-Compute LLMs: MIT's New AI Breakthrough #ai #coding #machinelearning #AIresearch
Ascent
How OpenAI's Sora Works #ai #openai #sora #sora2 #machinelearning #generativeai #genai #ml
How OpenAI's Sora Works #ai #openai #sora #sora2 #machinelearning #generativeai #genai #ml
Ascent