Instructions to use NeuML/bert-small-cord19-squad2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuML/bert-small-cord19-squad2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="NeuML/bert-small-cord19-squad2")# Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("NeuML/bert-small-cord19-squad2") model = AutoModelForQuestionAnswering.from_pretrained("NeuML/bert-small-cord19-squad2") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("NeuML/bert-small-cord19-squad2")
model = AutoModelForQuestionAnswering.from_pretrained("NeuML/bert-small-cord19-squad2")Quick Links
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
BERT-Small CORD-19 fine-tuned on SQuAD 2.0
bert-small-cord19 model fine-tuned on SQuAD 2.0
Building the model
python run_squad.py
--model_type bert
--model_name_or_path bert-small-cord19
--do_train
--do_eval
--do_lower_case
--version_2_with_negative
--train_file train-v2.0.json
--predict_file dev-v2.0.json
--per_gpu_train_batch_size 8
--learning_rate 3e-5
--num_train_epochs 3.0
--max_seq_length 384
--doc_stride 128
--output_dir bert-small-cord19-squad2
--save_steps 0
--threads 8
--overwrite_cache
--overwrite_output_dir
- Downloads last month
- 34
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="NeuML/bert-small-cord19-squad2")