Question Answering
Transformers
PyTorch
TensorFlow
JAX
Rust
Safetensors
English
roberta
Eval Results (legacy)
Instructions to use deepset/roberta-base-squad2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepset/roberta-base-squad2 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="deepset/roberta-base-squad2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2") model = AutoModelForQuestionAnswering.from_pretrained("deepset/roberta-base-squad2", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +1 -3
config.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
| 5 |
"attention_probs_dropout_prob": 0.1,
|
| 6 |
"bos_token_id": 0,
|
| 7 |
"do_sample": false,
|
| 8 |
-
"eos_token_ids": 0,
|
| 9 |
"finetuning_task": null,
|
| 10 |
"hidden_act": "gelu",
|
| 11 |
"hidden_dropout_prob": 0.1,
|
|
@@ -36,7 +35,6 @@
|
|
| 36 |
"output_attentions": false,
|
| 37 |
"output_hidden_states": false,
|
| 38 |
"output_past": true,
|
| 39 |
-
"pad_token_id": 0,
|
| 40 |
"pruned_heads": {},
|
| 41 |
"repetition_penalty": 1.0,
|
| 42 |
"temperature": 1.0,
|
|
@@ -46,4 +44,4 @@
|
|
| 46 |
"type_vocab_size": 1,
|
| 47 |
"use_bfloat16": false,
|
| 48 |
"vocab_size": 50265
|
| 49 |
-
}
|
|
|
|
| 5 |
"attention_probs_dropout_prob": 0.1,
|
| 6 |
"bos_token_id": 0,
|
| 7 |
"do_sample": false,
|
|
|
|
| 8 |
"finetuning_task": null,
|
| 9 |
"hidden_act": "gelu",
|
| 10 |
"hidden_dropout_prob": 0.1,
|
|
|
|
| 35 |
"output_attentions": false,
|
| 36 |
"output_hidden_states": false,
|
| 37 |
"output_past": true,
|
|
|
|
| 38 |
"pruned_heads": {},
|
| 39 |
"repetition_penalty": 1.0,
|
| 40 |
"temperature": 1.0,
|
|
|
|
| 44 |
"type_vocab_size": 1,
|
| 45 |
"use_bfloat16": false,
|
| 46 |
"vocab_size": 50265
|
| 47 |
+
}
|