ymcui/Chinese-LLaMA-Alpaca-2

使用transformer命令行进行交互时推理报错

Cbphcr opened this issue · 2 comments

提交前必须检查以下项目

  • 请确保使用的是仓库最新代码(git pull),一些问题已被解决和修复。
  • 我已阅读项目文档FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案。
  • 第三方插件问题:例如llama.cppLangChaintext-generation-webui等,同时建议到对应的项目中查找解决方案。

问题类型

模型推理

基础模型

Chinese-LLaMA-2 (7B/13B)

操作系统

Linux

详细描述问题

python scripts/inference/inference_hf.py     --base_model ~/chinese-llama-2-7b-hf     --with_prompt     --interactive

依赖情况(代码类问题务必提供)

peft                      0.10.0
sentence-transformers     2.6.1
sentencepiece             0.2.0
torch                     2.2.2+cu118
torchaudio                2.2.2+cu118
torchvision               0.17.2+cu118
transformers              4.39.3

运行日志或截图

if seq_len > self.max_seq_len_cached:
RuntimeError: Boolean value of Tensor with more than one value is ambiguous

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.

Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.