squad2-qa-onnx
MiniLMv2-L12-H384 (distilled from RoBERTa-large) fine-tuned on SQuAD 2.0 with knowledge distillation from
deepset/roberta-large-squad2, exported to ONNX for
transformers.js. onnx/model_quantized.onnx is int8 (39 mb), onnx/model_fp16.onnx is for webgpu,
onnx/model.onnx is fp32. pytorch weights: squad2-qa-student.
SQuAD 2.0 dev (half held out from tuning, int8 model): EM 80.1, F1 83.1, HasAns F1 81.2, NoAns accuracy 85.0.
the model outputs start / end logits. an answer is the span with the best start + end score, and the
question is treated as unanswerable when that score does not beat the null score (cls start + cls end)
by more than thr in calib.json, which also holds the coefficients that turn scores into probabilities.
live demo: https://nlp-cv-lab.vercel.app/p/question-answering,
code: https://github.com/manasrpandya/NLP_CV_Lab/tree/main/projects/04-question-answering