Instructions to use bratao/PortugueseT5-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bratao/PortugueseT5-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bratao/PortugueseT5-Instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("bratao/PortugueseT5-Instruct") model = AutoModelForSeq2SeqLM.from_pretrained("bratao/PortugueseT5-Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bratao/PortugueseT5-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bratao/PortugueseT5-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bratao/PortugueseT5-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bratao/PortugueseT5-Instruct
- SGLang
How to use bratao/PortugueseT5-Instruct 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/PortugueseT5-Instruct" \ --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/PortugueseT5-Instruct", "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/PortugueseT5-Instruct" \ --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/PortugueseT5-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bratao/PortugueseT5-Instruct with Docker Model Runner:
docker model run hf.co/bratao/PortugueseT5-Instruct
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
PortugueseT5-Instruct
PortugueseT5-Instruct is an instruction-tuned intermediate checkpoint derived from
the PortugueseT5 research line. The doctoral thesis describes supervised tuning on
approximately three million Portuguese question-answer pairs derived from Wikipedia
and provided by a project partner.
This is not an OpenIE backend and is not registered by
portuguese-openie. It is the
intermediate model described before task-specific fine-tuning of
PortugueseT5OieAbstractive.
Model details
| Field | Value |
|---|---|
| Public repository | bratao/PortugueseT5-Instruct |
| Predecessor described in thesis | bratao/portugueseT5 |
| Architecture | T5 encoder-decoder |
| Task status | general Portuguese instruction-tuning intermediate |
| Parameters | 783,150,080 (approximately 783M; thesis rounds to 770M) |
| Published weight precision | float32 |
| Approximate repository size | 3.13 GB |
| Audited revision | b379913821c4e886ead8ae576db7abfa05d9da69 (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 or best checkpoint. It may be a stale copied state, but it does not establish a completed training run. Treat this as an experimental intermediate artifact.
Direct Transformers use
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "bratao/PortugueseT5-Instruct"
revision = "b379913821c4e886ead8ae576db7abfa05d9da69"
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
model = AutoModelForSeq2SeqLM.from_pretrained(
model_id, revision=revision, dtype="auto", device_map="auto"
)
# Illustrative instruction only: the public repository does not document a stable
# prompt template, so validate a template on your own task before relying on it.
prompt = "Pergunta: Em qual cidade fica a UFBA?\nResposta:"
inputs = tokenizer(prompt, return_tensors="pt", truncation=True).to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))
An illustrative desired answer would be Salvador., but this is not a recorded
model output or accuracy claim. The public artifact has no documented canonical
prompt or validated response for this example.
Training-data provenance
The thesis says the instruction data consists of about three million Portuguese QA
pairs derived from Portuguese Wikipedia and supplied by a partner. It does not
identify a public dataset release, and the model repository declares no Hugging Face
dataset ID. The data is not distributed here; this card deliberately omits
datasets and does not reproduce private examples.
Evaluation and status
No trustworthy task metric is published for this exact checkpoint. The training state above appears partial, and scores from later OpenIE checkpoints must not be assigned to this intermediate. Validate it independently for any intended task.
Requirements and hardware
- Recent Python, PyTorch, Transformers, and Accelerate.
- The float32 weights occupy about 3.13 GB. Around 6–8 GB of available RAM/VRAM is a practical starting point; memory varies with input length and runtime.
- GPU is recommended for scale, though CPU inference is possible.
Limitations
- No canonical prompt template, completion statement, or task evaluation is public.
- The underlying instruction data is not publicly inspectable from this repository, limiting reproducibility and bias analysis.
- Output may be incorrect, hallucinated, biased, or unsafe.
- Do not treat this checkpoint as an OpenIE model or as a factual authority.
License
No license is declared in the public repository as of 2026-08-30. Missing license metadata is not permission to redistribute or modify the weights. Seek clarification from the author and account for the terms of predecessor weights and data. 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
- Downloads last month
- 174