Other
Transformers
Safetensors
t5
text2text-generation
time series
forecasting
pretrained models
foundation models
time series foundation models
time-series
text-generation-inference
Instructions to use shchuro/chronos-t5-tiny-deploy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shchuro/chronos-t5-tiny-deploy with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("shchuro/chronos-t5-tiny-deploy") model = AutoModelForSeq2SeqLM.from_pretrained("shchuro/chronos-t5-tiny-deploy", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 589 Bytes
eec04a3 762bca2 eec04a3 762bca2 eec04a3 762bca2 eec04a3 762bca2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from typing import Any, List, Dict
import torch
# from chronos import ChronosPipeline
class EndpointHandler:
def __init__(self, path: str = "") -> None:
# self.pipeline = ChronosPipeline.from_pretrained("amazon/chronos-t5-tiny")
pass
def __call__(self, data: Any) -> List[Dict[str, float]]:
inputs = data.pop("inputs")
# # parameters = data.pop("parameters", {"prediction_length"})
# forecast = self.pipeline.predict(
# torch.tensor(inputs["context"]), prediction_length=5
# )
return {"response": [1, 2, 3]}
|