在ModelScope中有没有同学在运行分布式GPT时遇到这个问题?
from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks if name == 'main': input = '程序员脱发用什么洗发水' model_id = 'damo/nlp_gpt3_text-generation_2.7B' pipe = pipeline(Tasks.text_generation, model=model_id)
print(pipe(input))
from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks if name == 'main': input = '程序员脱发用什么洗发水' model_id = 'damo/nlp_gpt3_text-generation_2.7B' pipe = pipeline(Tasks.text_generation, model=model_id)
print(pipe(input))
你好,我加了if name == 'main': 之后就不报错了,此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”