NeZha_Chinese_PyTorch
1.0.0
pytorch版NEZHA,適配transformers
論文下載地址: NEZHA: Neural Contextualized Representation for Chinese Language Understanding
如果需要運行該案例腳本,需要安裝以下模塊:
官方提供的Tensorflow版本權重下載地址:huawei-noah
已經轉化為PyTorch版本權重下載地址如下:
nezha-cn-base 百度網盤鏈接提取碼: hckq
nezha-large-zh 百度網盤鏈接提取碼: qks2
nezha-base-wwm 百度網盤鏈接提取碼: ysg3
nezha-large-wwm 百度網盤鏈接提取碼: 8dig
說明:若加載的模型權重是從下列百度網盤下載的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 |