Instructions to use adsabs/astroBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adsabs/astroBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="adsabs/astroBERT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForPreTraining tokenizer = AutoTokenizer.from_pretrained("adsabs/astroBERT") model = AutoModelForPreTraining.from_pretrained("adsabs/astroBERT", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Download Tutorials/1_Fill-Mask.ipynb from adsabs/astroBERT: direct link, hf CLI and curl.
- Browser
- Download file 15.7 kB
-
https://huggingface.co/adsabs/astroBERT/resolve/refs%2Fpr%2F1/Tutorials/1_Fill-Mask.ipynb
- Command line
-
hf download hf://adsabs/astroBERT@refs/pr/1/Tutorials/1_Fill-Mask.ipynb
-
curl -L -o 1_Fill-Mask.ipynb https://huggingface.co/adsabs/astroBERT/resolve/refs%2Fpr%2F1/Tutorials/1_Fill-Mask.ipynb
15.7 kB