ymcui / Chinese-LLaMA-Alpaca-2

中文LLaMA-2 & Alpaca-2大模型二期项目 + 64K超长上下文模型 (Chinese LLaMA-2 & Alpaca-2 LLMs with 64K long context models)
Apache License 2.0
7k stars 570 forks source link

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

Closed Cbphcr closed 2 months ago

Cbphcr commented 2 months ago

提交前必须检查以下项目

问题类型

模型推理

基础模型

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
github-actions[bot] commented 2 months ago

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.

github-actions[bot] commented 2 months ago

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