question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🌟 New model addition

Model description

OpenAI just announced Image GPT: https://openai.com/blog/image-gpt/

Although image rendering would be out of scope for Transformers, the RGB generation would still be in scope and it would be best to port the weights to a GPT2LMModel.

However, it’s not immediately clear here how the tokenization is implemented in the downloaded model. (no separate vocab.json)

Open source status

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:34
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
apeguero1commented, Jun 24, 2020

Hey @minimaxir! Here’s a colab which loads the weights into a subclass of GPT2LMHeadModel and demonstrates unconditional image generation and conditional image completion.

Some differences I’ve found between Image-GPT and GPT2 which are reflected in the subclass.

  1. Image-GPT layer normalization doesn’t subtract off the mean
  2. different activations used in the MLP
  3. In Image-GPT, the input and output embeddings are not tied
  4. Image-GPT has an extra learned “sos” token embedding which is concatenated at the beginning of the sequence
  5. The GPT2 [n_embd, 3*n_embd] dimensional linear layer, c_attn, which produces queries, keys, and values is instead split into 3 separate linear layers each with dimension [n_head, n_embd/n_head, n_embd] in Image-GPT (this only affects how to load the weights and not the actual model).
  6. In Image-GPT, the conv1d module doesn’t have a bias term

So what’s our next step to add this to the repo?

0reactions
stale[bot]commented, Oct 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image GPT - OpenAI
Generative sequence modeling is a universal unsupervised learning algorithm: since all data types can be represented as sequences of bytes, a ...
Read more >
openai/image-gpt - GitHub
This repository is meant to be a starting point for researchers and engineers to experiment with image GPT (iGPT). Our code forks GPT-2...
Read more >
ImageGPT - Hugging Face
ImageGPT (iGPT) is a GPT-2-like model trained to predict the next pixel value, allowing for both unconditional and conditional image generation.
Read more >
Image GPT | Discover AI use cases - GPT-3 Demo
In 2020, OpenAI released Image GPT (iGPT), a Transformer-based model that operates on sequences of pixels instead of sequences of text.
Read more >
OpenAI's Image GPT Completes Your Images With Style!
Check out Weights & Biases and sign up for a free demo here: https://www.wandb.com/papers ❤️ Their mentioned post is available here: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found