Downloads · 30 days
31
40% of all-time downloads
oxfrug/chronos-2-int8-torchao
chronos-2-int8-torchao is a time series forecasting model from oxfrug. Use it for the time series forecasting task on the model card, and read the license before you ship it in a product. It is set up for chronos-forecasting. The card lists the license as apache-2.0.
Chronos-2 is Amazon's 120M time-series model: you give it history, it forecasts the next hours/days, no extra training.
Downloads · 30 days
31
40% of all-time downloads
All-time downloads
77
Public
Parameters
120M
131 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors131 MB · 100%
How the weights are stored.
I8116M · 97%
From the Hugging Face model README
Chronos-2 is Amazon's 120M time-series model: you give it history, it forecasts the next hours/days, no extra training.
This repo is the same model with smaller files. Weights are stored as 8-bit integers (INT8). It is not a fine-tune and not a new architecture.
| Amazon original | this repo | |
|---|---|---|
| download | 478 MB | 131 MB |
| GPU memory while running (3090, one series) | ~0.56 GB | ~0.25 GB |
| Python API | Chronos2Pipeline.from_pretrained | load.py (this repo) |
| license | Apache-2.0 | Apache-2.0 |
Pick this if you want Chronos-2 in Python, but a lighter download and less VRAM.
Pick amazon/chronos-2 if you want the one-liner load and do not care about 350 MB.
Pick an ONNX / TensorRT Chronos-2 if you only care about production latency. Those are a different runtime, not this Python path.
pip install "chronos-forecasting>=2.0" torchao safetensors huggingface_hub pandas pyarrow
GPU: a recent PyTorch with CUDA. CPU works; it will be slower.
Hugging Face's usual from_pretrained cannot read these INT8 files. Use load.py from this repo:
from pathlib import Path
import importlib.util
from huggingface_hub import snapshot_download
repo = snapshot_download("oxfrug/chronos-2-int8-torchao")
spec = importlib.util.spec_from_file_location("c2int8", Path(repo) / "load.py")
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
pipe = mod.load(repo, device="cuda") # "cpu" if you have no GPU
If you already cloned the folder:
from load import load
pipe = load("/path/to/chronos-2-int8-torchao", device="cuda")
You get a normal Chronos2Pipeline. After this, Amazon's docs apply.
One numpy series:
import numpy as np
history = np.array([12.0, 12.4, 11.9, ...], dtype=np.float32) # oldest → newest
quantiles, mean = pipe.predict_quantiles(
inputs=[history],
prediction_length=24,
quantile_levels=[0.1, 0.5, 0.9],
)
# median forecast: quantiles[0][:, 1] (shape: 1 × horizon × 3)
Many series / covariates — same as upstream, with pipe.predict_df(...).
INT8 here is smaller, not faster, on an RTX 3090. The model is small; most of the time is starting GPU kernels, not moving weights.
Two switches help both this INT8 and the original FP32 model:
torch.compile — fuse those kernels. First call is slow (compile); later calls drop a lot.import torch
from fast_infer import speedup # file in this repo
torch.set_float32_matmul_precision("high")
pipe = speedup(pipe) # TF32 + torch.compile
Or from a terminal, after downloading this folder:
python fast_infer.py # this INT8
python fast_infer.py --fp32 amazon/chronos-2 # original model, same knobs
Timed on this machine (RTX 3090, 512 past points, forecast 24, one series):
| time per call | notes | |
|---|---|---|
| original FP32 | ~7 ms | no extra knobs |
| this INT8 | ~9 ms | smaller, slightly slower |
| FP32 + compile + TF32 | ~3 ms | best speed here |
| INT8 + compile + TF32 | ~3.6 ms | still a bit behind compiled FP32 |
Forecasting many series in one call (predict_df with several ids) is the other real win. Amazon's “hundreds of series per second” numbers are batched, not one sine wave.
Half-precision (FP16 / BF16) did not help this 120M model on a 3090.
This pack only compresses weights.
What i did: take a few public series, hide the last 12–168 points, forecast them with the original model and with this INT8, compare.
P10–P90 intervals: on 12–24 step holds, both models often cover ~50–60% of points instead of 80%. Compare INT8 to the original on your series if you use the bands, not to the textbook 80%.
Raw dumps: eval/series.json, eval/coverage.json, eval/speed.json.
amazon/chronos-2 (full float weights).That is why from_pretrained fails: Hugging Face does not know this packing. load.py rebuilds the layers and fills them from model.safetensors.
Ansari et al., Chronos-2: From Univariate to Universal Forecasting, 2025.
https://arxiv.org/abs/2510.15821
Quant pack by oxfrug. """