CoolFace
Modelpublic

bratao/Llama-PortOIE3

sourceHugging Faceupdated 28d agoView on Hugging Face
0likes152downloads
Model Card

Llama-PortOIE3

Llama-PortOIE3 is a Llama 3–family generative model fine-tuned for Portuguese extractive Open Information Extraction and published as a single GGUF file for llama.cpp-compatible runtimes. It generates binary ARG0, V, ARG1 extractions.

Model details

FieldValue
Public repository`bratao/Llama-PortOIE3`
Filellama3_finetune.gguf
Architecture from GGUF metadataLlama, 8,030,261,248 parameters
TaskPortuguese extractive OpenIE
Context encoded in GGUF metadata8,192 tokens
Artifact size8,540,770,624 bytes (about 8.54 GB)
File SHA-25698ffe7115c224c3820e08935e570a9dfdb1178fbaaf5414dcc5fc9288a451ff5
Audited revision459d04b8baffbaabae74445715e98974eb869790 (2026-08-30)

The repository does not declare an upstream base-model ID, quantization label, dataset ID, or license. This card does not infer those fields. The GGUF contains an embedded Llama 3 chat template; the examples below request chat_format="llama-3" explicitly for reproducibility.

Use with portuguese-openie

bash
pip install "portuguese-openie[gguf]"
python
from portuguese_openie import Model, PortugueseOpenIE

extractor = PortugueseOpenIE(
    Model.LLAMA_PORT_OIE3,
    n_ctx=2048,
    n_gpu_layers=0,  # raise to offload layers when your llama.cpp build supports it
)
triples = extractor.extract("A UFBA está localizada em Salvador.")
print([triple.to_dict() for triple in triples])

No model path is required. llama-cpp-python downloads the public GGUF from Hugging Face on first use and reuses the standard local cache afterward.

Illustrative normalized output (not a recorded E2E result for this card):

python
[{"ARG0": "A UFBA", "V": "está localizada em", "ARG1": "Salvador"}]

Direct llama.cpp use

python
from huggingface_hub import hf_hub_download
from llama_cpp import Llama

model_path = hf_hub_download(
    repo_id="bratao/Llama-PortOIE3",
    filename="llama3_finetune.gguf",
    revision="459d04b8baffbaabae74445715e98974eb869790",
)
llm = Llama(
    model_path=model_path,
    chat_format="llama-3",
    n_ctx=2048,
    n_gpu_layers=0,
)

sentence = "A UFBA está localizada em Salvador."
messages = [
    {
        "role": "system",
        "content": (
            "Dada uma frase S você consegue fazer extrações no formato ARG0 , V, "
            "ARG1. Realize a extração para a frase abaixo:"
        ),
    },
    {"role": "user", "content": f"S: {sentence}"},
]
response = llm.create_chat_completion(
    messages=messages,
    max_tokens=512,
    temperature=0.0,
)
print(response["choices"][0]["message"]["content"])

Exact maintained inference system prompt:

text
Dada uma frase S você consegue fazer extrações no formato ARG0 , V, ARG1. Realize a extração para a frase abaixo:

The thesis records the Alpaca training instruction as Dada uma sentença S, você faz extrações no formato ARG0, V, ARG1. Realize a extração para a sentença abaixo:. The wording above is the exact prompt in the associated local inference runner and the maintained portuguese-openie implementation. Use S: {sentence} as the user message; an old runner used a debug-style f-string that included the field name.

Evaluation

For the system named PortOIE-Llama3 / LLaMA-3-8B-FT, the thesis reports:

SourceCriterionPrecisionRecallF1
ThesisPerfect match——0.1290
ThesisLexical match0.28570.20580.2446
Local evaluationLexical match0.23940.25000.2446
Conflicting local evaluationPerfect match0.09220.09560.0939

The extractive evaluation uses 100 OIEC-PT Gold sentences and 136 validated reference extractions. The original reported average prediction time was about 1.4 seconds, but latency is hardware- and runtime-dependent.

The local lexical result corroborates the thesis after rounding, but the local perfect-match result conflicts with the thesis. In addition, the public GGUF has not been independently checksum-linked to the evaluated checkpoint. Therefore only the lexical F1 is corroborated for the named research system, and none of these values is a verified metric for this exact file until provenance is reconciled.

Training-data provenance

The thesis describes Llama 3 supervised fine-tuning with Axolotl on an NVIDIA H100, using a shuffled mixture of OIEC-PT Silver, Pragmático (400 sentences/485 extractions), Gamalho (103/346), and synthetic WikiPUD-Portuguese examples. The reported configuration used 8-bit AdamW, batch size 8, cosine learning rate 0.00002, sample packing, and gradient checkpointing. No dataset ID is declared in the public repository, so the YAML omits datasets.

Requirements and hardware

  • —Python with llama-cpp-python and a compatible llama.cpp build.
  • —The GGUF download is about 8.54 GB. Roughly 10–12 GB of free system RAM is a practical CPU starting point; context and runtime buffers increase use.
  • —GPU layer offload is optional. Set n_gpu_layers according to available VRAM.
  • —Although GGUF metadata records an 8,192-token context, the library defaults to 2,048 and longer OpenIE inputs have not been evaluated here.

Limitations

  • —The model can omit or duplicate relations, hallucinate content, or produce output that the parser cannot normalize. Check all fields against source spans.
  • —Public metadata does not fully establish base model, quantization, training-data revision, license, or evaluated-checkpoint identity.
  • —Evaluation is small and mainly encyclopedic. Robustness to dialectal, conversational, specialized, long, or adversarial Portuguese is unknown.
  • —Extracted claims are not fact verification and must not alone drive high-impact use.

License

No license is declared in the public repository as of 2026-08-30. Public access does not grant redistribution or modification rights. Obtain author clarification and identify the upstream base-model terms before reuse. This card does not infer a license or base model.

Citation

bibtex
@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