Migration Stance Classification Model

This model categorizes the stance expressed in text regarding migration into three categories: Positive, Negative, or Neutral.

Model Description

This model is fine-tuned to detect stance in migration-related content. It can identify whether a text expresses support for migration (positive), opposition to migration (negative), or presents factual/neutral information.

Key Features:

  • 3-class classification: POSITIVE, NEGATIVE, NEUTRAL
  • Domain-specific: Optimized for migration and immigration discourse in Slovakia

Labels

  • 0 - NEGATIVE: Text expressing opposition, concerns, or negative views about migration
  • 1 - NEUTRAL: Factual statements, balanced reporting, or no clear stance
  • 2 - POSITIVE: Text expressing support, benefits, or positive views about migration

Usage

Basic Usage

from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch

# Load model and tokenizer
model_name = "MIMEDIS/stance-model"
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Prepare input
text = "Migrácia obohacuje našu spoločnosť o nové perspektívy a kultúry."
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=512)

# Get predictions
with torch.no_grad():
    outputs = model(**inputs)
    predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
    predicted_class = torch.argmax(predictions, dim=-1).item()

# Map class to label
labels = {0: "NEGATIVE", 1: "NEUTRAL", 2: "POSITIVE"}

print(f"Text: {text}")
print(f"Predicted stance: {labels[predicted_class]}")
print(f"Confidence: {predictions[0][predicted_class]:.4f}")
print(f"All probabilities: NEGATIVE={predictions[0][0]:.4f}, NEUTRAL={predictions[0][1]:.4f}, POSITIVE={predictions[0][2]:.4f}")
Downloads last month
9
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MIMEDIS/stance-model

Finetuned
(23)
this model

Dataset used to train MIMEDIS/stance-model

Collection including MIMEDIS/stance-model