This is a fine-tuned version of the GPT2 model. It's best suited for text-generation.
Kwaku/gpt2-finetuned-banking77 was fine tuned on the
banking77 dataset, which is "composed of online banking queries annotated with their corresponding intents."
Given the magnitude of the
Microsoft DialoGPT-large model, the author resorted to fine-tuning the gpt2 model for the creation of a chatbot. The intent was for the chatbot to emulate a banking customer agent, hence the use of the banking77 dataset. However, when the fine-tuned model was deployed in the chatbot, the results were undesirable. Its responses were inappropriate and unnecessarily long. The last word of its response is repeated numerously, a major glitch in it. The model performs better in text-generation but is prone to generating banking-related text because of the corpus it was trained on.
1>>>from transformers import pipeline
2
3>>> model_name = "Kwaku/gpt2-finetuned-banking77"
4>>> generator = pipeline("text-generation", model=model_name)
5>>> result = generator("My money is", max_length=15, num_return_sequences=2)
6>>> print(result)
7
8[{'generated_text': 'My money is stuck in ATM pending. Please cancel this transaction and refund it'}, {'generated_text': 'My money is missing. How do I get a second card, and how'}]
For users who want a diverse text-generator, this model's tendency to generate mostly bank-related text will be a drawback. It also inherits
the biases of its parent model, the GPT2.