Instructions to use NbAiLab/roberta_des_ada_128_6e4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NbAiLab/roberta_des_ada_128_6e4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="NbAiLab/roberta_des_ada_128_6e4")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("NbAiLab/roberta_des_ada_128_6e4") model = AutoModelForMaskedLM.from_pretrained("NbAiLab/roberta_des_ada_128_6e4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download generate_pytorch_model.py from NbAiLab/roberta_des_ada_128_6e4: direct link, hf CLI and curl.
- Browser
- Download file 256 Bytes
-
https://huggingface.co/NbAiLab/roberta_des_ada_128_6e4/resolve/main/generate_pytorch_model.py
- Command line
-
hf download hf://NbAiLab/roberta_des_ada_128_6e4/generate_pytorch_model.py
-
curl -L -o generate_pytorch_model.py https://huggingface.co/NbAiLab/roberta_des_ada_128_6e4/resolve/main/generate_pytorch_model.py
256 Bytes
| # This script overwrites any existing PyTorch model. Generates a new one with an LM head from the pretrained Flax model. | |
| from transformers import RobertaForMaskedLM | |
| model = RobertaForMaskedLM.from_pretrained(".",from_flax=True) | |
| model.save_pretrained(".") | |