Error in code "Transformers AutoModelForCausalLM"
#192
by
SaraAmd
- opened
when i run the sample code for "Transformers AutoModelForCausalLM" i get the error "
---> 18 input_ids = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt"
22 ).to(model.device)
24 terminators = [
25 tokenizer.eos_token_id,
26 tokenizer.convert_tokens_to_ids("<|eot_id|>")
27 ]
29 outputs = model.generate(
30 input_ids,
31 max_new_tokens=256,
(...)
35 top_p=0.9,
36 )
AttributeError: 'PreTrainedTokenizerFast' object has no attribute 'apply_chat_template'"