python开源系列文章
- 开源Python-单元测试
- 开源python-文档撰写
- 开源python-代码规范与检查
- 开源python-打包发布
- 开源python-自动集成
- 开源python-向transformers学习
- 开源python-向timm学习
- 开源python-向tensorflow-addons学习
- 开源python-向mmdetection学习
- 开源python-向tytorch学习
向transformers学习
https://github.com/huggingface/transformers
功能:支持NLP BERT时代的各种任务与模型
结构
测试
以tensorflow的模型为例
-
测试TF model
- 准备工作
-
UtilsFunctions测试
- 测试无网链接时,使用cached file
- 测试从文件中加载
- 测试从url加载预训练模型
- 测试unpack输入
- 测试xla,softmax在cpu是否稳定
- 测试从hub中checkpoint分区
- 测试checkpiunt 分区
-
检查上传到hub
- push to hub
- push to hub中的组织
详细
以AutoModel为中心,加上不同的head用于不同任务
- ForCausalLM (解码器加上语言模型head,可用于文本生成)
- ForSequenceClassification (解码器加上分类head,可用于文本分类)
config
参考
- https://zhuanlan.zhihu.com/p/64770086