LT3
/

Model Card

Monolingual English Model Adapters for Neutral and Stance-Aware Definition Generation

The following models were trained in accordance with the methodology outlined in the paper: Stance-aware Definition Generation for Argumentative Texts.

These models are trained to generate neutral (noslang, wordnet, oxford) and biased (slang, all), stance-aware definitions.

These adapters should be used together with the base model unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit and require unsloth installation.

The models are instruction-tuned on the dictionary data: WordNet (Ishiwatari et al., 2019), Oxford (Gadet- sky et al., 2018), Wiktionary (Mickus et al., 2022), Urban Dic- tionary (Ni and Wang, 2017).

Model Training data
LT3/definitions-oxford-llama-8B-instruct Oxford
LT3/definitions-all-noslang-llama-8B-instruct WordNet, Wiki, Oxford
LT3/definitions-all-llama-8B-instruct WordNet, Wiki, Oxford, Urban
LT3/definitions-wordnet-llama-8B-instruct WordNet
LT3/definitions-slang-llama-8B-instruct Urban

How to use

The models expect a usage example and a keyword as input:

  • keyword = "death penalty"
  • example usage (argument) = "As long as death penalty is kept, this confirms that our society is founded on violence."

While we tested the models on the argumentative data to test their potential to produce stance-aware definitions, they can be used for general definition generation task for various contexts. If you want to generate neutral definitions, avoid using slang- and all- models, these models aim to capture contextual bias that reflect the attitude of the author (pro, contra) the keyword.

The following code can be used for the definition generation task:

import torch
from unsloth import FastLanguageModel
from transformers import AutoTokenizer

# Load model + adapter
BASE_MODEL = "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit"
ADAPTER_PATH = "LT3/definitions-all-llama-8B-instruct"
#ADAPTER_PATH = "LT3/definitions-slang-llama-8B-instruct"
#ADAPTER_PATH = "LT3/definitions-oxford-llama-8B-instruct"
#ADAPTER_PATH = "LT3/definitions-all-noslang-llama-8B-instruct"
#ADAPTER_PATH = "LT3/definitions-wordnet-llama-8B-instruct"

MAX_SEQ_LENGTH = 512

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name=BASE_MODEL,
    max_seq_length=MAX_SEQ_LENGTH,
    dtype="float16",  # or "bfloat16" if needed
    load_in_4bit=True
)

model.load_adapter(ADAPTER_PATH)
FastLanguageModel.for_inference(model)

# Prompt variants
PROMPTS = {
    "definition_0": "What is the definition of {keyword} in the following text?",
   # "definition_1": "What is the contextual definition of {keyword} in the following text?",
   # "definition_2": "In what sense is the {keyword} used in the following text?",
   # "definition_3": "What is the persuasive definition of {keyword} in the following text?",
   # "definition_4": "What is the emotionally charged definition of {keyword} in the following text?"
}

# Alpaca-style prompt formatting
def format_prompt(instruction, context):
    return f"""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
{instruction}

### Input:
{context}

### Response:
"""

# Clean model output
def clean_response(response):
    return response.split("### Response:")[-1].strip()

# Your example input
keyword = "death penalty"
argument = "As long as death penalty is kept, this confirms that our society is founded on violence."

# Generate for each prompt variant
print(f"\n Argument:\n{argument}\n")
for name, template in PROMPTS.items():
    instruction = template.format(keyword=keyword)
    prompt = format_prompt(instruction, argument)

    inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
    outputs = model.generate(
        **inputs,
        max_new_tokens=100,
        do_sample=True,
        temperature=0.7,
        use_cache=True
    )

    decoded = tokenizer.decode(outputs[0], skip_special_tokens=True)
    definition = clean_response(decoded)

    print(f" {name}:\n{definition}\n")

Model Performance

The best model for the general definition generation task is oxford-llama. The lower plausibility score for slang- and all- models means the definitions are biased. These models can be further used to explore the generation of contextual definitions that capture stance-related bias (pro or contra the keyword).

The plausibility score is based on human annotations.

Model BERTScoreF1 [%] Plausibility [%]
LT3/definitions-oxford-llama-8B-instruct 88.2 84.5
LT3/definitions-all-noslang-llama-8B-instruct 86.0 79.8
LT3/definitions-all-llama-8B-instruct 86.5 53.25
LT3/definitions-wordnet-llama-8B-instruct 87.0 43.00
LT3/definitions-slang-llama-8B-instruct 86.8 37.25

BibTeX entry and citation info

If you use our models, feel free to copy the following BibTeX code to cite the paper:

@inproceedings{evgrafova-etal-2025-stance,
    title = "Stance-aware Definition Generation for Argumentative Texts",
    author = "Evgrafova, Natalia  and
      De Langhe, Loic
and
 Hoste, Veronique and
      Lefever, Els  ",
    editor = "Chistova, Elena  and
      Cimiano, Philipp  and
      Haddadan, Shohreh  and
      Lapesa, Gabriella  and
      Ruiz-Dolz, Ramon",
    booktitle = "Proceedings of the 12th Argument mining Workshop",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.argmining-1.16/",
    doi = "10.18653/v1/2025.argmining-1.16",
    pages = "168--180",
    ISBN = "979-8-89176-258-9",
    abstract = "Definition generation models trained on dictionary data are generally expected to produce neutral and unbiased output while capturing the contextual nuances. However, previous studies have shown that generated definitions can inherit biases from both the underlying models and the input context. This paper examines the extent to which stance-related bias in argumentative data influences the generated definitions. In particular, we train a model on a slang-based dictionary to explore the feasibility of generating persuasive definitions that concisely reflect opposing parties' understandings of contested terms. Through this study, we provide new insights into bias propagation in definition generation and its implications for definition generation applications and argument mining."
}
Downloads last month
16
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for LT3/definitions-all-llama-8B-instruct

Collection including LT3/definitions-all-llama-8B-instruct