MiniCPM icon indicating copy to clipboard operation
MiniCPM copied to clipboard

[Bug]: Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.

Open soulteary opened this issue 1 year ago • 0 comments

Is there an existing issue ? / 是否已有相关的 issue ?

  • [X] I have searched, and there is no existing issue. / 我已经搜索过了,没有相关的 issue。

Describe the bug / 描述这个 bug

Annoying log alerts

To Reproduce / 如何复现

python demo/hf_based_demo.py --model_path=../models/OpenBMB/MiniCPM-2B-sft-fp32/
/usr/local/lib/python3.10/dist-packages/torch/_utils.py:836: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  return self.fget.__get__(instance, owner)()
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.

Expected behavior / 期望的结果

No response

Screenshots / 截图

No response

Environment / 环境

nvidia docker 24.01-py3

Additional context / 其他信息

refs: https://github.com/huggingface/transformers/blob/b880508440f43f80e35a78ccd2a32f3bde91cb23/src/transformers/generation_utils.py#L410-L414

soulteary avatar Feb 02 '24 06:02 soulteary