Code Monkey home page Code Monkey logo

pretrained-models's Introduction

开源预训练语言模型合集

这是由追一科技有限公司推出的一个预训练模型合集,主要发布自研的预训练语言模型,推动自然语言处理技术的进步。预训练语言模型通过在大规模文本上进行预训练,可以作为下游自然语言处理任务的模型参数或者模型输入以提高模型的整体性能。

模型概览

以下是我们目前公开发布的模型概览:

名称 数据来源 训练数据大小 词表大小 模型大小 下载地址
RoBERTa Tiny 百科,新闻 等 35G 21128 27MB 百度网盘(beum)
RoBERTa Small 百科,新闻 等 35G 21128 48MB 百度网盘(hjqc)
SimBERT Base 百度知道 2200万相似句组 21128 344MB 百度网盘(6xhq)

模型详情

此处对每个模型进行较为详细的介绍

RoBERTa Tiny

  • 【配置】 4层模型,hidden size为312,对Embedding层做了低秩分解(312->128->312),可以用bert4keras加载使用。

  • 【训练】 使用bert4keras在TPU v3-8上训练,使用带梯度累积的LAMB优化器,批大小为800,累积4步更新,相当于以批大小3200训练了125k步(前3125步为warmup)。

  • 【备注】 速度跟albert tiny一致,普通分类性能也基本一致,但由于roberta模型并没有参数共享这个约束,所以在生成式任务等复杂任务上效果优于albert tiny。

RoBERTa Small

  • 【配置】 6层模型,hidden size为384,对Embedding层做了低秩分解(384->128->384),可以用bert4keras加载使用。

  • 【训练】 使用bert4keras在TPU v3-8上训练,使用带梯度累积的LAMB优化器,批大小为800,累积4步更新,相当于以批大小3200训练了125k步(前3125步为warmup)。

  • 【备注】 速度跟albert small一致,普通分类性能也基本一致,但由于roberta模型并没有参数共享这个约束,所以在生成式任务等复杂任务上效果优于albert small。

SimBERT Base

  • 【配置】 跟bert base一致,12层模型,hidden size为768。

  • 【训练】 使用bert4keras基于chinese_L-12_H-768_A-12进行继续训练,训练任务为“度量学习+UniLM”,以Adam优化器(学习率2e-6,批大小128)的Adam优化器在单个TITAN RTX上训练了117万步。

  • 【备注】 简单来说,这就是一个finetune过的bert base模型,但是[CLS]对应的输出具有句向量的意义,可以用于检索任务,理论上短文本效果会更好,在跟这里一样的验证集上得到了0.96的top1准确率;此外还具有一对多生成能力。详见例子simbert_base.py

如何引用

Bibtex:

@techreport{zhuiyipretrainedmodels,
  title={Open Language Pre-trained Model Zoo - ZhuiyiAI},
  author={Jianlin Su},
  year={2020},
  url = "https://github.com/ZhuiyiTechnology/pretrained-models",
}

联系我们

邮箱:[email protected]

相关链接

追一科技:https://zhuiyi.ai

pretrained-models's People

Contributors

zhuiyitechnology avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.