image-gpt
image-gpt copied to clipboard
Model runs faster with Hugging Face Transformers
Hi everyone,
I thought I'd share this colab which ports the Image GPT weights into a Hugging Face transformers model. Runs about 10x faster for me.
Hi @apeguero1, Thanks for the colab! It seems there is a small bug in the notebook:
I'm thinking it should be
return img/127.5 - 1
Oh yes, thanks @ssss1029! Just fixed it 👍
Hello @apeguro1, while attempting to run this colab, I've been getting various 'name is not defined' errors. Any tips on how to deal with this? Thanks in advance.
Seems like you're missing a couple of imports. run
import matplotlib.pyplot as plt
import torch
Still getting 'name 'samples' is not defined' and 'name 'clusters' is not defined'. I ran the aforementioned code in line 7.
Perhaps I ran the code in the wrong location?
Hmm.. could you try running all the cells by clicking 'Runtime' and then 'Run all'?
Seems to work now, thanks!
Hey @apeguero1 , I'm trying to use Image GPT for a classification task, but I'm not very sure about how to do it using your Colab. How exactly should I feed the model in the training phase?
Hey @apeguero1, can you please assist with this error?
Hi @MayuO2, just pushed up a fix! BTW the huggingface repo has now added image-gpt if you wanna check that out (:
Thank you @apeguero1! It is working perfectly now:) I appreciate you sharing the huggingface repo with us