From the course: Hands-On AI: Building Your First Conversational AI Chatbot
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Loading DialoGPT
From the course: Hands-On AI: Building Your First Conversational AI Chatbot
Loading DialoGPT
- [Instructor] In this video, we will load the pre-trained DialoGPT model and the tokenizer, which form the core components of our chatbot. We begin by defining a model name. (keyboard clicking) This line creates a variable called MODEL_NAME and assigns it a string that identifies the model we want to use. The model DialoGPT comes in different sizes, small, medium, and large. These sizes refer to the number of parameters the model has. The small version has fewer parameters and runs faster while the large version has more parameters and can produce better responses, but requires more computing power. We are using the medium version here. Next, we load the model with the line, model equals to AutoModelForCausalLM.from_pretrained(MODEL_NAME). This uses a class called AutoModelForCausalLM from Hugging Faces Transformers Library. The auto model part means that Hugging Face will automatically select the right model architecture based on the model name we provide. The ForCausalLM part…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.