NLP

Results 16 comments of NLP

class Xls(BaseStrategy): """ 通过将 Grid 另存为 xls 文件再读取的方式获取 grid 内容 """ def __init__(self, tmp_folder: Optional[str] = None): """ :param tmp_folder: 用于保持临时文件的文件夹 """ super().__init__() self.tmp_folder = tmp_folder def get(self, control_id: int)...

Tesseract 使用参考这两文章https://blog.csdn.net/u010454030/article/details/80515501 和 https://blog.csdn.net/wang_hugh/article/details/80760940

> 不是 大小是正常的 7B和33B的我都试过 我发现腾讯的框架除了rotary_emb.inv_freq以外的权重都会保存 看上去是因为这个inv_freq不是一个可学习的参数,可以自己计算,所以不存进去state_dict()(可能了省点模型保存的内存) 我的解决方案是把这个inv_freq使用pytorch的register注册进模型的state_dict()里面,这样模型保存的参数里面就有state_dict()了。但这样会导致deepspeed使用zero_to_fp32时不把inv_freq写进bin文件(因为inv_freq没有可学习的参数,deepspeed会把他当作buff不存进去 所以需要改一下zero_to_fp32文件 让deepspeed正确保存这个参数) 请问怎么修改zero_to_fp32文件 让deepspeed正确保存这个参数

需要8张A100,可以参考这个,int8也可以精调了 https://github.com/yangzhipeng1108/moss-finetune-and-moss-finetune-int8

deepspeed_config: zero_stage: 3 moss的配置是deepspeed stage3 模型是分开加载到跟个模型,我使用1batch_size,8卡的瞬时基本每张卡都到70G显存以上了,官网没有开源,我改好,目前int8可以finetune

只要8张A100或者A800就能官方的实现finetune,官方finetune后16B的半精度推理速度太慢才考虑8int,我的项目里8int可以finetune

moss 没法把custom_autotune加载到/root/.cache/huggingface/modules/transformers_modules/local/ 下面,你手动把custom_autotune复制到/root/.cache/huggingface/modules/transformers_modules/local/即可

> > deepspeed_config: zero_stage: 3 moss的配置是deepspeed stage3 模型是分开加载到跟个模型,我使用1batch_size,8卡的瞬时基本每张卡都到70G显存以上了,官网没有开源,我改好,目前int8可以finetune > > 大神,是指int8 的finetune 需要80GB_8的显存吗? 不知道48GB_8的显存能否finetune? 精调moss需要,int8不需要

[E ProcessGroupNCCL.cpp:821] [Rank 0] Watchdog caught collective operation timeout: WorkNCCL(SeqNum=10646, OpType=ALLREDUCE, Timeout(ms)=1800000) ran for 1808898 milliseconds before timing out. [2023-05-12 09:16:38,853] [INFO] [logging.py:93:log_dist] [Rank 0] [Torch] Checkpoint 24 is about...

solving the problem in this project , https://github.com/yangzhipeng1108/moss-finetune