baichuan-inc / Baichuan2

A series of large language models developed by Baichuan Intelligent Technology
https://huggingface.co/baichuan-inc
Apache License 2.0
4.08k stars 293 forks source link

vllm加载模型生成的结果比较差,是什么原因 #279

Open xxSpencer opened 10 months ago

xxSpencer commented 10 months ago

根据官方文档:对 Baichuan 1 的推理优化迁移到 Baichuan

https://github.com/baichuan-inc/Baichuan2#%E5%AF%B9-baichuan-1-%E7%9A%84%E6%8E%A8%E7%90%86%E4%BC%98%E5%8C%96%E8%BF%81%E7%A7%BB%E5%88%B0-baichuan-2 将baichuan2-7B权重文件转化为baichuan1-7B,然后按照baichuan1加载model 用transformers加载的生成结果(图1)与vllm加载的生成结果(图2)差异较大 transformers生成的结果没问题,vllm生成结果较差 问题均为:"请问你是谁" vllm的SamplingParams( temperature=0.1, top_k=5, top_p=0.85, max_tokens=1024, stop=["."]) 图1 image 图2 20231117-154126