Instructions to use FacebookAI/roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FacebookAI/roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="FacebookAI/roberta-base")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("FacebookAI/roberta-base") model = AutoModelForMaskedLM.from_pretrained("FacebookAI/roberta-base") - Inference
- Notebooks
- Google Colab
- Kaggle
Shouldn't model.tensors have the LM head like pytorch_model.bin does?
#8
by DrRayStorm - opened
For parity it seems so but maybe I'm missing something.
Same here. I tried to import both model.safetensors and pytorch_model.bin, and it seems that model.safetensors doesn't have the model head:
"Some weights of RobertaModel were not initialized from the model checkpoint at homedata/models/llm_encoders/roberta-base and are newly initialized: ['roberta.pooler.dense.bias', 'roberta.pooler.dense.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference."
no problem with pytorch_model.bin file.