Instructions to use cnut1648/biolinkbert-mednli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cnut1648/biolinkbert-mednli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="cnut1648/biolinkbert-mednli")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cnut1648/biolinkbert-mednli") model = AutoModelForSequenceClassification.from_pretrained("cnut1648/biolinkbert-mednli", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -47,6 +47,19 @@ The labels are
|
|
| 47 |
|
| 48 |
## Training procedure
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
### Training hyperparameters
|
| 51 |
|
| 52 |
The following hyperparameters were used during training:
|
|
|
|
| 47 |
|
| 48 |
## Training procedure
|
| 49 |
|
| 50 |
+
This model checkpoint is made by [mednli.py](https://huggingface.co/cnut1648/biolinkbert-mednli/blob/main/mednli.py) by the following command:
|
| 51 |
+
```shell
|
| 52 |
+
root=/path/to/mednli/;
|
| 53 |
+
python mednli.py \
|
| 54 |
+
--model_name_or_path michiyasunaga/BioLinkBERT-large \
|
| 55 |
+
--do_train --train_file ${root}/mli_train_v1.jsonl \
|
| 56 |
+
--do_eval --validation_file ${root}/mli_dev_v1.jsonl \
|
| 57 |
+
--do_predict --test_file ${root}/mli_test_v1.jsonl \
|
| 58 |
+
--max_seq_length 512 --fp16 --per_device_train_batch_size 16 --gradient_accumulation_steps 2 \
|
| 59 |
+
--learning_rate 3e-5 --warmup_ratio 0.5 --num_train_epochs 10 \
|
| 60 |
+
--output_dir ./biolinkbert_mednli
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
### Training hyperparameters
|
| 64 |
|
| 65 |
The following hyperparameters were used during training:
|