rajpurkar/squad
Viewer • Updated • 98.2k • 160k • 364
How to use Gachomba/question-generator with Transformers:
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Gachomba/question-generator")
model = AutoModelForSeq2SeqLM.from_pretrained("Gachomba/question-generator")This model is a fine-tuned version of facebook/bart-large on the SQUAD dataset. It achieves the following results on the evaluation set:
More information needed
def generate_question(context): inputs = tokenizer(context, return_tensors="pt") output = model.generate(**inputs) question = tokenizer.decode(output[0], skip_special_tokens=True) return question print(generate_question("Paris is the capital city of France"))
This model is trained and evaluated on the SQUAD dataset
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.9322 | 1.0 | 10950 | 3.1334 |
| 2.6046 | 2.0 | 21900 | 3.1102 |
| 2.3742 | 3.0 | 32850 | 3.1315 |
Base model
facebook/bart-large