Run this model with HF Jobs
Run rIsHu009/distilbert-squad-v1-question-answering 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/rIsHu009/distilbert-squad-v1-question-answering. 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/rIsHu009/distilbert-squad-v1-question-answering 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 rIsHu009/distilbert-squad-v1-question-answering with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rIsHu009/distilbert-squad-v1-question-answering 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="rIsHu009/distilbert-squad-v1-question-answering")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("rIsHu009/distilbert-squad-v1-question-answering") model = AutoModelForQuestionAnswering.from_pretrained("rIsHu009/distilbert-squad-v1-question-answering", device_map="auto") - Notebooks
- Google Colab
- Kaggle
DistilBERT SQuAD v1 — Question Answering
A DistilBERT extractive question-answering model fine-tuned on SQuAD v1.1 as part of my hands-on study of the Hugging Face Transformers ecosystem.
Given a question and a context passage, the model predicts the span of text containing the answer.
Question + Context
↓
DistilBERT encoder
↓
start / end token scores
↓
extracted answer span
This repository is preserved as an educational fine-tuning artifact from my Hugging Face NLP learning progression.
Model Details
| Property | Value |
|---|---|
| Task | Extractive Question Answering |
| Architecture | DistilBERT |
| Base model | distilbert-base-uncased |
| Dataset | SQuAD v1.1 |
| Language | English |
| Transformer layers | 6 |
| Hidden size | 768 |
| Attention heads | 12 |
| Maximum sequence length | 512 |
| Vocabulary size | 30,522 |
| License | Apache 2.0 |
The checkpoint contains a genuine question-answering head:
qa_outputs.weight → [2, 768]
qa_outputs.bias → [2]
corresponding to start- and end-position prediction over the input sequence.
Training Approach
The original experiment follows the task-specific distillation setup described for DistilBERT.
A pretrained DistilBERT student is adapted to SQuAD v1.1 while a BERT model fine-tuned for question answering acts as the teacher during the task-specific distillation process.
Historical experiment configuration:
- Student:
distilbert-base-uncased - Teacher:
lewtun/bert-base-uncased-finetuned-squad-v1 - Training dataset: SQuAD v1.1
- Task: extractive question answering
Evaluation
The preserved experiment reports the following SQuAD evaluation results:
| Model | Exact Match | F1 |
|---|---|---|
| DistilBERT paper reference | 79.1 | 86.9 |
| This checkpoint | 78.4 | 86.5 |
The scores were calculated using the SQuAD evaluation metric.
These historical results are retained from the original experiment documentation rather than recomputed during this model-card cleanup.
Quick Start
from transformers import pipeline
qa = pipeline(
"question-answering",
model="rIsHu009/distilbert-squad-v1-question-answering",
)
result = qa(
question="Who developed the Transformer architecture?",
context=(
"The Transformer architecture was introduced "
"by researchers at Google in the 2017 paper "
"'Attention Is All You Need'."
),
)
print(result)
The pipeline returns the extracted answer together with its confidence score and character offsets.
Direct Model Usage
from transformers import (
AutoTokenizer,
AutoModelForQuestionAnswering,
)
MODEL_ID = "rIsHu009/distilbert-squad-v1-question-answering"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForQuestionAnswering.from_pretrained(
MODEL_ID
)
Intended Use
This model is suitable for:
- learning extractive question answering;
- experimenting with Hugging Face QA pipelines;
- studying task-specific Transformer fine-tuning;
- exploring knowledge distillation;
- educational SQuAD experiments;
- building baseline extractive-QA applications.
Limitations
This is an extractive QA model.
It selects an answer span from the supplied context and therefore does not behave like a generative question-answering system.
Important limitations include:
- answers must generally be represented in the supplied context;
- performance can degrade outside SQuAD-style English text;
- the model may return a plausible span even when the context does not contain a reliable answer;
- evaluation results on SQuAD do not imply equivalent performance on other domains;
- the underlying pretrained model may reproduce biases present in its training data.
The model should be evaluated on domain-specific data before use in consequential applications.
Repository Safety
The repository includes a safetensors representation of the model weights for safer and faster loading.
The original PyTorch checkpoint is retained for historical compatibility.
Learning Context
This model was created during hands-on work with the Hugging Face NLP/LLM learning material.
It represents the question-answering stage of a broader learning progression that also includes:
- sentiment classification;
- named-entity recognition;
- machine translation;
- causal language modeling;
- tokenizer training;
- dataset processing;
- accelerated training workflows.
These repositories are being preserved and documented as reproducible learning artifacts rather than presented as production models.
Dataset
SQuAD v1.1 — Stanford Question Answering Dataset
SQuAD consists of questions associated with Wikipedia passages, where the answer to each question is represented by a span within the corresponding context.
Dataset on Hugging Face:
rajpurkar/squad
References
DistilBERT
Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf.
DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter.
https://arxiv.org/abs/1910.01108
SQuAD
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang.
SQuAD: 100,000+ Questions for Machine Comprehension of Text.
https://arxiv.org/abs/1606.05250
Citation
@article{sanh2019distilbert,
title={DistilBERT, a distilled version of BERT:
smaller, faster, cheaper and lighter},
author={Sanh, Victor and Debut, Lysandre and
Chaumond, Julien and Wolf, Thomas},
journal={arXiv preprint arXiv:1910.01108},
year={2019}
}
Author
Naman Chanana
- Hugging Face:
rIsHu009 - GitHub:
Rishy-09
Educational Transformer artifact preserved and documented as part of an ongoing study of NLP, LLMs, and modern deep-learning systems.
- Downloads last month
- 15
Model tree for rIsHu009/distilbert-squad-v1-question-answering
Base model
distilbert/distilbert-base-uncased