TypeError: transformers..generate() argument after ** must be a mapping, not Tensor
#50
by
mubingjian
- opened
项目首页trans实例代码测试,报错
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Keyword arguments {'return_dict': True} not recognized.
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 16.85it/s]
Traceback (most recent call last):
File "/root/siton-tmp/glm/testModel2.py", line 27, in
outputs = model.generate(**inputs, **gen_kwargs)
TypeError: transformers.generation.utils.GenerationMixin.generate() argument after ** must be a mapping, not Tensor
请大师给指条明路?多谢
问题解决,是transformers版本太低了,升级到最新版本解决
mubingjian
changed discussion status to
closed