datawhalechina / self-llm

《开源大模型食用指南》基于Linux环境快速部署开源大模型,更适合中国宝宝的部署教程
Apache License 2.0
6.51k stars 798 forks source link

Llama3 web_demo&lora #92

Closed Hongru0306 closed 2 months ago

Hongru0306 commented 2 months ago
  1. 第一个修的web_demo在prompt构建处,我发现用原始的tokenizer.apply_chat_template会在问询最后有assistant的起始token,如下图:
    38e9bd96afdc091bc8f5357547c0d8f
    故修改
  2. lora微调后推理部分,原ipynb文件会输出一长串,附加指定eos_token能够防止此类现象的发生。
    336e1ede313b983b982d02ad40d5e2c a01305b515ad4a54c9ed26de967cc1c 后面为了跟前面web一致,我再次更新了部分generate部分的参数。