Go back

// tool

Timestral

Play
Transcript

[00:00] Okay, I’ve got this script ready to run in my terminal. And what it’s going to do when I run it, first it is going to download the latest, biggest version of Timestral, which is a time series foundation model from the French AI company Mistral. And then it’s going to operate on a data set I already pulled down from Hugging Face and do a little forecasting for us. So we’re going to run this. It’s going to go quick. There is our download. It’s already completed. And here’s our forecast. And what this thing says is everyone should enjoy the holidays because layoff season is going to be very rough in January and February.

[00:43] But the big deal about Mistral’s time series foundation model, Timestral, is that it beats larger models like Google’s Times FM3 and other ones outright. And it’s tiny. It’s so tiny and so architecturally efficient that it runs on a CPU. It does not require a GPU. Outside of that, I don’t really understand all the terminology. It gets into decoupled horizon forecasting and covariate aware attention and probabilistic quantile outputs. And I don’t really know what any of that means. But that didn’t stop me from wanting to mess around with this and putting together some examples I’m going to share with you now.

[01:28] So right off the bat, I had AI help me with a lot of this. Despite the fact that I’ve spent most of my career working with time series data, I don’t know Python. I don’t really know statistics terms. So here in our common, I’ve got a helper. It imports the Timestral forecaster from the Timestral package. And then we’ve got some error handling. And this is all it really takes. Let me zoom this in a bit. Pulling down the model. Forecast, we have our model input, which is the values I passed in. So that’s the context. And then model input equals values. And then the prediction length, which is the number of intervals we want it to use. And then we just return this forecast, which is our class, with a median, low, and high value using NumPy and kind of reshaping the values that we got.

[02:27] So if I jump over here to the layoffs forecast, which is that first script I ran, I’ve got a fetch data, a forecast, a forecast data, and a forecast report. And I’ll let you know they’re all laid out roughly the same. Fetch data is going to fetch any data required. This one in particular is going to fetch data from Hugging Face, APP Projects US Layoffs Monthly Time Series WARN Act, which is a list of WARN acts that occur if you’re in a state where you are required to be notified a certain amount of time before you’re laid off. So the numbers I showed you earlier are actually nowhere near as bad as it’s going to be. Anyways, then we have forecast data, which really just loads all that information and passes it off to the model in a properly formatted version. And then we have report, which is just going to format it for the terminal. And then forecast does the actual work, pull in whatever data, whatever variables we need. And then our main just, you know, does some basic error checking and then forecast report, print forecast. And that’s it, sends all the data over.

[03:41] So if we jump back over to that guy and rerun it, I’ve deleted my model. So it’s going to have to re-download that model. And here’s our data. We get a low, a high. So this is our 10% or 90% and our median. And this right here is the number of notifications. And if I come in here and change this guy to workers affected, we get that, I guess what they call variant of the data. So now we got actual numbers of people. And what I was mentioning earlier is December is actually, according to this model, lower than last December. But then January and February are awful. So let’s move on to something more fun.

[04:39] The second one I set up is a stock forecaster. And I’m just using the old Yahoo Finance API, which was reportedly shut down in 2017, but is still completely available. You don’t need a key or anything. But if you do download this repository, which I will have a link for in the description, your mileage may vary. So it just hits this endpoint and pulls down the data and then does this little forecasting bit on that. So we’ll run that guy. I think Tesla is TSLA. Cool. There we go. And you do see it did fetch files because this one is using the 28 megabyte, or sorry, 28 million parameter version. And we can see here, we’ve got our day of the week covariant. And we’ve got a low, a median, and a high. And in each of these cases, it’s not looking good, Elon. It’s not looking good.

[05:40] All right, the last one we’re going to take a look at is, and this is just for funsies, I have subscribers. I’m kind of like a YouTuber. So this data is the gained and lost and net of subscribers since this past April. April of 2026 up until today is the 21st. So a couple of days ago. Now, there is a fetch data in here, but that’s not going to work for you. But when I do put this in the repository, the CSV will be there. So if you want to run this, you can. So it’s going to use that CSV to forecast the next 14 days for me. So I’ll just run that guy. And it looks like, according to this, going on the median, I will cross 10,000 subscribers in two days, which is pretty dope. Now, what’s interesting, it is the 21st, and this says the median is 9955. But if I look at my actual data, I’m at 9853. So it’s a little bit off. It’s a reasonable prediction. But on the 21st, it is the low end hits it. And that’s fine. But the median is off. Either way, looks like it’s going to be a pretty good two weeks for me.

[07:14] At the end of the day, this is just another great example of open weights pulling their own weight. And while I don’t know a ton about time series models, I’m sure this is the first of many to come. Now, before we wrap up, I do want to point out that Mistral has released this under what is called a modified MIT license. And you can view that on Hugging Face. And if you are thinking about using this for commercial purposes, you definitely want to review that first.

Timestral is a family of time series foundation models developed by Mistral AI for multivariate probabilistic forecasting. The repository provides standalone inference support that runs on both CPU and GPU, requiring only PyTorch, NumPy, safetensors, and huggingface_hub. It supports past-only and known-future covariates, handles up to 32,768 steps of context, and outputs 21 quantiles per time step.

Details

URLhttps://github.com/mistralai/timestral
TypeLibrary
PricingFree
Open SourceYes
LicenseApache 2.0 (code), Modified MIT (weights)
Tech StackPython, PyTorch, NumPy, safetensors, huggingface_hub
PlatformsCPU, GPU
Self-HostedYes

Key Features

Best For

Data scientists and researchers needing accurate, probabilistic time series forecasting with support for multivariate data and complex covariates, particularly those requiring long-context windows or CPU-compatible inference.

Integrations

Hugging Face Hub

Notes

The code is licensed under Apache 2.0, while the model weights are distributed separately under a Modified MIT license. The repository does not accept pull requests; bug reports and questions should be submitted via GitHub issues. Inference requires Python 3.10+ and PyTorch 2.4+. Horizons longer than 1024 steps are forecast block by block, feeding the median back as context.


Share this post on:

Next
Desert Ant CLI