Making an AI to do my English Assignments for me using PyTorch.

Honestly who likes to write essays they are long they need loads of research and framing them is never fun. So, one day I thought lets make…

Making an AI to do my English Assignments for me using PyTorch.

Honestly who likes to write essays they are long they need loads of research and framing them is never fun. So, one day I thought lets make a work around.So, I made an AI to do my work for me.

Without delay lets get started hehe😁

Firstly you will need a PyTorch build. Here is my build below:

After PyTorch is done installing. Start installing ‘transformers’ using the following command:

pip install transformers

Now all the imports are done.

Lets get started with the main code, Lets start with importing the pre-trained model:

Now lets load in the model:

here for the model, instead of using EleutherAI/gpt-neo-2.7B, you can replace the 2.7B with 1.3B or 125M, so it will run faster on your computer.

Finally the last step using the model.

you can specify the max length if you want to.

With that our code is over yeah literally 6 lines of code.

Lets see some fun outputs:

Downloading the 9 gb model data 🥲
Its done finally 🥲
Did I mention use a beefy computer please or a M1 processor
and there is the output
Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation:
Bob the builder the famous builder, the man who had built the world’s first skyscraper in 1885; and that it was the architect who invented the modern elevator—the world’s first underground transportation system.

So, as you can see its pretty good at its stuff.

If you liked it a follow will be appreciated.

This project was executed on Google Colaboratory check the code out:

If you wanna make your very own AI/Chatbot made with TensorFlow read this article by me:

For more stuff check out my GitHub:

For my day to day AIML research updates follow me in twitter:

Thanks for reading 😁,See you guys next week.