gpt2client  by rish-16

TensorFlow wrapper for GPT-2 text generation models

created 6 years ago
372 stars

Top 77.3% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a user-friendly Python wrapper for OpenAI's GPT-2 text generation models (124M, 345M, 774M, and 1.5B parameters). It simplifies interacting with these powerful language models for researchers and developers needing quick text generation capabilities.

How It Works

The gpt2-client acts as a streamlined interface to the original GPT-2 implementation. It handles model loading, text generation with various options (interactive, batch, return text), and even provides basic fine-tuning functionality. The wrapper aims for accessibility and utility, allowing users to experiment with different GPT-2 model sizes with minimal code.

Quick Start & Requirements

  • Install via pip: pip install gpt2-client
  • Requires TensorFlow >= 1.X (specifically noted as incompatible with TensorFlow 2.0, recommending 1.14.0).
  • Fine-tuning is ideal with GPU/TPU.
  • Official documentation and examples are available within the README.

Highlighted Details

  • Supports all four official GPT-2 model sizes (124M to 1.5B).
  • Offers flexible text generation parameters, including interactive prompts and batch processing.
  • Includes functionality for fine-tuning the model on custom datasets.
  • Provides utilities for encoding and decoding text sequences to model inputs.

Maintenance & Community

The project is marked as "Archived" in its repository name, indicating it may no longer be actively maintained. There are no explicit links to community channels or roadmaps provided in the README.

Licensing & Compatibility

  • License: MIT
  • The MIT license permits commercial use and integration into closed-source projects.

Limitations & Caveats

The project is marked as "Archived," suggesting potential lack of ongoing development or support. Compatibility is explicitly limited to TensorFlow 1.X versions, which are now legacy. The README also warns that generated samples are unfiltered and may contain offensive content.

Health Check
Last commit

4 years ago

Responsiveness

1 week

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

Explore Similar Projects

Feedback? Help us improve.