有人试过在魔塔的CPU镜像里面跑ChatGLM-6B-Int4模型吗, 我跑的时候有如图所示报错

Image 1.png

展开
收起
2m3ncdidzw6hi 2023-10-11 18:40:14 251 分享 版权
1 条回答
写回答
取消 提交回答
  • 补充下我使用的代码:

    from modelscope.utils.constant import Tasks
    from modelscope.pipelines import pipeline
    pipe = pipeline(task=Tasks.chat, model='/home/model/hub/ZhipuAI/ChatGLM-6B-Int4',devices='cpu')
    inputs = {'text':'你好', 'history': []}
    result = pipe(inputs)
    inputs = {'text':'介绍下清华大学', 'history': result['history']}
    result = pipe(inputs)
    print(result)
    

    使用的modelscope镜像
    Image 2.png

    2023-10-11 18:46:33
    赞同 1 展开评论

包含命名实体识别、文本分类、分词、关系抽取、问答、推理、文本摘要、情感分析、机器翻译等多个领域

热门讨论

热门文章

还有其他疑问?
咨询AI助理