Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Pre-trained Chinese ELECTRA(中文ELECTRA预训练模型)
| Date | Stars |
|---|---|
| 2026-07-24 | 1433 |
| 2026-07-25 | 1433 |
| 2026-07-28 | 1433 |
| 2026-07-30 | 1433 |
| 2026-08-06 | 1433 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
[**中文说明**](./README.md) | [**English**](./README_EN.md)
<p align="center">
<br>
<img src="./pics/banner.png" width="500"/>
<br>
</p>
<p align="center">
<a href="https://github.com/ymcui/Chinese-ELECTRA/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/ymcui/Chinese-ELECTRA.svg?color=blue&style=flat-square">
</a>
</p>
谷歌与斯坦福大学共同研发的最新预训练模型ELECTRA因其小巧的模型体积以及良好的模型性能受到了广泛关注。
为了进一步促进中文预训练模型技术的研究与发展,哈工大讯飞联合实验室基于官方ELECTRA训练代码以及大规模的中文数据训练出中文ELECTRA预训练模型供大家下载使用。
其中ELECTRA-small模型可与BERT-base甚至其他同等规模的模型相媲美,而参数量仅为BERT-base的1/10。
本项目基于谷歌&斯坦福大学官方的ELECTRA:[https://github.com/google-research/electra](https://github.com/google-research/electra)
----
[中文LERT](https://github.com/ymcui/LERT) | [中英文PERT](https://github.com/ymcui/PERT) | [中文MacBERT](https://github.com/ymcui/MacBERT) | [中文ELECTRA](https://github.com/ymcui/Chinese-ELECTRA) | [中文XLNet](https://github.com/ymcui/Chinese-XLNet) | [中文BERT](https://github.com/ymcui/Chinese-BERT-wwm) | [知识蒸馏工具TextBrewer](https://github.com/airaria/TextBrewer) | [模型裁剪工具TextPruner](https://github.com/airaria/TextPruner)
查看更多哈工大讯飞联合实验室(HFL)发布的资源:https://github.com/ymcui/HFL-Anthology
## 新闻
**2023/3/28 开源了中文LLaMA&Alpaca大模型,可快速在PC上部署体验,查看:https://github.com/ymcui/Chinese-LLaMA-Alpaca**
2022/10/29 我们提出了一种融合语言学信息的预训练模型LERT。查看:https://github.com/ymcui/LERT
2022/3/30 我们开源了一种新预训练模型PERT。查看:https://github.com/ymcui/PERT
2021/12/17 哈工大讯飞联合实验室推出模型裁剪工具包TextPruner。查看:https://github.com/airaria/TextPruner
2021/10/24 哈工大讯飞联合实验室发布面向少数民族语言的预训练模型CINO。查看:https://github.com/ymcui/Chinese-Minority-PLM
2021/7/21 由哈工大SCIR多位学者撰写的[《自然语言处理:基于预训练模型的方法》](https://item.jd.com/13344628.html)已出版,欢迎大家选购。
2020/12/13 基于大规模法律文书数据,我们训练了面向司法领域的中文ELECTRA系列模型,查看[模型下载](#模型下载),[司法任务效果](#司法任务效果)。
<details>
<summary>点击这里查看历史新闻</summary>
2020/10/22 ELECTRA-180g已发布,增加了CommonCrawl的高质量数据,查看[模型下载](#模型下载)。
2020/9/15 我们的论文["Revisiting Pre-Trained Models for Chinese Natural Language Processing"](https://arxiv.org/abs/2004.13922)被[Findings of EMNLP](https://2020.emnlp.org)录用为长文。
2020/8/27 哈工大讯飞联合实验室在通用自然语言理解评测GLUE中荣登榜首,查看[GLUE榜单](https://gluebenchmark.com/leaderboard),[新闻](http://dwz.date/ckrD)。
2020/5/29 Chinese ELECTRA-large/small-ex已发布,请查看[模型下载](#模型下载),目前只提供Google Drive下载地址,敬请谅解。
2020/4/7 PyTorch用户可通过[🤗Transformers](https://github.com/huggingface/transformers)加载模型,查看[快速加载](#快速加载)。
2020/3/31 本目录发布的模型已接入[飞桨PaddleHub](https://github.com/PaddlePaddle/PaddleHub),查看[快速加载](#快速加载)。
2020/3/25 Chinese ELECTRA-small/base已发布,请查看[模型下载](#模型下载)。
</details>
## 内容导引
| 章节 | 描述 |
|-|-|
| [简介](#简介) | 介绍ELECTRA基本原理 |
| [模型下载](#模型下载) | 中文ELECTRA预训练模型下载 |
| [快速加载](#快速加载) | 介绍了如何使用[🤗Transformers](https://github.com/huggingface/transformers)、[PaddleHub](https://github.com/PaddlePaddle/PaddleHub)快速加载模型 |
| [基线系统效果](#基线系统效果) | 中文基线系统效果:阅读理解、文本分类等 |
| [使用方法](#使用方法) | 模型的详细使用方法 |
| [FAQ](#FAQ) | 常见问题答疑 |
| [引用](#引用) | 本目录的技术报告 |
## 简介
**ELECTRA**提出了一套新的预训练框架,其中包括两个部分:**Generator**和**Discriminator**。
- **Generator**: 一个小的MLM,在[MASK]的位置预测原来的词。Generator将用来把输入文本做部分词的替换。
- **Discriminator**: 判断输入句子中的每个词是否被替换,即使用Replaced Token Detection (RTD)预训练任务,取代了BERT原始的Masked Language Model (MLM)。需要注意的是这里并没有使用Next Sentence Prediction (NSP)任务。
在预训练阶段结束之后,我们只使用Discriminator作为下游任务精调的基模型。
更详细的内容请查阅ELECTRA论文:[ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators](https://openreview.net/pdf?id=r1xMH1BtvB)

## 模型下载
* **`ELECTRA-large, Chinese`**: 24-layer, 1024-hidden, 16-heads, 324M parameters
* **`ELECTRA-base, Chinese`**: 12-layer, 768-hidden, 12-heads, 102M parameters
* **`ELECTRA-small-ex, Chinese`**: 24-layer, 256-hidden, 4-heads, 25M parameters
* **`ELECTRA-small, Chinese`**: 12-layer, 256-hidden, 4-heads, 12M parameters
#### 大语料版(新版,180G数据)
| 模型简称 | 🤗HF下载 | 百度网盘下载 | 压缩包大小 |
| :------- | :---------: | :---------: | :---------: |
| **`ELECTRA-180g-large, Chinese`** | [HF link](https://huggingface.co/hfl/chinese-electra-180g-large-discriminator) | [TensorFlow(密码2v5r)](htExcerpt of 21,210 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:9f8af69a95e73e2a, topic:pytorch, topic:tensorflow, readme:pre-training
matched fp:9f8af69a95e73e2a, topic:language-model
matched fp:9f8af69a95e73e2a, topic:nlp, readme:natural language processing