Error when running chatglm3_6b: NotImplementedError: Unknown device for graph fuser #1477
Open
2 of 4 tasks
Labels
bug
Something isn't working
System Info
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
import os
import platform
import torch
from transformers import AutoTokenizer, AutoModel
import habana_frameworks.torch.core as htcore
MODEL_PATH = os.environ.get('MODEL_PATH', '/data/chatglm3-6b')
TOKENIZER_PATH = os.environ.get("TOKENIZER_PATH", MODEL_PATH)
tokenizer = AutoTokenizer.from_pretrained(TOKENIZER_PATH, trust_remote_code=True)
model = AutoModel.from_pretrained(MODEL_PATH, trust_remote_code=True).eval()
model = model.to("hpu")
response, history = model.chat(tokenizer, "你好", history=[])
htcore.mark_step()
print(response)
response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history)
htcore.mark_step()
print(response)
Expected behavior
Successfully able to perform inference on the model.
The text was updated successfully, but these errors were encountered: