Unilm  by YunwenTechnology

Chinese UniLM base model for NLU and NLG tasks

created 5 years ago
439 stars

Top 69.1% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a Chinese pre-trained UniLM model, a versatile architecture capable of both Natural Language Understanding (NLU) and Natural Language Generation (NLG) tasks. It's intended for researchers and developers working with Chinese NLP, offering a strong baseline for tasks like text classification, reading comprehension, and summarization.

How It Works

UniLM is a unified pre-training framework that allows a single model to perform both NLU and NLG tasks by conditioning the self-attention mechanism. For NLU tasks, it functions similarly to BERT. For NLG tasks, it's fine-tuned using a sequence-to-sequence approach, enabling generation. This dual capability reduces the need for separate models for understanding and generation.

Quick Start & Requirements

  • Install/Run: Requires PyTorch 1.4.0 and Transformers 2.6.0. Usage involves loading provided model weights and configuration.
  • Prerequisites: Python environment, PyTorch, Transformers library. No specific hardware like GPUs is mandated, but performance will be significantly impacted.
  • Resources: Downloadable pre-trained models (tf and torch) are available via Baidu Netdisk links provided in the README.
  • Links: CLUE Benchmark Results, CSL Dataset, Weibo News Summary Dataset

Highlighted Details

  • Achieves competitive results on CLUE benchmark datasets (AFQMC, TNEWS, IFLYTEK, CMNLI, CSL, CMRC2018), with an average score of 70.71% for unilm_base.
  • Demonstrates strong performance on news summarization tasks, outperforming bert_base in ROUGE scores.
  • Provides specific type_token_id guidance for NLU ([0,1]) and NLG ([4,5]) tasks.
  • Includes example commands for fine-tuning and inference for NLG tasks.

Maintenance & Community

  • Developed by YunwenTechnology. Contact: cliu@iyunwen.com.
  • No explicit community channels (Discord/Slack) or roadmap are mentioned.

Licensing & Compatibility

  • The README does not explicitly state a license. The model weights are provided via Baidu Netdisk, implying potential usage restrictions. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project relies on older versions of PyTorch (1.4.0) and Transformers (2.6.0), which may pose compatibility issues with current libraries. The lack of explicit licensing and community support could be a barrier to adoption.

Health Check
Last commit

3 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.