Instructions to use bratao/PortugueseT5OieAbstractive with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bratao/PortugueseT5OieAbstractive with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bratao/PortugueseT5OieAbstractive")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("bratao/PortugueseT5OieAbstractive") model = AutoModelForSeq2SeqLM.from_pretrained("bratao/PortugueseT5OieAbstractive", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bratao/PortugueseT5OieAbstractive with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bratao/PortugueseT5OieAbstractive" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bratao/PortugueseT5OieAbstractive", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bratao/PortugueseT5OieAbstractive
- SGLang
How to use bratao/PortugueseT5OieAbstractive with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bratao/PortugueseT5OieAbstractive" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bratao/PortugueseT5OieAbstractive", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "bratao/PortugueseT5OieAbstractive" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bratao/PortugueseT5OieAbstractive", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bratao/PortugueseT5OieAbstractive with Docker Model Runner:
docker model run hf.co/bratao/PortugueseT5OieAbstractive
YAML Metadata Warning:The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
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
| Field | Value |
|---|---|
| Public repository | bratao/PortugueseT5OieAbstractive |
| Described predecessor | PortugueseT5-Instruct |
| Architecture | T5 encoder-decoder |
| Task | Portuguese abstractive OpenIE |
| Parameters | 783,150,080 (approximately 783M; thesis rounds to 770M) |
| Published weight precision | float32 |
| Approximate repository size | 3.13 GB |
model.safetensors SHA-256 |
ca5174892e5bb01afec8536a96cf1fc4d5e2d4a33624cab7da2b4819e2343874 |
| Audited revision | 7ae5a9d9c4554e9c1342a0cc9c44dd130e8ddd16 (2026-08-30) |
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.
| Criterion | Precision | Recall | F1 |
|---|---|---|---|
| Perfect match | 0.3256 | 0.2353 | 0.2732 |
| Lexical match | 0.6163 | 0.4454 | 0.5171 |
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
- Downloads last month
- 127