-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
ENVEnvironment/Dependency related questions.Environment/Dependency related questions.
Description
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("./deepseek-coder-1.3b-instruct", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("./deepseek-coder-1.3b-instruct", trust_remote_code=True).cuda()
messages=[
... { 'role': 'user', 'content': "write a quick sort algorithm in python."}
... ]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'LlamaTokenizerFast' object has no attribute 'apply_chat_template'
Metadata
Metadata
Assignees
Labels
ENVEnvironment/Dependency related questions.Environment/Dependency related questions.