Text Classification
Transformers
Safetensors
English
me2bert
feature-extraction
Moral Foundation Prediction
MFT
Morality
Morality Values
BERTForMoralPrediction
Emotions
Events
https://aclanthology.org/2025.coling-main.638.pdf
custom_code
Instructions to use lorenzozan/ME2-BERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lorenzozan/ME2-BERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="lorenzozan/ME2-BERT", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lorenzozan/ME2-BERT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_me2bert.py
Browse files- modeling_me2bert.py +1 -1
modeling_me2bert.py
CHANGED
|
@@ -149,7 +149,7 @@ class ME2BertModel(PreTrainedModel):
|
|
| 149 |
|
| 150 |
def forward(self,
|
| 151 |
input_ids,
|
| 152 |
-
attention_mask, return_dict=False):
|
| 153 |
|
| 154 |
_, pooler_output = self.gen_feature_embeddings(
|
| 155 |
input_ids, attention_mask)
|
|
|
|
| 149 |
|
| 150 |
def forward(self,
|
| 151 |
input_ids,
|
| 152 |
+
attention_mask, return_dict=False, **kwargs):
|
| 153 |
|
| 154 |
_, pooler_output = self.gen_feature_embeddings(
|
| 155 |
input_ids, attention_mask)
|