llamaindex整合modelscope本地模型,启动报错

Traceback (most recent call last):
  File "E:\soft\anaconda3\envs\qwen1\lib\site-packages\modelscope\utils\registry.py", line 211, in build_from_cfg
    return obj_cls(**args)
  File "E:\soft\anaconda3\envs\qwen1\lib\site-packages\modelscope\pipelines\nlp\llm_pipeline.py", line 190, in __init__
    self._init_swift(kwargs['model'], kwargs.get('device', 'gpu'))
  File "E:\soft\anaconda3\envs\qwen1\lib\site-packages\modelscope\pipelines\nlp\llm_pipeline.py", line 219, in _init_swift
    from swift.llm.utils import MODEL_MAPPING, InferArguments
ImportError: cannot import name 'MODEL_MAPPING' from 'swift.llm.utils' (E:\soft\anaconda3\envs\qwen1\lib\site-packages\swift\llm\utils.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "e:\work\AI\qwen1\main.py", line 4, in <module>
    llm = ModelScopeLLM(model_name="Qwen/Qwen2.5-1.5B-Instruct", model_revision="master")
  File "E:\soft\anaconda3\envs\qwen1\lib\site-packages\llama_index\llms\modelscope\base.py", line 133, in __init__
    pipeline = pipeline_builder(
  File "E:\soft\anaconda3\envs\qwen1\lib\site-packages\modelscope\pipelines\builder.py", line 180, in pipeline
    return build_pipeline(cfg, task_name=task)
  File "E:\soft\anaconda3\envs\qwen1\lib\site-packages\modelscope\pipelines\builder.py", line 65, in build_pipeline
    return build_from_cfg(
  File "E:\soft\anaconda3\envs\qwen1\lib\site-packages\modelscope\utils\registry.py", line 214, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
ImportError: LLMPipeline: cannot import name 'MODEL_MAPPING' from 'swift.llm.utils' (E:\soft\anaconda3\envs\qwen1\lib\site-packages\swift\llm\utils.py)

环境安装根据llamaindex官网与modelscope安装的,我现在还需要安装什么环境吗?

展开
收起
1809979304209485 2025-01-06 11:33:10 341 发布于广东 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 您好,关于llamaindex整合ModelScope本地模型时启动报错的问题,建议您咨询一下阿里云的工作人员以获取更专业的帮助。如果有帮助,请帮忙采纳一下,谢谢。

    2025-02-09 16:44:41 举报
    赞同 190 评论

    评论

    全部评论 (0)

    登录后可评论

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

热门讨论

热门文章

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