Instructions to use bratao/llama7b-finetuned-openie-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bratao/llama7b-finetuned-openie-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bratao/llama7b-finetuned-openie-lora")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bratao/llama7b-finetuned-openie-lora") model = AutoModelForCausalLM.from_pretrained("bratao/llama7b-finetuned-openie-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bratao/llama7b-finetuned-openie-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bratao/llama7b-finetuned-openie-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bratao/llama7b-finetuned-openie-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bratao/llama7b-finetuned-openie-lora
- SGLang
How to use bratao/llama7b-finetuned-openie-lora 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/llama7b-finetuned-openie-lora" \ --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/llama7b-finetuned-openie-lora", "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/llama7b-finetuned-openie-lora" \ --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/llama7b-finetuned-openie-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bratao/llama7b-finetuned-openie-lora with Docker Model Runner:
docker model run hf.co/bratao/llama7b-finetuned-openie-lora
llama7b-finetuned-openie-lora
This repository is a legacy Portuguese generative Open Information Extraction
(OpenIE) artifact. Despite the suffix -lora, it does not contain a small
LoRA adapter: it publishes a complete causal language model in two PyTorch weight
shards totaling about 13.48 GB. Download and memory requirements are therefore those
of a full 7B-class model.
The published configuration identifies NousResearch/Llama-2-7b-hf and
LlamaForCausalLM, while the thesis footnote for the later LLaMA-3-8B-FT
(PortOIE-Llama3) points to this URL. Those identities conflict. The public files do
not establish that this Llama-2-configured artifact is the Llama 3 model evaluated
in the thesis. It is documented here conservatively as a legacy experimental
checkpoint; no Llama 3 metric is assigned to it.
Model details
| Field | Value |
|---|---|
| Public repository | bratao/llama7b-finetuned-openie-lora |
| Base identified by config | NousResearch/Llama-2-7b-hf |
| Architecture | Llama decoder-only causal language model, 32 layers, hidden size 4,096 |
| Task intent | Portuguese extractive OpenIE |
| Artifact form | full model, two .bin weight shards; not an adapter |
| Published precision | float16 according to config |
| Approximate repository size | 13.48 GB |
| Audited revision | 2d5d362dd0ad5ca01b943691e1f494aef1c88c97 (2026-08-30) |
Prompt provenance
The associated local fine-tuned Llama runner uses this exact system instruction:
Dada uma frase S você consegue fazer extrações no formato ARG0 , V, ARG1. Realize a extração para a frase abaixo:
and a user payload beginning with S:. Its historical f-string rendered the Python
field name as well (S: sentence.phrase='…'), which is an implementation quirk, not
a recommended public interface. Use the normalized form S: {sentence} below.
The thesis records a different Alpaca training instruction:
Dada uma sentença S, você faz extrações no formato ARG0, V, ARG1. Realize a extração para a sentença abaixo:
Because the Llama-2/Llama-3 repository identity and exact checkpoint template are not reconciled, users should test both provenance records before relying on this legacy artifact. The first form is the maintained library's current Llama inference prompt.
Direct Transformers use
This legacy repository is not registered by portuguese-openie. It can be inspected
or run directly with Transformers, subject to license clarification:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "bratao/llama7b-finetuned-openie-lora"
revision = "2d5d362dd0ad5ca01b943691e1f494aef1c88c97"
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
model = AutoModelForCausalLM.from_pretrained(
model_id,
revision=revision,
dtype="auto",
device_map="auto",
low_cpu_mem_usage=True,
)
sentence = "A UFBA está localizada em Salvador."
instruction = (
"Dada uma frase S você consegue fazer extrações no formato ARG0 , V, ARG1. "
"Realize a extração para a frase abaixo:"
)
prompt = f"{instruction}\nS: {sentence}\n"
inputs = tokenizer(prompt, return_tensors="pt", truncation=True).to(model.device)
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=256,
do_sample=False,
pad_token_id=tokenizer.eos_token_id,
)
generated = output[0, inputs["input_ids"].shape[-1]:]
print(tokenizer.decode(generated, skip_special_tokens=True))
Illustrative target format (not a recorded output for the audited revision):
Extração 0:
ARG0="A UFBA"
V="está localizada em"
ARG1="Salvador"
Evaluation and status
No quantitative metric can be safely attached to these exact public bytes. A local 2023 evaluation artifact associated by date and name with the legacy Llama 2 line reports perfect-match precision/recall/F1 of 0.1500/0.1103/0.1271 and lexical precision/recall/F1 of 0.2800/0.2059/0.2373, but there is no checkpoint checksum in that result. Treat the values as historical leads, not verified repository metrics.
Separately, the thesis reports PortOIE-Llama3 perfect-match F1 0.1290 and lexical F1 0.2446, but its footnote points here while this repository's configuration is Llama 2. Those values belong to the thesis's Llama 3 system description, not this repo.
Training-data provenance
For the Llama 3 fine-tuning experiment, the thesis reports a shuffled mixture of
OIEC-PT Silver, Pragmático, Gamalho, and synthetic WikiPUD-Portuguese examples,
trained with Axolotl on an NVIDIA H100. Because this artifact's model-family identity
conflicts with that record, the mixture cannot be asserted as the training data of
these exact bytes. No public dataset identifier is declared; YAML omits datasets.
Requirements and hardware
- Recent Python, PyTorch, Transformers, and Accelerate.
- Download is about 13.48 GB. Unquantized execution generally needs at least 16 GB of free VRAM plus runtime overhead, or CPU/RAM offload. This is an estimate, not a guaranteed minimum.
- The repository contains legacy PyTorch
.binshards, so loading can use more host memory than modern memory-mapped safetensors.
Limitations
- Model identity, exact prompt template, training completion, and evaluation linkage require reconciliation.
- Output may be malformed, incomplete, duplicated, or hallucinated. Verify every supposedly extractive field against the source sentence.
- There is no public domain, bias, safety, or long-context evaluation for these bytes.
- Do not treat generated extractions as verified facts or use them alone for high-impact decisions.
License
No license is declared in the public repository as of 2026-08-30. The repository name and public availability do not grant redistribution rights. Consult the author and the terms of the configured Llama 2 base before downloading, modifying, or redistributing the full weights. 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
- 153
Model tree for bratao/llama7b-finetuned-openie-lora
Base model
NousResearch/Llama-2-7b-hf