MOSS
MOSS copied to clipboard
出现问题 Setting `pad_token_id` to `eos_token_id`:106068 for open-end generation.
========实例配置========
核数:16
内存:127 GB
磁盘:49% 9.7G/20G
显卡:NVIDIA A100-SXM4-80GB, 1
输出内容:
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask
to obtain reliable results.
Setting pad_token_id
to eos_token_id
:106068 for open-end generation.
使用模型:moss-moon-003-sft,
命令启动:streamlit run moss_web_demo_streamlit.py --server.port 23421 输入命令后能正常启动加载模型,还有我的模型在本地,没有使用线上的模型
改为 使用示例 后还是出现上述问题
单卡部署(适用于A100/A800) 以下是一个简单的调用moss-moon-003-sft生成对话的示例代码,可在单张A100/A800或CPU运行,使用FP16精度时约占用30GB显存:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("fnlp/moss-moon-003-sft", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("fnlp/moss-moon-003-sft", trust_remote_code=True).half().cuda()
model = model.eval()
我是用多卡推理时也出现了这个问题