bratao/PortugueseT5OieAbstractive
PortugueseT5OieAbstractive
PortugueseT5OieAbstractive is a Portuguese T5 encoder-decoder checkpoint fine-tuned for abstractive Open Information Extraction. It generates binary ARG0, V, ARG1 extractions and offers a smaller alternative to the Qwen3OIE 4B/8B models.
The thesis reports strong OpenIE results for this model family, but the public trainer state appears partial. Pin the revision and treat the artifact as an experimental research release until the checkpoint provenance is reconciled. The exact public revision below has nevertheless passed an end-to-end inference test through the enum-only API; this validates usability, not training provenance.
Model details
The published trainer state records step 2,000 of a nominal 1,291,623-step, three-epoch schedule (epoch approximately 0.00465) with no best metric/checkpoint. It may be stale or copied, but it does not prove a completed run.
Use with portuguese-openie
pip install "portuguese-openie[transformers]"from portuguese_openie import Model, PortugueseOpenIE
extractor = PortugueseOpenIE(Model.PORTUGUESE_T5_OIE_ABSTRACTIVE)
triples = extractor.extract(
"O enxofre é um nutriente vital para o crescimento saudável das plantas, "
"mas os solos no Reino Unido são naturalmente deficientes deste mineral."
)
print([triple.to_dict() for triple in triples])No model path is required. The library downloads public files from Hugging Face on first use and reuses the standard local Hugging Face cache afterward.
Recorded output from the audited public revision:
[
{
"ARG0": "O enxofre",
"V": "é",
"ARG1": "um nutriente vital para o crescimento saudável das plantas",
},
{
"ARG0": "os solos no Reino Unido",
"V": "são",
"ARG1": "naturalmente deficientes de enxofre",
},
]The offline cache-reuse run used Python 3.12.9, PyTorch 2.13 CPU, and Transformers 4.57.6. Loading took 8.28 seconds and generation plus parsing 10.59 seconds on that machine. These values are a smoke-test record, not a benchmark.
Direct Transformers use
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "bratao/PortugueseT5OieAbstractive"
revision = "7ae5a9d9c4554e9c1342a0cc9c44dd130e8ddd16"
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
model = AutoModelForSeq2SeqLM.from_pretrained(
model_id, revision=revision, dtype="auto", device_map="auto"
)
sentence = "A UFBA está localizada em Salvador."
prompt = f"Entrada:\n{sentence}\nResposta:\n"
inputs = tokenizer(prompt, return_tensors="pt", truncation=True).to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))Recommended inference prompt (the one used by the recovered evaluation script):
Entrada:
{sentence}
Resposta:The final thesis describes task fine-tuning with the same minimal instruction used for Qwen3OIE:
Dada uma frase S você consegue fazer extrações em JSON no formato ARG0 , V, ARG1. Realize a extração para a frase abaixo:The recovered t5_oie.py inference/evaluation script uses the shorter Entrada/Resposta form above, and its recorded outputs are the source evaluated for the reported results below. The library therefore uses that reproducible inference form by default. This does not establish that it was also the training serialization; the thesis and recovered inference script document different stages of the workflow. Use greedy decoding and validate schema adherence. The unified parser accepts JSON and legacy ARG0/V/ARG1 output.
Evaluation
The thesis reports results on 100 Portuguese sentences and 238 reference extractions from WikiPUD-Portuguese-Abstractive. Targets were generated with an LLM from OIEC-PT Gold source sentences and manually spot-checked. They are therefore a silver-standard reference, not fully human-authored gold data.
Precision and recall come from the associated local evaluation summary; F1 is also reported in the thesis for PortugueseT5OieAbstractive. Evaluation was not rerun for this card. The thesis does not by itself resolve whether the current public revision is byte-for-byte the evaluated checkpoint.
Training-data provenance
The thesis describes task fine-tuning from PortugueseT5-Instruct on WikiPUD-Portuguese-Abstractive: 29,026 Portuguese sentences and 102,788 synthetic extractions from 2,015 Wikipedia paragraphs, generated with Gemini 2.5 Flash. The public repository does not declare a Hugging Face dataset ID or bundle that corpus, so the YAML intentionally omits datasets.
Requirements and hardware
- Recent Python, PyTorch, Transformers, and Accelerate.
- The float32 repository is about 3.13 GB. Around 6–8 GB of available RAM/VRAM is a practical starting point; actual memory and speed depend on input length/runtime.
- GPU is recommended for throughput, though CPU inference is possible.
Limitations
- Public trainer state appears partial, and evaluated/published checkpoint identity has not been independently checksum-linked.
- Abstractive output may not be a literal source span and can be malformed, incomplete, duplicated, or hallucinated.
- Evaluation covers only 100 mostly encyclopedic sentences. Performance elsewhere, including fairness and dialectal robustness, is unknown.
- An extraction is not fact verification and should not alone drive high-impact use.
License
No license is declared in the public repository as of 2026-08-30. Missing license metadata is not permission to redistribute or modify weights. Seek author clarification and review all predecessor-model and data terms. This card does not infer a license.
Citation
@phdthesis{cabral2025evolving,
author = {Cabral, Bruno Souza},
title = {Evolving Open Information Extraction for Portuguese employing Language Models},
school = {Universidade Federal da Bahia},
year = {2025}
}
@inproceedings{cabral2022portnoie,
author = {Cabral, Bruno and Souza, Marlo and Claro, Daniela Barreiro},
title = {PortNOIE: A Neural Framework for Open Information Extraction for the Portuguese Language},
booktitle = {Computational Processing of the Portuguese Language (PROPOR 2022)},
year = {2022},
doi = {10.1007/978-3-030-98305-5_23}
}Project: Portuguese-OpenIE · PortNOIE paper · Generative OpenIE paper
