Andrea Veritas
Andrea Veritas
Hi koush, I tried to fix #437, tested on serval phones with android 5.0.x and it turns out to be fine. Please try and verify. If it really works, please...
*提示:将[ ]中填入x,表示打对钩。提问时删除这行。只保留符合的选项。* ### 详细描述问题 *请尽量具体地描述您遇到的问题,**必要时给出运行命令**。这将有助于我们更快速地定位问题所在。* ### 运行截图或日志 *请提供文本log或者运行截图,以便我们更好地了解问题详情。* ### 必查项目(前三项只保留你要问的) - [ ] **基础模型**:Alpaca-Plus - [ ] **运行系统** Linux - [ ] **问题分类**:模型训练与精调 - [x] (必选)由于相关依赖频繁更新,请确保按照[Wiki](https://github.com/ymcui/Chinese-LLaMA-Alpaca/wiki)中的相关步骤执行 - [x] (必选)我已阅读[FAQ章节](https://github.com/ymcui/Chinese-LLaMA-Alpaca/wiki/常见问题)并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案 您好,最近在研究这个项目,并已经做了PT和SFT方面的试验。已经能够学习到新的知识和问答指令,现在有一些更深入的问题,想学习一下。望不吝赐教,深表感谢!...
参考了 #49 中的提示进行词表扩充,但在训练时候过了若干step以后loss就直接变0了。具体操作步骤: 1. 用tokenizer.add_tokens添加新词,然后save_pretrained,得到新词表的大小为NEW_VOCAB_SIZE 2. 替换原模型`config.json`中的vocab_size为NEW_VOCAB_SIZE 3. 替换原模型的`tokenizer.model`和`tokenizer_config.json` 4. 替换lm_head.weights ```python model = torch.load(MODEL_DIR,"pytorch_model-00003-of-00003.bin") lm_head_w = model['lm_head.weight'] # HIDDEN_SIZE = 5120 new_lm_head_w = torch.zeros([NEW_VOCAB_SIZE, HIDDEN_SIZE]) new_lm_head_w[:NEW_VOCAB_SIZE] = lm_head_w model['lm_head.weight']...