ltp icon indicating copy to clipboard operation
ltp copied to clipboard

下载模型后报错报错

Open liyanfu520 opened this issue 2 years ago • 1 comments

加载LTP分词模型

from ltp import LTP
# print(torch.cuda.is_available())
ltp = LTP( "LTP/base2")
if torch.cuda.is_available():
    ltp.cuda()
    ltp.to("cuda")

报错 RuntimeError: C:\Users\joint.cache\huggingface\hub\models--LTP--base2\snapshots\70c57011dab606d130c4027705fa155118ca396f\pytorch_model.bin is a zip archive (did you mean to use torch.jit.load()?)

liyanfu520 avatar Jan 16 '23 07:01 liyanfu520

torch 版本太低了,最低需要1.6

AlongWY avatar Jan 17 '23 10:01 AlongWY