FrameLLaMA-3.1-8B-Instruct-50FramesFN17
A model for frame semantics analysis
2 min read
This language model is built on Llama-3.1-8B-Instruct and specializes in understanding FrameNet frames (definitions, frame element roles, and lexical units). It helps research text semantic structure and perform semantic role labeling tasks without prior training on specific SRL datasets. The new release is useful for NLP researchers, linguists, and developers of semantic search engines.
Key features
- FrameNet specialization: Understanding of 60 frames and their elements.
- High accuracy: Outperforms the base model on closed and open-ended questions.
- Efficient adaptation: Uses LoRA (a small add-on to the base model) with a rank of 16.
- Scientific background: Presented at the *SEM 2025 conference.
What you can do
- Explore semantics: Ask questions about definitions and roles of specific frames.
- Test SRL: Perform zero-shot semantic role labeling in text.
- Integrate into pipelines: Use for sentence semantic parsing in NLP projects.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "sag-uniroma2/FrameLLaMA-3.1-8B-Instruct-50FramesFN17"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype=torch.bfloat16, device_map="auto")
question = "Can you list some frame elements in the Supply frame?"
prompt = f"### Input: {question}\n### Response:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(output[0]))Read more
DetailsBenchmarks: closed questions (F1 0.93), multiple choice (F1 0.66).
Training: 7 epochs, learning rate 2e-4, batch size 4.
Limitations: trained on only 60 FrameNet frames, incomplete coverage for roles is possible.










Comments