Closed clclclaiggg closed 10 months ago
不清楚你用的什么脚本和命令,看起来是embedding没有resize。
合并词表以后还要 model.resize_token_embeddings(new_length)
吧,不然 embedding 层对不上,可以 print model 看看
谢谢,我改过了
合并词表以后还要
model.resize_token_embeddings(new_length)
吧,不然 embedding 层对不上,可以 print model 看看
谢谢,我找到问题就是这个
合并词表以后还要
model.resize_token_embeddings(new_length)
吧,否则嵌入层对不上,可以打印模型看看 请问我改了以后,,训练保存得模型依然是32000而不是更新之后的新层数,请问这是什么情况呀
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.
Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.
提交前必须检查以下项目
问题类型
None
基础模型
None
操作系统
None
详细描述问题
你好,我使用llama2的词表为32000,扩充后自己的词表为49013,但是微调的时候报错ValueError: Trying to set a tensor of shape torch.Size([32000, 4096]) in "weight" (which has shape torch.Size([49013, 4096])), this look incorrect. 请问这个怎么解决
依赖情况(代码类问题务必提供)
No response
运行日志或截图
No response