finetune-transformer-lm is a research codebase that accompanies the paper “Improving Language Understanding by Generative Pre-Training,” providing a minimal implementation focused on fine-tuning a transformer language model for evaluation tasks. The repository centers on reproducing the ROCStories Cloze Test result and includes a single-command training workflow to run the experiment end to end. It documents that runs are non-deterministic due to certain GPU operations and reports a median accuracy over multiple trials that is slightly below the single-run result in the paper, reflecting expected variance in practice. The project ships lightweight training, data, and analysis scripts, keeping the footprint small while making the experimental pipeline transparent. It is provided as archived, research-grade code intended for replication and study rather than continuous development.
Features
- End-to-end ROCStories Cloze Test training via train.py with flags for submit and analysis
- Dataset loader utilities for ROCStories and simple data directory configuration
- Analysis helpers and reporting scripts for post-run evaluation
- Configuration and optimization helpers through opt.py and supporting utils
- Documented non-determinism from GPU ops with reported median accuracy over multiple runs
- MIT-licensed, archived research code aimed at reproduction and study