ModelScope中,有人见过这个问题么The current model class (GPT2Model) is not compatible with .generate()
, as it doesn't have a language model head. Please use one of the following classes instead: {'GPT2LMHeadModel'}
这里text2text-generation您换成text-generation试一下。另外modelscope模型卡片上有docs链接,那里有推理代码,您可以参考一下。——此回答整理自钉群:魔搭ModelScope开发者联盟群 ①