GPT-2 PyTorch is a compact educational implementation of OpenAI’s GPT-2 text generator in PyTorch. It uses pretrained weights converted for PyTorch rather than training the language model from scratch. Users can begin generation from a supplied prompt or request unconditional samples. Command-line options control sample count, batch size, output length, temperature, and top-k filtering. The repository includes a runnable Python script, dependency file, and Google Colab notebook for faster experimentation. It is best suited to studying an early Transformer language model and its sampling process rather than building a modern production system.
Features
- Conditional text generation
- Unconditional text sampling
- Temperature-based sampling controls
- Adjustable top-k filtering
- Command-line generation interface
- Google Colab demonstration notebook
Categories
AI ModelsLicense
MIT LicenseFollow GPT2-Pytorch with Text-Generator
Other Useful Business Software
MongoDB Atlas runs apps anywhere
MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of GPT2-Pytorch with Text-Generator!