I am not well-versed in PyTorch enough to even SLIGHTLY comprehend or even slightly adapt the tutorial.
Hi! I’m a beginner, so please explain this to me simply. How would I make a chatbot that comes up with unique, new text based off of an input, and how would I then converse with it?
My training data is in a .csv file structured like this:
And could I maybe locally run a finetuned model of something else?
Most language model chatbots are developed in the following steps:
- Train the tokenizer and model with next token prediction(i.e. hide the next word in the sequence and the model is tasked with predicting it);
- Since the outputs are probabilities(each token is assigned a value of 0 to 1), we can take the top 10% and choose a random token from those. This ensures the model doesn’t wind up overfitting on one response.
- Additional training/fine-tuning via supervised learning, RLHF or a similar reinforcement learning training method.
There is an entire platform built on PyTorch and in partnership with PyTorch which specializes in chatbot models. That is HuggingFace. They have online courses for NLP(Natural Language Processing) and Reinforcement Learning. They also have a simple(r) to use interface for downloading pretrained models and deploying them. And plenty of trained models, so you don’t have to start from scratch. I would suggest you start there.
Okay, thanks. I’ll check that out.
HuggingFace-Course where have you been all my life? To all those watching, this solution is amazing.