Downloads · 30 days
13
34% of all-time downloads
HariomSahu/distilbert-squad-qa
distilbert-squad-qa is a question answering model from HariomSahu. Use it when the input is a question plus a passage. It is set up for transformers.
This model is a fine-tuned version of distilbert-base-uncased on the SQuAD dataset.
Downloads · 30 days
13
34% of all-time downloads
All-time downloads
38
Public
Parameters
66.4M
531 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors265 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of distilbert-base-uncased on the SQuAD dataset.
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("HariomSahu/distilbert-squad-qa")
model = AutoModelForQuestionAnswering.from_pretrained("HariomSahu/distilbert-squad-qa")
# Example usage
question = "What is the capital of France?"
context = "France is a country in Europe. Its capital city is Paris."
inputs = tokenizer(question, context, return_tensors="pt")
outputs = model(**inputs)
# Get answer
start_scores, end_scores = outputs.start_logits, outputs.end_logits
start_index = start_scores.argmax()
end_index = end_scores.argmax()
answer = tokenizer.decode(inputs["input_ids"][0][start_index:end_index+1])
print(f"Answer: {answer}")
The model achieved the following results on the evaluation set:
Config Hash: fe08f7bd
This hash can be used to reproduce the exact training configuration.