Text Classification
Transformers
PyTorch
TensorFlow
JAX
Safetensors
English
roberta
autogenerated-modelcard
text-embeddings-inference
Instructions to use FacebookAI/roberta-large-mnli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FacebookAI/roberta-large-mnli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="FacebookAI/roberta-large-mnli")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("FacebookAI/roberta-large-mnli") model = AutoModelForSequenceClassification.from_pretrained("FacebookAI/roberta-large-mnli") - Inference
- Notebooks
- Google Colab
- Kaggle
Some weights of the model checkpoint at roberta-large-mnli were not used
#7
by tomhosking - opened
Loading the model using the recommended approach results in the error "Some weights of the model checkpoint at roberta-large-mnli were not used":
from transformers import AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("roberta-large-mnli")
Some weights of the model checkpoint at roberta-large-mnli were not used when initializing RobertaForSequenceClassification: ['roberta.pooler.dense.bias', 'roberta.pooler.dense.weight']
- This IS expected if you are initializing RobertaForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing RobertaForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Should a different model be used to load this checkpoint? Or can the weights be safely removed from the checkpoint?
Tested on transformers==4.36.2
Hi @tomhosking
You can ignore this warning. Everything is fine for using this checkpoint for sequence classification`task.
OK, thanks! Is there a way to disable the error message?
Hi @tomhosking
There is currently no way to disable the warning just for this combination model/checkpoint.
(we didn't have this warning several months back but a merged PR make this appear)