Instructions to use NbAiLabArchive/test_w5_long_roberta_tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NbAiLabArchive/test_w5_long_roberta_tokenizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="NbAiLabArchive/test_w5_long_roberta_tokenizer")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("NbAiLabArchive/test_w5_long_roberta_tokenizer") model = AutoModelForMaskedLM.from_pretrained("NbAiLabArchive/test_w5_long_roberta_tokenizer") - Notebooks
- Google Colab
- Kaggle
File size: 256 Bytes
fc4368e | 1 2 3 4 5 6 | # 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(".")
|