HugNLP  by HugAILab

NLP library based on HuggingFace Transformers

created 2 years ago
388 stars

Top 75.0% on sourcepulse

GitHubView on GitHub
Project Summary

HugNLP is a comprehensive NLP library designed to enhance the convenience and effectiveness for NLP researchers, built upon the Hugging Face Transformers ecosystem. It offers a unified framework for developing and applying various NLP tasks, including sequence classification, information extraction, and code understanding, with a focus on knowledge-enhanced pre-training, prompt-based fine-tuning, and instruction tuning.

How It Works

HugNLP integrates several advanced NLP paradigms. It introduces KP-PLM for knowledge-enhanced pre-training by decomposing knowledge sub-graphs into language prompts. For fine-tuning, it supports prompt-based methods like PET and P-tuning, and parameter-efficient techniques such as LoRA and Adapter-tuning. The library also unifies tasks into extractive, inference, or generative formats for instruction tuning and in-context learning, enabling few/zero-shot capabilities. Additionally, it implements uncertainty-aware self-training to mitigate noise in semi-supervised learning.

Quick Start & Requirements

  • Install via:
    git clone https://github.com/HugAILab/HugNLP.git
    cd HugNLP
    python3 setup.py install
    
  • Prerequisites: Python 3, PyTorch. GPU recommended for training.
  • Documentation: HugNLP Documents

Highlighted Details

  • CIKM 2023 Best Demo Paper Award winner.
  • Supports training ChatGPT-like models via generative instruction tuning (HugChat).
  • Unified Chinese Information Extraction (HugIE) via extractive MRC and instruction tuning.
  • Implements knowledge-enhanced pre-training (KP-PLM) and various parameter-efficient learning methods.
  • Offers extensive pre-built applications for benchmarks like GLUE and CLUE, and specific tasks like code clone detection.

Maintenance & Community

  • Active development with recent updates noted.
  • Contact via DingTalk groups or author Jianing Wang.
  • Cite paper: arXiv:2302.14286.
  • Acknowledgements from Alibaba Group (PAI) and Ant Group.

Licensing & Compatibility

  • License: Not explicitly stated in the README, but likely Apache 2.0 given the Hugging Face ecosystem and commercial acknowledgements. Compatibility for commercial use is implied by corporate acknowledgements.

Limitations & Caveats

The project is noted as still under development, with potential for bugs. Users are encouraged to report issues and contribute pull requests.

Health Check
Last commit

1 year ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.