Denis2054 / Transformers-for-NLP-2nd-Edition

Transformer models from BERT to GPT-4, environments from Hugging Face to OpenAI. Fine-tuning, training, and prompt engineering examples. A bonus section with ChatGPT, GPT-3.5-turbo, GPT-4, and DALL-E including jump starting GPT-4, speech-to-text, text-to-speech, text to image generation with DALL-E, Google Cloud AI,HuggingGPT, and more
https://denis2054.github.io/Transformers-for-NLP-2nd-Edition/
MIT License
807 stars 306 forks source link

Resolve colab compatibility issues in AppendixIII #4

Closed hnky92 closed 1 year ago

hnky92 commented 1 year ago

Issue

As noted in AppendixIII/OpenAI_GPT_2.ipynb , we cannot run notebook in Colab for they does not support Tensforflow 1.x anymore.

Solution

To handle this, I changed source repository from OpenAI to nshepperd, and imported tensorflow.compat.v1 for compatibility.

Change Notes

I did not changed the notes in preface. So please edit if changes are needed.

Denis2054 commented 1 year ago

Good work! Thanks. I'll take a look and see how to promote your work the best way possible. I might just add a link to your work in a readme doc in the directory of the programs to give your work the attention it deserves. 😊

Denis2054 commented 1 year ago

Issue

As noted in AppendixIII/OpenAI_GPT_2.ipynb , we cannot run notebook in Colab for they does not support Tensforflow 1.x anymore.

Solution

To handle this, I changed source repository from OpenAI to nshepperd, and imported tensorflow.compat.v1 for compatibility.

Change Notes

  • in step 2, changed source repo from !git clone https://github.com/openai/gpt-2.git to !git clone https://github.com/nshepperd/gpt-2
  • in step 4, deleted line %tensorflow_version 1.x
  • in step 7a, imported tensorflow.compat.v1 for compatibility

I did not changed the notes in preface. So please edit if changes are needed.

Denis2054 commented 1 year ago

Thanks to Hnky, the issue of the notebook in AppendexIII has been resolved. A great thanks to Hnky!