多卡跑tok模型的解码报错

多卡跑tok模型的解码报错:RuntimeError: Input tensor at index 1 has invalid shape [8, 6077], but expected [8, 23030]。
代码如下:
import hanlp

Hanlp = hanlp.load(hanlp.pretrained.tok.COARSE_ELECTRA_MALL_ZH, devices=[0, 1, 2, 3])

sents =

filename = “data/dev.txt”

with open(filename, “r”, encoding=“utf-8”) as file:
for line in file.readlines():
if len(line.strip()) > 0:
sents.append(line)

file.close()

doc_tok = Hanlp(sents)

print(“finished …”)
具体报错信息如下:
Traceback (most recent call last):
File “prepare_to_tok.py”, line 15, in
doc_tok = Hanlp(sents)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/autograd/grad_mode.py”, line 27, in decorate_context
return func(*args, **kwargs)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/hanlp/common/torch_component.py”, line 638, in call
return super().call (*args, **merge_dict(self.config, overwrite=True, **kwargs))
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/hanlp/common/component.py”, line 36, in call
return self.predict(*args, **kwargs)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/hanlp/components/taggers/tagger.py”, line 151, in predict
outputs = self.predict_data(tokens, batch_size, **kwargs)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/hanlp/components/taggers/tagger.py”, line 169, in predict_data
out, mask = self.feed_batch(batch)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/hanlp/components/tokenizers/transformer.py”, line 298, in feed_batch
x, mask = super().feed_batch(batch)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/hanlp/components/taggers/transformers/transformer_tagger.py”, line 262, in feed_batch
batch=batch)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 889, in _call_impl
result = self.forward(*input, **kwargs)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py”, line 168, in forward
return self.gather(outputs, self.output_device)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py”, line 180, in gather
return gather(outputs, output_device, dim=self.dim)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py”, line 76, in gather
res = gather_map(outputs)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py”, line 71, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py”, line 63, in gather_map
return Gather.apply(target_device, dim, *outputs)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/parallel/_functions.py”, line 72, in forward
return comm.gather(inputs, ctx.dim, ctx.target_device)
File “/cephfs/linlei/work/anaconda3/envs/bert_further_pretrain/lib/python3.7/site-packages/torch/nn/parallel/comm.py”, line 235, in gather
return torch._C._gather(tensors, dim, destination)
RuntimeError: Input tensor at index 1 has invalid shape [8, 6077], but expected [8, 23030]
版本如下:
python 3.7
hanlp 2.1.0b39
有人知道是怎么回事吗?