All Projects → lonePatient → Nezha_chinese_pytorch

lonePatient / Nezha_chinese_pytorch

Licence: mit
NEZHA: Neural Contextualized Representation for Chinese Language Understanding

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nezha chinese pytorch

LM-CNLC
Chinese Natural Language Correction via Language Model
Stars: ✭ 15 (-76.92%)
Mutual labels:  chinese, language-model
Clue
中文语言理解测评基准 Chinese Language Understanding Evaluation Benchmark: datasets, baselines, pre-trained models, corpus and leaderboard
Stars: ✭ 2,425 (+3630.77%)
Mutual labels:  chinese, language-model
Char Rnn Chinese
Multi-layer Recurrent Neural Networks (LSTM, GRU, RNN) for character-level language models in Torch. Based on code of https://github.com/karpathy/char-rnn. Support Chinese and other things.
Stars: ✭ 192 (+195.38%)
Mutual labels:  chinese, language-model
Chinese-Word-Segmentation-in-NLP
State of the art Chinese Word Segmentation with Bi-LSTMs
Stars: ✭ 23 (-64.62%)
Mutual labels:  chinese, language-model
Nlp chinese corpus
大规模中文自然语言处理语料 Large Scale Chinese Corpus for NLP
Stars: ✭ 6,656 (+10140%)
Mutual labels:  chinese, language-model
Chinese Electra
Pre-trained Chinese ELECTRA(中文ELECTRA预训练模型)
Stars: ✭ 830 (+1176.92%)
Mutual labels:  chinese, language-model
Lightnlp
基于Pytorch和torchtext的自然语言处理深度学习框架。
Stars: ✭ 739 (+1036.92%)
Mutual labels:  chinese, language-model
Char rnn lm zh
language model in Chinese,基于Pytorch官方文档实现
Stars: ✭ 57 (-12.31%)
Mutual labels:  chinese, language-model
Howhow Cli
💻 竟然連 terminal 都開始業配了嗎? 可 ... 可惡!
Stars: ✭ 50 (-23.08%)
Mutual labels:  chinese
Rxswift Chinese Documentation
RxSwift 中文文档
Stars: ✭ 1,107 (+1603.08%)
Mutual labels:  chinese
Chinese Write Handling Char Recognition
汉字手写识别
Stars: ✭ 48 (-26.15%)
Mutual labels:  chinese
Suggest
Top-k Approximate String Matching.
Stars: ✭ 50 (-23.08%)
Mutual labels:  language-model
Awesome Cn
awesome项目中文翻译,提升查阅效率
Stars: ✭ 62 (-4.62%)
Mutual labels:  chinese
Pime
Develop input methods for Windows easily with Python and node.js
Stars: ✭ 1,051 (+1516.92%)
Mutual labels:  chinese
Localization Zh Cn Plugin
Chinese Localization for Jenkins
Stars: ✭ 65 (+0%)
Mutual labels:  chinese
Awesome Gameserver Cn
中文游戏服务器资源大全
Stars: ✭ 1,038 (+1496.92%)
Mutual labels:  chinese
Lmchallenge
A library & tools to evaluate predictive language models.
Stars: ✭ 47 (-27.69%)
Mutual labels:  language-model
Cross Domain ner
Cross-domain NER using cross-domain language modeling, code for ACL 2019 paper
Stars: ✭ 67 (+3.08%)
Mutual labels:  language-model
Indonesian Language Models
Indonesian Language Models and its Usage
Stars: ✭ 64 (-1.54%)
Mutual labels:  language-model
Emacs Document
translate emacs documents to Chinese for convenient reference
Stars: ✭ 1,085 (+1569.23%)
Mutual labels:  chinese

NeZha_Chinese_PyTorch

pytorch版NEZHA,适配transformers

论文下载地址: NEZHA: Neural Contextualized Representation for Chinese Language Understanding

运行脚本依赖模块

如果需要运行该案例脚本,需要安装以下模块:

  1. trainsformers>=4.1.1
  2. TorchBlocks

模型权重下载

官方提供的Tensorflow版本权重下载地址:huawei-noah

已经转化为PyTorch版本权重下载地址如下:

说明:若加载的模型权重是从下列百度网盘下载的PyTorch模型权重,则需要保证torch版本>=1.6.0

运行

执行命令:

sh scripts/run_task_text_classification_chnsenti.sh

长文本

长文本可以通过设置config.max_position_embeddings参数实现,默认值为512,如:

config.max_position_embeddings=args.train_max_seq_length

结果

NEZHA(base-wwm) chnsenti
tensorflow 94.75
pytorch 94.92
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].