Instructions to use autoevaluate/distilbert-base-cased-distilled-squad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use autoevaluate/distilbert-base-cased-distilled-squad 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="autoevaluate/distilbert-base-cased-distilled-squad")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("autoevaluate/distilbert-base-cased-distilled-squad") model = AutoModelForQuestionAnswering.from_pretrained("autoevaluate/distilbert-base-cased-distilled-squad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from autoevaluate/distilbert-base-cased-distilled-squad: direct link, hf CLI and curl.
- Browser
- Download file 912 Bytes
-
https://huggingface.co/autoevaluate/distilbert-base-cased-distilled-squad/resolve/main/README.md
- Command line
-
hf download hf://autoevaluate/distilbert-base-cased-distilled-squad/README.md
-
curl -L -o README.md https://huggingface.co/autoevaluate/distilbert-base-cased-distilled-squad/resolve/main/README.md
912 Bytes
metadata
language: en
datasets:
- squad
metrics:
- squad
license: apache-2.0
DistilBERT base cased distilled SQuAD
Note: This model is a clone of
distilbert-base-cased-distilled-squadfor internal testing.
This model is a fine-tune checkpoint of DistilBERT-base-cased, fine-tuned using (a second step of) knowledge distillation on SQuAD v1.1. This model reaches a F1 score of 87.1 on the dev set (for comparison, BERT bert-base-cased version reaches a F1 score of 88.7).
Using the question answering Evaluator from evaluate gives:
{'exact_match': 79.54588457899716,
'f1': 86.81181300991533,
'latency_in_seconds': 0.008683730778997168,
'samples_per_second': 115.15787689073015,
'total_time_in_seconds': 91.78703433400005}
which is roughly consistent with the official score.