本地运行LLM警告:UserWarning('do_sample is set to False. However, temperature is set to 0.9

UserWarning('do_sample is set to False. However, temperature is set to 0.9 -- this flag is only used in sample-based generation modes. You should set do_sample=True or unset temperature.'), UserWarning('do_sample is set to False. However, top_p is set to 0.6 -- this flag is only used in sample-based generation modes. You should set do_sample=True or unset top_p.')]

解决方法:删除LLM文件夹中的generation_config.json

This is because the generation config is outdated and is incompatible with the current version of transformers.
The solution is to delete the generation_config.json in the model_name_or_path folder.

posted @ 2024-11-05 16:36  ChantMyZeal  阅读(615)  评论(0)    收藏  举报