Llama-3.2-3B Temporal Link Classification

Full fine-tuned version of meta-llama/Llama-3.2-3B-Instruct on the tlink-classification dataset for temporal relation classification.

Task

Given a sentence with two marked spans (<e1>, <e2> for events, <t1>, <t2> for times), classify the temporal relation between them as one of:

  • BEFORE — first span occurs earlier than second
  • AFTER — first span occurs later than second
  • OTHER — overlap or non-ordering relation
  • NONE — no clear temporal relation

Training Details

Parameter Value
Base model meta-llama/Llama-3.2-3B-Instruct
Fine-tuning Full (all parameters)
Epochs 3
Batch size 8
Learning rate 2e-5
Max length 2048
Hardware NVIDIA H100
Precision bfloat16

Results

Metric Score
Accuracy 0.8150
Macro F1 0.8170
BEFORE F1 0.8000
AFTER F1 0.7593
OTHER F1 0.8269
NONE F1 0.8817

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

tokenizer = AutoTokenizer.from_pretrained("AnirbanSaha/llama32-3b-tlink")
model     = AutoModelForCausalLM.from_pretrained("AnirbanSaha/llama32-3b-tlink", dtype=torch.bfloat16)
model.eval()

prompt = "Your already-formatted prompt here..."

enc = tokenizer(prompt, return_tensors="pt")
out = model.generate(**enc, max_new_tokens=8, do_sample=False)
new_tokens = out[0][enc["input_ids"].shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))
Downloads last month
162
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AnirbanSaha/llama32-3b-tlink

Finetuned
(2018)
this model

Dataset used to train AnirbanSaha/llama32-3b-tlink