Open-weight model · Question answering
distilbert-base-cased-distilled-squad
by Joshua Xenova/distilbert-base-cased-distilled-squad
https://huggingface.co/distilbert-base-cased-distilled-squad with ONNX weights to be compatible with Transformers.js.
Model Card
https://huggingface.co/distilbert-base-cased-distilled-squad with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).
Excerpt from the card by Joshua.
Configuration
- Architecture
- DistilBertForQuestionAnswering
- Context length (tokens)
- 512
- Vocabulary size
- 28,996
- Model type
- distilbert
Identity and Version
- Repository
- Xenova/distilbert-base-cased-distilled-squad
- Publisher
- Joshua
- Task
- Question answering
- Modality
- Text
- Library
- transformers.js
- Parameters
- Not stated by the source
- Languages
- Not stated by the source
- Revision
- bdbb0a5e9c617c3c7ea9f3cbaf2be3ad871bcd7d
- First published
- 2023-05-02
- Last updated
- 2025-07-11
Files and Weights
15 files, 891.3 MB in total. The weights are 8 files totalling 890.4 MB in onnx.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| onnx/model.onnx | Weights | 260.9 MB | 02086cd2f9c4 |
| onnx/model_bnb4.onnx | Weights | 114.9 MB | 28094b5df5b2 |
| onnx/model_fp16.onnx | Weights | 130.6 MB | 35b9c47294fe |
| onnx/model_int8.onnx | Weights | 65.6 MB | e572df4912fd |
| onnx/model_q4.onnx | Weights | 117.6 MB | 8a1e0d82fe44 |
| onnx/model_q4f16.onnx | Weights | 69.5 MB | 9aada1202c05 |
| onnx/model_quantized.onnx | Weights | 65.8 MB | fb134f63a53c |
| onnx/model_uint8.onnx | Weights | 65.6 MB | ec575836e440 |
| config.json | Configuration | 569 B | — |
| special_tokens_map.json | Configuration | 125 B | — |
| README.md | Documentation | 1.2 KB | — |
| .gitattributes | Repository | 1.5 KB | — |
| tokenizer.json | Tokenizer | 668.9 KB | — |
| tokenizer_config.json | Tokenizer | 321 B | — |
| vocab.txt | Tokenizer | 213.4 KB | — |
License and Download
- License
- Not stated by the source
- Access
- Open weights, no gate
- Download size
- 890.4 MB
Released by Joshua through its official repository on Hugging Face.
Built From
- Derived from distilbert/distilbert-base-cased-distilled-squad
- Quantized from distilbert/distilbert-base-cased-distilled-squad
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 890.4 MB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About distilbert-base-cased-distilled-squad
What is distilbert-base-cased-distilled-squad's context length?
512 tokens, from the maximum position embeddings in its published configuration.
Similar Models
Splinter-base is the pretrained model discussed in the paper Few-Shot Question Answering by Pretraining Span Selection (at ACL 2021). Its original repository can be found here. The model is case-sensitive. Note: This model doesn't contain the pretrained weights for the QASS layer (see paper for details), and therefore the QASS layer is randomly initialized upon loading it. For the model with those weights, see tau/splinter-base-qass. Splinter is a model that is pretrained in a self-supervised fashion for few-shot question answering. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an…
This model can be used for the task of question answering. The model should not be used to intentionally create hostile or alienating environments for people. Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. The model creators note in the associated paper: The model creators note in the associated paper: The model…
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).
This model can be used for the task of Question Answering on Legal Documents. Read: An Open Source Contractual Language Understanding Application Using Machine Learning for detailed information on training procedure, dataset preprocessing and evaluation. See CUAD dataset card for more information. See CUAD dataset card for more information. Used V100/P100 from Google Colab Pro Python, Transformers Mohammed Rakib in collaboration with Ezi Ozoani and the Hugging Face team Use the code below to get started with the model.