Chinese XLNet pre-trained models for NLP tasks
Top 26.1% on sourcepulse
This repository provides pre-trained XLNet models for Chinese natural language processing, aiming to enrich the Chinese NLP ecosystem with diverse model options. It is targeted at researchers and practitioners in Chinese NLP who need robust language models for various downstream tasks.
How It Works
The project offers two Chinese XLNet models: XLNet-mid
(24 layers, 768 hidden size, 12 heads, 209M parameters) and XLNet-base
(12 layers, 768 hidden size, 12 heads, 117M parameters). These models are trained on a large corpus of Chinese data (5.4B tokens), including Wikipedia and general domain data. The training process follows the official XLNet methodology, utilizing SentencePiece for tokenization and generating TFRecords for training.
Quick Start & Requirements
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("hfl/chinese-xlnet-mid")
model = AutoModel.from_pretrained("hfl/chinese-xlnet-mid")
XLNet-mid
model files are approximately 800MB.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
2 weeks ago
1 day