The models i this repository are based o the T5 architecture. The oly differece is i the vocabulary size: Chroos-T5 models use 4096 differet tokes, compared to 32128 of the origial T5 models, resultig i fewer parameters. To perform iferece with Chroos models, istall the package i the GitHub compaio repo by ruig: A miimal example showig how to perform iferece usig Chroos models: If you fid Chroos models useful for your research, please cosider citig the associated paper: See CONTRIBUTING for more iformatio. This project is licesed uder the Apache-2.0 Licese.Architecture
Model
Parameters
Based o
8M
t5-efficiet-tiy
20M
t5-efficiet-mii
46M
t5-efficiet-small
200M
t5-efficiet-base
710M
t5-efficiet-large
Usage
pip istall git+https://github.com/amazo-sciece/chroos-forecastig.git
import matplotlib.pyplot as plt
import umpy as p
import padas as pd
import torch
from chroos import ChroosPipelie
pipelie = ChroosPipelie.from_pretraied(
"amazo/chroos-t5-mii",
device_map="cuda",
torch_dtype=torch.bfloat16,
)
df = pd.read_csv("https://raw.githubusercotet.com/AileeNielse/TimeSeriesAalysisWithPytho/master/data/AirPassegers.csv")
# cotext must be either a 1D tesor, a list of 1D tesors,
# or a left-padded 2D tesor with batch as the first dimesio
cotext = torch.tesor(df["#Passegers"])
predictio_legth = 12
forecast = pipelie.predict(cotext, predictio_legth) # shape [um_series, um_samples, predictio_legth]
# visualize the forecast
forecast_idex = rage(le(df), le(df) + predictio_legth)
low, media, high = p.quatile(forecast[0].umpy(), [0.1, 0.5, 0.9], axis=0)
plt.figure(figsize=(8, 4))
plt.plot(df["#Passegers"], color="royalblue", label="historical data")
plt.plot(forecast_idex, media, color="tomato", label="media forecast")
plt.fill_betwee(forecast_idex, low, high, color="tomato", alpha=0.3, label="80% predictio iterval")
plt.leged()
plt.grid()
plt.show()
Citatio
@article{asari2024chroos,
author = {Asari, Abdul Fatir ad Stella, Lorezo ad Turkme, Caer ad Zhag, Xiyua, ad Mercado, Pedro ad She, Huibi ad Shchur, Oleksadr ad Ragapuram, Syama Sydar ad Pieda Arago, Sebastia ad Kapoor, Shubham ad Zschieger, Jasper ad Maddix, Daielle C. ad Mahoey, Michael W. ad Torkkola, Kari ad Gordo Wilso, Adrew ad Bohlke-Scheider, Michael ad Wag, Yuyag},
title = {Chroos: Learig the Laguage of Time Series},
joural = {arXiv preprit arXiv:2403.07815},
year = {2024}
}
Security
Licese
点击空白处退出提示
评论