nlpcol(nlp collction): 一个简单的nlp基础模型集合。
相较于transformers,本项目尽量以较低的代码实现一部分经典模型。旨在通过构建简单易懂的代码,让初学者能够快速接触及掌握各经典模型以及训练推理过程的各个细节。当前已集成模型: bert, unilm, gpt, mt5, gpt2。
- 训练逻辑优化:混合精度、grad_checkoutpoint
- 训练日志优化
- 常用优化器实现
所有权重均为torch版本
模型分类 | 模型名称 | 权重来源 | 官方项目地址 |
---|---|---|---|
bert | bert-base-chinese | 谷歌中文bert | bert |
mt5 | mt5-base | 谷歌多语言版T5 | t5 |
gpt | openai-gpt | openai-gpt1 | finetune-transformer-lm |
gpt | CDial-GPT_LCCC-base | 清华coai | CDial-GPT |
gpt2 | openai-gpt2 | openai-gpt2 | gpt-2 |
https://github.com/huggingface/transformers
https://github.com/bojone/bert4keras
https://github.com/Tongjilibo/bert4torch