pytorch-generative  by EugenHotaj

PyTorch library for generative modeling

Created 5 years ago
441 stars

Top 67.9% on SourcePulse

GitHubView on GitHub
Project Summary

This library provides PyTorch implementations of state-of-the-art generative models, offering useful abstractions for common building blocks and utilities for training and debugging. It targets researchers and practitioners in deep learning who want to easily experiment with and implement generative models. The library aims to simplify the process of building, training, and reproducing results from various generative architectures.

How It Works

The library offers both high-level model implementations (e.g., ImageGPT, PixelSNAIL) and lower-level building blocks (e.g., CausalAttention, NCHWLayerNorm). This modular design allows users to either directly use pre-built models or construct custom architectures by composing these reusable components. The approach emphasizes providing clean, reference implementations that facilitate reproducibility and understanding of complex generative models.

Quick Start & Requirements

  • Installation: Clone the repository and install requirements:
    git clone https://www.github.com/EugenHotaj/pytorch-generative
    cd pytorch-generative
    pip install -r requirements.txt
    
  • Testing: Run tests with python -m unittest discover.
  • Reproducing Results: Use the train.py script with the --model and --logdir arguments. Example: python train.py --model image_gpt --logdir /tmp/run --use-cuda. TensorBoard integration is provided for visualization.
  • Google Colab: Clone the repo and move the pytorch_generative directory into the top-level directory.
  • Dependencies: PyTorch. CUDA is recommended for training.

Highlighted Details

  • Provides reference implementations for Autoregressive Models (PixelSNAIL, ImageGPT, PixelCNN), Variational Autoencoders (VAE, VQ-VAE), and Normalizing Flows (NICE).
  • Includes utilities for training, debugging, and TensorBoard visualization.
  • Models are implemented as PyTorch Modules, allowing direct instantiation and use.
  • Offers lower-level building blocks for custom model construction.

Maintenance & Community

  • The repository appears to be maintained by Eugen Hotaj.
  • No specific community links (Discord, Slack) or roadmap are mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. The repository should be checked for a LICENSE file for definitive terms.

Limitations & Caveats

  • The README does not specify compatibility with different PyTorch versions or Python versions beyond what requirements.txt might imply.
  • Benchmarks are primarily reported on Binarized MNIST, and performance on other datasets or tasks is not detailed.
Health Check
Last Commit

2 years ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), Lewis Tunstall Lewis Tunstall(Research Engineer at Hugging Face), and
15 more.

torchtune by pytorch

0.2%
5k
PyTorch library for LLM post-training and experimentation
Created 1 year ago
Updated 1 day ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake), and
4 more.

Awesome-pytorch-list by bharathgs

0.1%
16k
Curated list of PyTorch content on GitHub
Created 8 years ago
Updated 1 year ago
Feedback? Help us improve.