Oneflow-Inc / models

Models and examples built with OneFlow
Apache License 2.0
94 stars 37 forks source link

Dev roberta and update CPT NEW #364

Closed songzetao closed 2 years ago

xiezipeng-ML commented 2 years ago

https://github.com/Oneflow-Inc/models/blob/ba606a5035d14acad613cb9fbc3745d4d0fa1b4a/NLP/CPT/models/CPT.py#L58 可以加一个链接

xiezipeng-ML commented 2 years ago

bert.py和CPT.py中都有ACT2FN,可以避免一下重复代码

xiezipeng-ML commented 2 years ago

inference部分报错: bash infer.sh 需要检查一下

xiezipeng-ML commented 2 years ago

https://github.com/Oneflow-Inc/models/blob/a1650d1a440785103bfd54964db1567c1658aafe/NLP/CPT/models/CPT.py#L8 MSELoss 好像没用到

https://github.com/Oneflow-Inc/models/blob/a1650d1a440785103bfd54964db1567c1658aafe/NLP/CPT/models/CPT.py#L1 log也没用到

https://github.com/Oneflow-Inc/models/blob/a1650d1a440785103bfd54964db1567c1658aafe/NLP/CPT/models/CPT.py#L19 加个空行

xiezipeng-ML commented 2 years ago

roberta下的tokenizer的文件直接是全部从huggingface复制的。。。 这个项目依赖tokenizer的话可以导入transformers来用,这里是直接搬过来再用了