NLP transfer learning tutorial code
Top 48.6% on sourcepulse
This repository provides code for a 2019 NAACL tutorial on transfer learning in NLP, targeting researchers and practitioners. It offers a simplified, self-contained implementation of key transfer learning techniques, enabling users to understand and experiment with pre-training and fine-tuning transformer models for NLP tasks.
How It Works
The codebase implements a GPT-2-like transformer architecture for pre-training on large datasets (WikiText-103, SimpleBooks-92) using a language modeling objective. It then provides scripts for fine-tuning this pre-trained model on downstream tasks like text classification (IMDb), incorporating architectural variations such as adapters. The design prioritizes ease of use and understanding over state-of-the-art performance.
Quick Start & Requirements
pip install -r requirements.txt
after cloning the repository.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The code is designed for educational purposes and does not aim for state-of-the-art performance, with pre-training perplexity being higher than comparable models. The tutorial is from 2019, and the NLP transfer learning landscape has evolved significantly since then.
5 years ago
1 week