Downloads · 30 days
11
12% of all-time downloads
adityabavadekar/gpt2-medium-finetuned-qamodel
gpt2-medium-finetuned-qamodel is a text generation model from adityabavadekar. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-4.0.
This conversational QA model is developed by Aditya Bavadekar. It is built upon the GPT-2 architecture, finetuned for the specific task of answer to the given questions.
Downloads · 30 days
11
12% of all-time downloads
All-time downloads
91
Public
Repo size
4.3 GB
Likes
0
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
This conversational QA model is developed by Aditya Bavadekar. It is built upon the GPT-2 architecture, finetuned for the specific task of answer to the given questions.
This model is currently in the testing phase and is likely to exhibit biases. Caution should be exercised when using the model's outputs for critical tasks.
You can quickly begin using the model by loading it or the associated pipeline using the transformers library:
from transformers import pipeline
generator = pipeline("text-generation", model="AdityaBavadekar/gpt2-medium-finetuned-qamodel")
Here are some recommended configurations that work well:
BEAM_SIZE = 5
TEMPERATURE = 2.0
MAX_LENGTH = 200
NOR_NGRAM = 2
PROMPT = """
Instruction: You are a respectful, friendly, helpful assistant.
Question : What is your name?
"""
generated_text = generator(
PROMPT,
max_length=MAX_LENGTH,
temperature=TEMPERATURE,
num_beams=BEAM_SIZE,
no_repeat_ngram_size=NOR_NGRAM,
early_stopping=True
)[0]["generated_text"]
print(generated_text)
To interact with the model, use the following prompt format:
Instruction: [instruction_here]
Question : [question_here]
Please do note that this model card provides an overview of the conversational QA model and guides on how to use it effectively. Keep in mind the model's limitations and potential biases while interpreting its outputs.