Facing RecursionError

#1
by mehedi07ticon - opened

When I tried to run this:

model_id = "OdiaGenAI/odiagenAI-bengali-base-model-v1"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=nf4_config
)
pipe = pipeline("text-generation",
model=model,
tokenizer=tokenizer,
max_new_tokens=512
)

I got this error:
RecursionError: maximum recursion depth exceeded while getting the str of an object

Can anyone help me to solve this issue?

Odia Generative AI org

@mehedi07ticon
Hi Guneet, this side I am sharing the the following to help you with your error.

model_4bit = AutoModelForCausalLM.from_pretrained( model_id, device_map="cuda:2",quantization_config=quantization_config)
tokenizer = AutoTokenizer.from_pretrained(model_id, unk_token="<unk>")

Sign up or log in to comment