Instructions to use ltg/norbert3-base_sentence-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ltg/norbert3-base_sentence-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ltg/norbert3-base_sentence-sentiment", trust_remote_code=True)# Load model directly from transformers import AutoModelForTokenClassification model = AutoModelForTokenClassification.from_pretrained("ltg/norbert3-base_sentence-sentiment", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Error with config class
I tried using the model with the code shown in the model card, but when I run it i get this error message:
ValueError: The model class you are passing has a config_class attribute that is not consistent with the config class you passed
(model has <class 'transformers_modules.ltg.norbert3-base.fe70aec6f8581f0c373302ec0bb4608d5d435900.configuration_norbert.NorbertConfig'>
and you passed <class 'transformers_modules.ltg.norbert3-base_sentence-sentiment.e6dd33908d219f7552556f6ff97bd6b490318467.configuration_norbert.NorbertConfig'>. Fix one of those so they match!
An idea how to fix this?
Thank you! I have now cleaned up the config.json, and it works OK for me now. Make sure you are getting the newest version if you try again.