Views
No views yet
deepset/minilm-uncased-squad2 on the SQuAD v2 dataset for extractive question answering.1from transformers import pipeline
2
3qa = pipeline("question-answering", model="qusai00/minilm-squad2-finetuned-v1")
4
5context = "The Virgin Mary allegedly appeared to Saint Bernadette Soubirous in 1858 in Lourdes, France."
6question = "To whom did the Virgin Mary appear in 1858?"
7
8result = qa(question=question, context=context)
9print(result)
10# Example output:
11# {'score': 0.9919, 'start': 47, 'end': 64, 'answer': 'Saint Bernadette'}
12
13
14=======================================================
15=======================================================
16
17Training Setup
18
19Framework: Hugging Face Transformers
20Hardware: NVIDIA RTX 4080, 64GB RAM
21Precision: fp16 mixed precision
22Hyperparameters:
23Learning rate: 3e-5
24Batch size: 16
25Epochs: 3–5 (with early stopping)
26Weight decay: 0.01
27Max sequence length: 384
28Stride: 128
29
30=======================================================
31=======================================================
32
33Performance
34Qualitative results (manual evaluation):
35
36High-confidence answers on factual questions
37Example: Historical and geographical questions → correct short answers with confidence > 0.95
38Minor issues: Occasionally adds small extra words (e.g., "Paris is" instead of "Paris") — common in small distilled models
39
40Quantitative metrics (F1 / Exact Match) not computed in final run due to evaluation setup, but manual testing shows strong performance for the training size.
41Intended Use & Limitations
42
43Intended: Extractive QA on English factual text (answer span inside context).
44Not intended for: Generative answers, non-English text, very long documents, open-domain QA.
45Limitations:
46Trained on subset only → may struggle with rare topics or very complex contexts
47Small distilled model → occasional minor word additions or misses
48
49=======================================================
50=======================================================
51
52Citation
53bibtex@misc{qusai00-minilm-squad2,
54 author = {Qusai},
55 title = {Fine-tuned MiniLM on SQuAD v2 for Question Answering},
56 year = {2026},
57 publisher = {Hugging Face},
58 howpublished = {\url{https://huggingface.co/qusai00/minilm-squad2-finetuned-v1}}
59}
60
61
62Thank you for using the model!
63Feedback, questions, or suggestions are welcome.