Instructions to use microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract") model = AutoModelForMaskedLM.from_pretrained("microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
add model_max_length
#4
by alistairewj - opened
model_max_length is present in the BERT base tokenizer config, but not here, and it should be
without this, the model_max_length for the tokenizer defaults to a very large int, and inference crashes if not handled properly