index out of range in self
#8
by
Sssma
- opened
Hi I successfully used the code below to load the model in sagemaker studio.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("amazon/chronos-t5-large")
model = AutoModelForSeq2SeqLM.from_pretrained("amazon/chronos-t5-large")
Next, I attempted to perform model inference using the following code:
input_text = "100,200,150,300"
inputs=tokenizer(input_text, return_tensors ="pt", padding=True, truncation=True)
outputs = model.generate(**inputs)
However, I encountered the following error: index out of range in self. Could anyone provide guidance on how to resolve this issue?
In addition, I want to do time series prediction on sales data. How to do model inference using tokenizer?
Thank you!