Question Answering
Transformers
TensorBoard
Safetensors
English
bert
Generated from Trainer
extractive_QA
Run this model with HF Jobs
Run hf-tuner/bert-mini-squadv2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/hf-tuner/bert-mini-squadv2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/hf-tuner/bert-mini-squadv2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use hf-tuner/bert-mini-squadv2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-tuner/bert-mini-squadv2 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="hf-tuner/bert-mini-squadv2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("hf-tuner/bert-mini-squadv2") model = AutoModelForQuestionAnswering.from_pretrained("hf-tuner/bert-mini-squadv2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files23 unmodified lines2425262728293031323334353623 unmodified linesThis model is a fine-tuned version of [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) on[hf-tuner/squad_v2.0.1](https://huggingface.co/datasets/hf-tuner/squad_v2.0.1) dataset.It achieves the following results on the evaluation set:- Loss: 1.4653## Model descriptionMiniLMv1-L12-H384-uncased: 12-layer, 384-hidden, 12-heads, 33M parameters, 2.7x faster than BERT-Base## How to use```python23 unmodified lines242526272829303132333435363738394041424344454647484950515253545556575859606162636465666723 unmodified linesThis model is a fine-tuned version of [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) on[hf-tuner/squad_v2.0.1](https://huggingface.co/datasets/hf-tuner/squad_v2.0.1) dataset.It achieves the following results on the evaluation set:- Loss: 1.4653- Exact Match Accuracy: 60.94%## Evaluation Notes#### Issues with Exact Match EvaluationSeveral correct predictions were incorrectly marked as false negatives due to strict exact-match criteria being sensitive to minor differences in tokenization, formatting, or span boundaries:- Predicted: `isaac bashevis` → Rejected (expected: `isaac bashevis singer`)- Predicted: `newtonian equations` → Rejected (expected: `newtonian`)- Predicted: `80,000` → Rejected (expected: `80, 000`)#### Overall Performance- Exact-match accuracy: **>60%**- The model frequently generates high-quality and semantically correct answer spans even when exact-match evaluation penalizes them.- Primary limitation: performance drops on questions requiring deep domain-specific knowledge, largely attributable to the model's relatively small size and limited parameter capacity.#### Recommendations for Best Results- Use clear, straightforward phrasing in queries to maximize extraction accuracy.## Model descriptionMiniLMv1-L12-H384-uncased: 12-layer, 384-hidden, 12-heads, 33M parameters, 2.7x faster than BERT-Base#### Direct Use- Extractive Question Answering: Given a passage and a question, the model extracts the most likely span of text that answers the question.- Handles unanswerable questions by predicting "no answer" when appropriate.#### Downstream UseCan be integrated into chatbots, virtual assistants, or search systems that require question answering over text.#### Out-of-Scope Use- Generative question answering (the model cannot generate new answers).- Non-English tasks (the model was trained only on English data).- Open-Domain QA across large corpora — works best when the context passage is provided.## How to use```python
README.md+31