Model Card for Ministral-3-8B-Instruct-2512_DimABSA-German

Ministral 3 8B Instruct 2512, finetuned on human-annotated data for performing Dimensional Aspect-Based Sentiment Analysis on German texts. This repository contains two revisions:

  • Stage1: The base model, finetuned using human-annotated data only.
  • Stage2: The base model, finetuned using human-annotated and synthetically annotated data.

Model details

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import pipeline

text_to_annotate = "Solange Berlin - nach 25 Jahren sozialdemokratischer Schulsenatoren - in aller Regel einen "
                   "der Schlussplätze im Bildungsvergleich belegt, müssen sich Schulen auf ihre Kernaufgabe "
                   "konzentrieren. Kindern muss vermittelt werden, dass Menschen andersartig, aber gleichwertig "
                   "sind."

generator = pipeline(
    "text-generation",
    model="sandh/Ministral-3-8B-Instruct-2512_DimABSA-German",
    revision="Stage1",  # or "Stage2"
    device="cuda"
)
output = generator(
    [{"role": "system",
      "content": "Du bist ein spezialisiertes Modell zur Sentimentanalyse politischer Texte.\n"
                 "Das Ausgabeformat ist ein JSON-Array aus 0 oder mehr Objekten, wobei jedes Objekt genau die "
                 "folgenden Felder enthält:\n"
                 "- Aspekt (string oder 'NULL'): Das genaue Wort oder die genaue Phrase im Text, das/ die "
                 "eine bestimmte Entität/ Idee oder ein bestimmtes Ereignis/ Thema bezeichnet, die/ das von "
                 "öffentlichem Interesse ist. Der Aspektbegriff ist 'NULL', falls kein expliziter Aspekt "
                 "vorhanden ist.\n"
                 "- Sentimentbegriff (string oder 'NULL'): Das genaue Wort oder die genaue Phrase im Text, "
                 "das/ die das Sentiment/ die Einstellung/ Haltung gegenüber dem Aspekt zum Ausdruck bringt. "
                 "Der Sentimentbegriff ist 'NULL', falls das Sentiment/ die Einstellung/ Haltung nicht explizit "
                 "ausgedrückt wird.\n"
                 "- Valenz (Zahl): Wert, der den den Grad der Positivität oder Negativität misst. Ein Wert von "
                 "1.00 steht für eine extrem negative Valenz, 9.00 für eine extrem positive Valenz und 5.00 für "
                 "eine neutrale Valenz. Der Valenzwert muss auf genau zwei Dezimalstellen gerundet sein.\n"
                 "- Erregung (Zahl): Wert, der die Intensität des Sentiments/ der Emotion misst. Ein Wert von "
                 "1.00 steht für sehr geringe Erregung, 9.00 für sehr hohe Erregung und 5.00 für mittlere "
                 "Erregung. Der Erregungswert muss auf genau zwei Dezimalstellen gerundet sein.\n"
                 "Gib NUR das JSON-Array zurück und formatiere es NICHT als Codeblock (```json ... ```)."},
     {"role": "user",
      "content": f"Text: {text_to_annotate}"}],
    max_new_tokens=512, return_full_text=False
    )[0]
print(output["generated_text"])
# [{"Aspect": "Schulen",
#   "Opinion": "auf ihre Kernaufgabe konzentrieren",
#   "Valence": 5.40,
#   "Arousal": 3.80}]

Training Details

Framework versions

  • Datasets: 4.3.0
  • PEFT 0.19.1
  • Pytorch: 2.7.1+cu118
  • Tokenizers: 0.22.2
  • Transformers: 5.5.0
  • TRL: 0.24.0

Training Data

  • Stage1: The train-split of the sandh/SemEval-2026 dataset was used for finetuning. The training data exclusively contains human-annotated German political texts.
  • Stage2:: Additionally, the train-split of the sandh/AfD-CCC dataset was used for finetuning. This data exclusively contains synthetically labeled German texts, focusing on

Training Procedure

Visualize in Weights & Biases

This model was trained with SFT.

LoRA Parameters

  • rank: 16
  • alpha: 32
  • dropout: 0.05
  • bias: none
  • target_modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
  • use_rslora: true

Training Hyperparameters

  • seed: 42
  • max_length: 1024
  • packing: true
  • assistant_only_loss: false
  • gradient_checkpointing: true
  • per_device_train_batch_size: 2
  • gradient_accumulation_steps: 4
  • num_train_epochs: 1
  • learning_rate: 2e-5
  • lr_scheduler_type: "linear"
  • weight_decay: 0.001
  • warmup_steps: 5
  • optim: "adamw_8bit"
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sandh/Ministral-3-8B-Instruct-2512_DimABSA-German

Datasets used to train sandh/Ministral-3-8B-Instruct-2512_DimABSA-German