HuanLiuNLP
HuanLiuNLP
我这边也遇到了这个问题 确认下训练后保存的tokenizer_config.json,"chat_template"是否和原始模型一致(末尾要拼上'assistant\n\n)
> > 我这边也遇到了这个问题 确认下训练后保存的tokenizer_config.json,"chat_template"是否和原始模型一致(末尾要拼上'assistant\n\n) > > This is the actual problem i think. because the finetune config doesn't have 'assistant\n\n)at the end. adding it manually atleast solves the empty response...
看了下代码,这块的 chat template 应该就是导致推理异常的原因。 minicpm-v 原始模型配置里的 chat template 是推理时候用的,最后拼上了assistant,没问题。 但是在微调的时候,在 finetune.py 里用不带 assitant的覆盖了(训练的时候确实不应该带),所以最后保存的配置也变成了不带 assistant。 这样推理的时候和训练是不一致的