SmolLM3-3B GDPR + LGPD privacy specialist (LoRA + head)

With vs without our training

GDPR (English) and LGPD (Portuguese) privacy-policy specialist on SmolLM3-3B: given a passage and a transparency requirement, it answers Yes/No in one forward pass with a probability and a margin.

Browser runtime: the s1s2 library reads the ONNX sibling eduardoworrel/SmolLM3-3B-GDPR-LGPD-ONNX-genai-int4-S1S2.

Quick start

Option words. The head was trained with exactly " Yes" and " No" (with the leading space) in English (manifest.en.json) and " Sim" and " Não" in Portuguese (manifest.pt.json). Other words, such as a translation, change the prompt the head reads and will not work; the manifest lists them in lab.labels.

from huggingface_hub import hf_hub_download
from peft import PeftModel
from safetensors.torch import load_file
from transformers import AutoModelForCausalLM, AutoTokenizer

base, repo = "HuggingFaceTB/SmolLM3-3B", "eduardoworrel/SmolLM3-3B-GDPR-LGPD-LoRA"
tok = AutoTokenizer.from_pretrained(base)
model = PeftModel.from_pretrained(AutoModelForCausalLM.from_pretrained(base, torch_dtype="bfloat16"), repo).merge_and_unload()
head = load_file(hf_hub_download(repo, "head.safetensors"))  # pointer head: q.*, k.* (dim 256)
# P(option) = softmax_k(q(h_decide) . k(h_option_end) / 16); prompt layout and markers: manifest.en.json in eduardoworrel/SmolLM3-3B-GDPR-LGPD-ONNX-genai-int4-S1S2

Browser (ONNX int4, WebGPU) with the S1S2 pattern (typed answer + margin, System 2 on demand, margin policy): eduardoworrel/SmolLM3-3B-GDPR-LGPD-ONNX-genai-int4-S1S2.

Results

Held-out test set, balanced accuracy of the pointer head, fp32 weights, the Kev-faithful variant (2 epochs, Kev's learning-rate rule, fp32 merge); 95% cluster-bootstrap intervals.

Set Balanced accuracy (%)
GDPR (English), n = 558 83.7 [81.1, 85.7]
LGPD (Portuguese), n = 802 81.0 [75.8, 87.2]
CCPA (English, zero-shot transfer), n = 420 75.2 [71.3, 79.2]

Other variant: the 1-epoch joint adapter with fp32 merge, held-out test set: GDPR 83.9 / LGPD 80.5 / CCPA 74.0.

Limits

  • Trained on app privacy policies (GDPR, English) and Brazilian policies (LGPD, Portuguese, one annotator per clause); CCPA was never trained on.
  • It says whether a passage addresses a transparency requirement, not whether a policy complies with the law; not legal advice.

License

License: GPL-3.0, because the weights are trained on GDPR-Transparency-200 (GPL-3.0); the Claudinha data (CC BY 4.0), the Kev data and the base model (Apache-2.0) keep their attribution.

Credits

  • Base model: HuggingFaceTB/SmolLM3-3B by Hugging Face (Apache-2.0).
  • GDPR data: GDPR-Transparency-200 (tomcory/privacy-policy-annotator, GPL-3.0); item ids and scripts only, no policy text redistributed.
  • LGPD data: Claudinha corpus (Tocchini et al., Zenodo 13371639, CC BY 4.0).
  • Synthetic Kev data (legacy_policy, compositional), generated by Kev code (Apache-2.0).
  • Pointer head and training recipe: Kev (Apache-2.0).
  • System 1 / System 2 split and margin gate idea: CT0 by Alias Robotics.
  • Precursors: alias3-web (Alias Robotics) and the Browser Immune System paper (arXiv 2611.15302).
Downloads last month
65
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for eduardoworrel/SmolLM3-3B-GDPR-LGPD-LoRA

Adapter
(89)
this model

Collection including eduardoworrel/SmolLM3-3B-GDPR-LGPD-LoRA

Paper for eduardoworrel/SmolLM3-3B-GDPR-LGPD-LoRA