chronos-t5-mini

我要开发同款
匿名用户2024年07月31日
55阅读

技术信息

开源地址
https://modelscope.cn/models/AI-ModelScope/chronos-t5-mini
授权协议
apache-2.0

作品详情

Architecture

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.

Model Parameters Based o
chroos-t5-tiy 8M t5-efficiet-tiy
chroos-t5-mii 20M t5-efficiet-mii
chroos-t5-small 46M t5-efficiet-small
chroos-t5-base 200M t5-efficiet-base
chroos-t5-large 710M t5-efficiet-large

Usage

To perform iferece with Chroos models, istall the package i the GitHub compaio repo by ruig:

pip istall git+https://github.com/amazo-sciece/chroos-forecastig.git

A miimal example showig how to perform iferece usig Chroos models:

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

If you fid Chroos models useful for your research, please cosider citig the associated paper:

@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

See CONTRIBUTING for more iformatio.

Licese

This project is licesed uder the Apache-2.0 Licese.

功能介绍

Architecture The models in this repository are based on the T5 architecture. The only difference is

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论