Git Product home page Git Product logo

nezha_chinese_pytorch's Introduction

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

nezha_chinese_pytorch's People

Contributors

lonepatient avatar

Watchers

 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.