rajpurkar/squad_v2
Viewer • Updated • 142k • 68.6k • 259
How to use trevorkwan/clinical_longformer_squadv2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="trevorkwan/clinical_longformer_squadv2") # Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("trevorkwan/clinical_longformer_squadv2")
model = AutoModelForQuestionAnswering.from_pretrained("trevorkwan/clinical_longformer_squadv2", device_map="auto")This model is a fine-tuned version of yikuan8/Clinical-Longformer on the squad_v2 dataset using a max_seq_length of 320.
More information needed
More information needed
More information needed
Tuning script used:
set BASE_MODEL=yikuan8/Clinical-Longformer
set OUTPUT_DIR=U:\Documents...
python run_qa.py ^
--model_name_or_path %BASE_MODEL% ^
--dataset_name squad_v2 ^
--do_train ^
--do_eval ^
--version_2_with_negative ^
--per_device_train_batch_size 4 ^
--per_device_eval_batch_size 4 ^
--gradient_accumulation_steps 4 ^
--learning_rate 2e-5 ^
--num_train_epochs 3 ^
--max_seq_length 320 ^
--doc_stride 128 ^
--weight_decay 0.01 ^
--fp16 ^
--output_dir %OUTPUT_DIR% ^
--overwrite_output_dir
The following hyperparameters were used during training:
Base model
yikuan8/Clinical-Longformer