已关闭
bge-m3 推理脚本 IndexError 报错 #946
zhoutiezhu创建于 2025年12月15日关闭于 2025年12月29日
2025年12月15日 修改了issue 的描述
All_Fun
2025年12月16日 评论:
2025年12月16日 评论:
用昇腾镜像mis-tei:https://www.hiascend.com/developer/ascendhub/detail/07a016975cc341f3a5ae131f2b52399d
可通过 docker run 直接启动或手动进容器执行 bash start.sh 拉起服务(挂载本地模型目录,指定 910B 设备 ID 和端口),最后用 curl 127.0.0.1:8080/embed 发送 POST 请求验证即可


zhoutiezhu
2025年12月16日 评论:
2025年12月16日 评论:
已解决,多谢~~


2025年12月16日 issue类型由 Bug-Report 改变为 缺陷
bge-m3 推理脚本 IndexError 报错
Describe the current behavior / 问题描述
按照 ModelZoo-PyTorch 仓中 bge-m3 模型 README 文档的步骤完成源码下载、模型权重准备、依赖安装后,在 Ascend 910B 设备上执行推理脚本 infer.py 时触发 IndexError: list index out of range 异常,导致模型推理流程中断,无法正常输出 embedding 向量。
Environment / 环境信息
git clone https://huggingface.co/BAAI/bge-m3+git reset --hard 5617a9f下载Steps to reproduce the issue / 重现步骤
git clone https://gitee.com/ascend/ModelZoo-PyTorch.git cd ModelZoo-PyTorch/ACL_PyTorch/built-in/embedding/bge-m3git clone https://huggingface.co/BAAI/bge-m3 cd bge-m3 git reset --hard 5617a9f cd ..pip3 install FlagEmbedding transformers==4.51.1 # 其他基础依赖已参考 requirements.txt 补充安装export ASCEND_RT_VISIBLE_DEVICES=0 python3 infer.py # 也尝试过指定 --model_path=bge-m3,报错一致Describe the expected behavior / 预期结果
推理脚本能够正常执行,加载模型权重后对测试语句完成 embedding 编码,输出 dense/sparse/colbert 等向量结果,无报错中断。
Related log / screenshot / 日志 / 截图
关键报错堆栈信息:
Special notes for this issue/备注