PyTorch Reimplementation of OpenAI GPT-2 Small Model Released

Github developer Hugging Face has updated its repository with a PyTorch reimplementation of the GPT-2 language model small version that OpenAI open-sourced last week, along with pretrained models and fine-tuning examples.
 
GPT-2 is a state-of-the-art language model designed to improve on the realism and coherence of generated text. It is the largest language model ever, with 1.542 billion parameters. To safeguard against potential misuse, OpenAI open-sourced only a small version of GPT-2.
 
Hugging Face Science Lead Thomas Wolf tweeted the news: “Pytorch-bert v0.6 is out with OpenAI’s pre-trained GPT-2 small model & the usual accompanying example scripts to use it.” The PyTorch implementation is an adaptation of OpenAI’s implementation, equipped with OpenAI’s pretrained model and a command-line interface.

The Hugging Face repository was first made available last November. It provides PyTorch implementation of BERT with Google’s pretrained models, examples, a notebook and a command-line interface to load any pre-trained TensorFlow checkpoint for BERT. The AI community has shown great interest in the project, which has received 3,700 stars on GitHub. Google BERT also recognized the Hugging Face contribution, declaring it “compatible with our pre-trained checkpoints and able to reproduce our results” on their GitHub
 
The project also includes PyTorch reimplementations, pre-trained models and fine-tuning examples for OpenAI’s GPT model and Google/CMU’s Transformer-XL model.

Output example from pretrained GPT — 2 (picture Thomas Wolf)

Open AI last week made the controversial decision to not release their language model’s code and training dataset due to concerns it might be used for malicious purposes such as generating fake news. The decision challenged the AI community’s open-source philosophy and has divided researchers. Facebook Chief AI Scientist Yann LeCun — who never shies from controversy — mocked the decision in a tweet: “Every new human can potentially be used to generate fake news, disseminate conspiracy theories, and influence people. Should we stop making babies then?” 
 
Founded in 2016, Hugging Face is a social AI and chatbot startup based in New York.
 
PyTorch Pretrained BERT: The Big & Extending Repository of pretrained Transformers is available on GitHub.


Journalist: Fangyu Cai | Editor: Michael Sarazen


2018 Fortune Global 500 Public Company AI Adaptivity Report is out!
Purchase a Kindle-formatted report on Amazon.
Apply for Insight Partner Program to get a complimentary full PDF report.


Follow us on Twitter @Synced_Global for daily AI news!


We know you don’t want to miss any stories. Subscribe to our popular Synced Global AI Weekly to get weekly AI updates.