Part of FrameLLaMA — ACL 2026

This model is part of FrameLLaMA, a framework that injects frame-semantic knowledge from FrameNet 1.7 into Llama-3.1-8B-Instruct with LoRA, and tests whether this knowledge improves event-level reasoning.


Task Description

Llama-3.1-8B-Instruct fine-tuned on question–answer data built from the full FrameNet 1.7 inventory. Instead of memorising isolated facts, the training data teach the principles behind frames: what situation a frame describes, which participants (frame elements) it has and what they can be, which words evoke it, and how frames relate to each other. Natural language inference (NLI) is used to test whether this knowledge transfers to event-level reasoning, and semantic role labeling (SRL) to test frame and role sensitivity.

Dataset Summary

  • Total samples: more than 491,000 instruction–answer pairs
  • Frames: the full FrameNet 1.7 inventory (1,221 frames)
  • Task families: 40, with open, yes/no and multiple-choice questions
  • Content: frame definitions, frame elements and their semantic types, lexical units and their senses, annotated examples, frame-to-frame relations (inheritance, perspective, uses, subframe, precedes, causative, inchoative)
  • Negative examples: sampled from other frames and filtered by sentence-embedding similarity (cosine < 0.50)

Every instance has the fields Instruction, Question, Answer and Task Family.

Model

Base model meta-llama/Llama-3.1-8B-Instruct, trained on its 4-bit Unsloth build
Adaptation LoRA, rank 8, alpha 16, dropout 0.1, on all attention and MLP projections
Training 10 epochs, learning rate 5e-6, effective batch size 32, AdamW 8-bit, no validation set
Training prompt Alpaca format (### Instruction: / ### Input: / ### Response:)
Checkpoint LoRA adapter merged into the base model (16-bit weights)

Training configuration: configs/acl2026.yaml in the GitHub repository.

Performance

Results reported in the paper (accuracy for NLI, F1 for SRL). Values better than the base model are in bold.

Task Setting Base (Llama-3.1-8B-Instruct) This model
NLI: CONFER Zero-shot 0.52 0.55
NLI: CONFER Few-shot 0.39 0.75
NLI: SNLI diagnostic subset Zero-shot 0.60 0.62
NLI: SNLI diagnostic subset Few-shot 0.73 0.77
SRL: lexical unit identification Zero-shot 0.50 0.62
SRL: frame prediction Zero-shot 0.66 0.81
SRL: frame elements, roles only Zero-shot 0.17 0.34
SRL: frame elements, one-word overlap Zero-shot 0.13 0.23

The gains are largest for entailment and contradiction. These are frame-semantic and event-level evaluations, not general-purpose benchmarks (such as MMLU or ARC). Class-wise results and other baselines (gpt-oss-20B, Gemma, DeepSeek-R1-Distill) are in the paper.

How to use

The model is used with plain-text prompts (no chat template), as in the paper. Zero-shot NLI with the prompt used in the evaluation:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

MODEL_ID = "sag-uniroma2/FrameLLaMA-3.1-8B-Instruct-FullFN17"
dtype = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16

tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype=dtype, device_map="auto")
model.eval()

PROMPT = """Judge if the hypothesis necessarily follows from the premise.
Consider the truth value of the premise. If the premise is true, does it necessarily mean that the hypothesis must also be true?
Output E if the hypothesis must always be true.
Output C if the hypothesis must always be false.
Output N if the hypothesis may be either true or false.
Do not output anything other than letters E, C, or N.

Premise: {premise}
Hypothesis: {hypothesis}
# Output:"""

prompt = PROMPT.format(premise="John drowned Martha.", hypothesis="Martha died.")
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.inference_mode():
    output = model.generate(**inputs, max_new_tokens=2, do_sample=False,
                            pad_token_id=tokenizer.eos_token_id)

answer = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip()
label = {"E": "entailment", "C": "contradiction", "N": "neutral"}.get(answer[:1].upper(), answer)
print(label)   # expected: entailment

The model answers with one letter: E (entailment), C (contradiction) or N (neutral). The full evaluation (CONFER, SNLI, SRL, with vLLM) is in the GitHub repository; the demo can also be run directly:

git clone https://github.com/crux82/FrameLLaMA && cd FrameLLaMA
pip install -r requirements.txt
python examples/nli_demo.py

Intended Use and Limitations

Intended for research on frame semantics and event-level reasoning: NLI involving event structure and participant roles, frame identification and semantic role labeling. It is not intended as a general-purpose assistant: the adaptation targets frame-semantic competence, and general abilities were not evaluated. The training data are in English; for Italian and Urdu see the multilingual follow-up.

Citation

@inproceedings{rai-etal-2026-frame,
    title = "Frame-Semantic Knowledge Injection for Event-Level Inference in {LLM}s",
    author = "Rai, Shahid Iqbal  and
      Croce, Danilo  and
      Basili, Roberto",
    editor = "Liakata, Maria  and
      Moreira, Viviane P.  and
      Zhang, Jiajun  and
      Jurgens, David",
    booktitle = "Proceedings of the 64th Annual Meeting of the {A}ssociation for {C}omputational {L}inguistics (Volume 2: Short Papers)",
    month = jul,
    year = "2026",
    address = "San Diego, California, United States",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2026.acl-short.55/",
    doi = "10.18653/v1/2026.acl-short.55",
    pages = "664--678",
    ISBN = "979-8-89176-391-3"
}

License

This model is derived from Llama 3.1 and is subject to the Llama 3.1 Community License. Built with Llama. Trained with Unsloth and Hugging Face TRL.

Downloads last month
938
Safetensors
Model size
8B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sag-uniroma2/FrameLLaMA-3.1-8B-Instruct-FullFN17

Adapter
(3,114)
this model

Dataset used to train sag-uniroma2/FrameLLaMA-3.1-8B-Instruct-FullFN17

Collection including sag-uniroma2/FrameLLaMA-3.1-8B-Instruct-FullFN17