Train An AI Model To Tell A Story – Natural Language Processing (NLP) Tutorial
In this video, we train our own LLM (Large Language Model - similar to OpenAI's ChatGPT) using the Hugging Face Transformers library to tell us a story! It'll use NLP (Natural Language Processing) to construct sentences that form a full story.
We'll use Python 3, Visual Studio Code, PyTorch and the HuggingFace Transformers library to train our own NLP on a custom dataset!
This video is aimed at beginners wanting to get started with AI!
Timestamps
===
0:00 Introduction
4:20 Importing our base model (GPT2)
7:33 Is our base model good at telling stories? (Spoilers: No)
10:36 Importing the TinyStories Dataset
15:46 Trimming and tokenizing our dataset
24:32 Creating our DataCollator
27:01 Training our model!
29:36 Testing our model
Resources
===
- Transformers Library: https://huggingface.co/docs/transformers/index
- DistilGPT2 Model: https://huggingface.co/distilgpt2
- TinyStories Dataset: https://huggingface.co/datasets/roneneldan/TinyStories
- TinyStories Paper: https://arxiv.org/abs/2305.07759 (Thank you Ronan Eldan and Yuanzhi Li!)
- Hugging Face's Learning Resources: https://huggingface.co/learn
- Daniel Bourke's (Excellent) Introduction to PyTorch: https://www.youtube.com/watch?v=Z_ikDlimN6A
- Jeremy Howard's AI Course: https://course.fast.ai/
- More LLM goodness on Hugging Face: https://huggingface.co/docs/transformers/main/llm_tutorial
Music Credits
===
Music from Uppbeat (free for Creators!):
https://uppbeat.io/t/prigida/moonshine
License code: GWGFSP1SPWKPYD05
Tags
===
#gpt2 #ai #huggingface #makestuffwithai #python #pytorch #llm #nlp #machinelearningbasics #machinelearning #machinelearningwithpython #textclassification #generativeai
In this video, we train our own LLM (Large Language Model – similar to OpenAI’s ChatGPT) using the Hugging Face Transformers library to tell us a story! It’ll use NLP (Natural Language Processing) to construct sentences that form a full story.
We’ll use Python 3, Visual Studio Code, PyTorch and the HuggingFace Transformers library to train our own NLP on a custom dataset!
This video is aimed at beginners wanting to get started with AI!
Timestamps
===
0:00 Introduction
4:20 Importing our base model (GPT2)
7:33 Is our base model good at telling stories? (Spoilers: No)
10:36 Importing the TinyStories Dataset
15:46 Trimming and tokenizing our dataset
24:32 Creating our DataCollator
27:01 Training our model!
29:36 Testing our model
Resources
===
– Transformers Library: https://huggingface.co/docs/transformers/index
– DistilGPT2 Model: https://huggingface.co/distilgpt2
– TinyStories Dataset: https://huggingface.co/datasets/roneneldan/TinyStories
– TinyStories Paper: https://arxiv.org/abs/2305.07759 (Thank you Ronan Eldan and Yuanzhi Li!)
– Hugging Face’s Learning Resources: https://huggingface.co/learn
– Daniel Bourke’s (Excellent) Introduction to PyTorch: https://www.youtube.com/watch?v=Z_ikDlimN6A
– Jeremy Howard’s AI Course: https://course.fast.ai/
– More LLM goodness on Hugging Face: https://huggingface.co/docs/transformers/main/llm_tutorial
Music Credits
===
Music from Uppbeat (free for Creators!):
https://uppbeat.io/t/prigida/moonshine
License code: GWGFSP1SPWKPYD05
Tags
===
#gpt2 #ai #huggingface #makestuffwithai #python #pytorch #llm #nlp #machinelearningbasics #machinelearning #machinelearningwithpython #textclassification #generativeai