v0-ettin68m-token_level-0-3 (legacy: LoRA fine-tune of knowledgator/gliner-pii-small-v1.0, Ettin-68M)

Superseded. For current pt-BR PII detection use arthrod/gliner-mmbert-small-ptbr-pii-full-3x-v1, the Ettin models of the current suite (gliner-ettin-68m-ptbr-pii-full-3x-v1), or arthrod/gliner-opf-ptbr-pii-v1.

TL;DR. A token-level GLiNER for Brazilian-Portuguese PII ("LGPD"), from February 2026. It continues knowledgator/gliner-pii-small-v1.0, whose encoder is jhu-clsp/ettin-encoder-68m (ModernBERT, 19 layers, hidden 512). Training used a rank-256 LoRA on the encoder's attention/MLP projections. The run was planned for 5 epochs (19,515 steps). Early stopping ended it at step 7,200 (epoch 1.84) after 5 evals without improvement. The best eval loss was at step 6,200 (104.92). load_best_model_at_end: true was set, so final_model/ should be that checkpoint with LoRA merged, but the repo does not record this. The training config's hub target was arthrod/gliner-lgpd-br-tokenlevel-lora-small-v1 (W&B run gliner-lgpd-br-tokenlevel-lora-small-v1).

v0, token_level and ettin68m in the repo name are accurate. 0-3 is not explained anywhere in the repo.

Related repos

Repo Type Role
arthrod/gliner-mmbert-small-ptbr-pii-full-3x-v1 model Current recommended PT-BR PII GLiNER (mmBERT-small)
arthrod/gliner-opf-ptbr-pii-v1 model OpenAI Privacy Filter fine-tune for PT-BR PII (current suite)
arthrod/gliner-ettin-68m-ptbr-pii-full-3x-v1 Β· gliner-ettin-68m-ptbr-pii-full-3x-v1-checkpoints/gliner-ettin-68m-ptbr-pii-top50k-v1 Β· ettin-32m model Current-suite Ettin GLiNER models
arthrod/gliner-opf-ptbr-pii-bench-v1 dataset Benchmark of the current suite
arthrod/gliner_review_comparison dataset Side-by-side review of GLiNER outputs
arthrod/gliner-opf-ptbr-pii-demo space Interactive demo of the current suite
arthrod/gliner_eval_folder (private) dataset Feb-2026 sweep: GLiNER models x 9 eval sets (source of the only task metrics for these legacy repos)
arthrod/attempt_vanilla model Experiment log (24 Feb 2026) of the runs behind v1-deberta_large-… and v1-deberta_small-…
arthrod/c3750-mdeberta_base-vanilla-1-2 model Legacy (Aug 2025): mDeBERTa-v3-base span (markerV0) GLiNER, 15 checkpoints
arthrod/c5k-deberta_base-token_level-1-2 model Legacy (Feb 2026): urchade/gliner_multi_pii-v1 continued on a PII-in-spam corpus, 13 checkpoints
arthrod/v0-ettin68m-token_level-0-3 model Legacy (Feb 2026): LoRA fine-tune of knowledgator/gliner-pii-small-v1.0 (Ettin-68M), 25 checkpoints
arthrod/v1-deberta_large-token_level-1-7 model Legacy (Feb 2026): knowledgator/gliner-pii-large-v1.0 fine-tuned 8k steps, has eval metrics
arthrod/v1-deberta_small-token_level-0-6 model Legacy (Feb 2026): failed from-scratch DeBERTa-v3-small run (loss stuck at 0)

Quick start

final_model/ is a self-contained GLiNER folder (merged weights, 326 MB). GLiNER 0.2.25 has no subfolder argument, so download it and pass the local path:

from huggingface_hub import snapshot_download
from gliner import GLiNER

path = snapshot_download("arthrod/v0-ettin68m-token_level-0-3", allow_patterns=["final_model/*"])
model = GLiNER.from_pretrained(f"{path}/final_model")

text = "Meu nome Γ© Maria Silva, CPF 123.456.789-09, telefone (11) 98765-4321."
labels = ["first name", "last name", "cpf document number", "phone number"]
for ent in model.predict_entities(text, labels, threshold=0.5):
    print(ent["text"], "->", ent["label"], round(ent["score"], 3))

This snippet was not run against these weights for this card. Configs were written by transformers 5.1.0.

Files and checkpoint layout

Path What it is
final_model/ pytorch_model.bin (326 MB), gliner_config.json, tokenizer. Final exported model (LoRA presumably merged: it is ~125 MB smaller than the raw checkpoints).
lora_adapters/ PEFT LoRA adapter (adapter_model.safetensors, 228 MB; r=256, alpha=512, dropout 0.05, targets Wqkv, Wo, Wi, base jhu-clsp/ettin-encoder-68m, PEFT 0.18.1). The adapter README.md is the empty PEFT template.
gliner_config.json (root) Same as every other gliner_config.json in the repo (27 identical copies). There are no root weights. Use final_model/.
config_resolved.json Resolved training config (model, data, training, LoRA, evaluation, W&B, hub). The source of the recipe below.
models/checkpoint-<step>/ (25 dirs, 2400β†’7200 every 200) Trainer checkpoints with unmerged weights (pytorch_model.bin 451 MB), optimizer.pt (356 MB), RNG/scheduler state, trainer_state.json, GLiNER config, tokenizer. About 0.81 GB each. The earlier checkpoints (200–2200) were rotated out by save_total_limit 25.
training_log_history.parquet Every log entry of models/checkpoint-7200/trainer_state.json as a flat table (added by this card update).

Checkpoints

Eval loss is from models/checkpoint-7200/trainer_state.json (best_global_step: 6200, best_metric: 104.92). Eval used 2,000 held-out examples (max_eval_samples: 2000). "Mean train loss" is over the 200 steps before each eval (logged every 10 steps). Focal loss with sum reduction. Rows marked "–" in the Saved column were evaluated but their checkpoint is no longer in the repo.

Step Saved Epoch Eval loss Mean train loss
200 – 0.05 539.86 2,311.87
400 – 0.10 333.64 748.06
600 – 0.15 260.65 552.29
800 – 0.21 218.72 481.81
1000 – 0.26 210.91 449.61
1200 – 0.31 180.59 426.95
1400 – 0.36 171.23 397.17
1600 – 0.41 177.07 370.65
1800 – 0.46 160.36 364.58
2000 – 0.51 151.93 356.95
2200 – 0.56 147.73 331.60
2400 yes 0.61 146.34 339.16
2600 yes 0.67 133.54 309.00
2800 yes 0.72 132.62 323.73
3000 yes 0.77 132.18 318.64
3200 yes 0.82 125.90 301.83
3400 yes 0.87 130.58 293.24
3600 yes 0.92 121.49 295.29
3800 yes 0.97 119.57 287.10
4000 yes 1.02 122.91 269.03
4200 yes 1.08 119.21 265.42
4400 yes 1.13 114.51 271.95
4600 yes 1.18 115.72 257.49
4800 yes 1.23 114.15 255.86
5000 yes 1.28 112.38 258.81
5200 yes 1.33 119.24 266.07
5400 yes 1.38 120.46 252.16
5600 yes 1.43 125.14 263.41
5800 yes 1.49 108.21 264.07
6000 yes 1.54 114.39 243.90
6200 yes 1.59 104.92 252.54
6400 yes 1.64 107.53 253.42
6600 yes 1.69 106.98 249.00
6800 yes 1.74 117.65 240.20
7000 yes 1.79 109.22 246.86
7200 yes 1.84 107.52 241.01

Best checkpoint: models/checkpoint-6200 (lowest eval loss, recorded by the Trainer as best_model_checkpoint).

Training data

Local files data/train.json / data/val.json, not published and not linked from the repo. From the trainer state: 3,903 steps per epoch at batch 96, so about 375k training examples (derived). Eval used 2,000 examples. The run and hub names (gliner-lgpd-br-…) say it targets PT-BR personal data under Brazil's LGPD. The label set is not recorded in this repo.

Training recipe

From config_resolved.json:

  • Init knowledgator/gliner-pii-small-v1.0 (encoder jhu-clsp/ettin-encoder-68m), span_mode: token_level, max_len 2048, max_types 100, max_neg_type_ratio 1, max_width 12, hidden_size 768, dropout 0.3, subtoken_pooling: first.
  • LoRA on the encoder: r 256, alpha 512, dropout 0.05, targets Wqkv, Wo, Wi, no bias.
  • 5 epochs planned, cosine schedule, 732 warmup steps; batch 96 (eval 64); LR encoder 1e-4, LR others 5e-5; weight decay 0.01 / 0.1; grad clip 10.0; bf16.
  • Focal loss alpha 0.75, gamma 2, sum reduction; negatives 1.0; shuffle_types and random_drop on.
  • Eval and save every 200 steps; load_best_model_at_end on eval loss; early stopping with patience 5 (triggered at step 7,200). The trainer state stores the checkpoint path /mnt/workspace/gliner_logs/models/checkpoint-6200.
  • Pushed with upload-large-folder on 2026-02-16.

The saved gliner_config.json files contain fields inherited from the parent model's config that do not describe this run (e.g. name: "span level gliner", train_data: data/pii_full.json, lr_encoder: "1e-5", num_steps: 30000). Trust config_resolved.json for the recipe.

Evaluation

Recorded in this repo

Eval loss only (table above).

Previously reported (not reproducible from this repo)

An April-2026 version of this card reported the numbers below, "evaluated via the scripts in gliner-onnx-benchmark" (arthrod/gliner_central, a GitHub repo that is no longer public). Neither the prediction files nor the script are in this repo, so they cannot be re-checked. That card itself warned that the holdouts "diverge by > 0.3 F1 … likely a label-space mismatch between evaluation sets".

Holdout N Strict F1 Strict P Strict R Partial F1
ws_rawtext 50000 0.6301 0.5412 0.7539 0.7111
mistral_ws 10000 0.0269 0.0503 0.0183 0.1705
clean_mistral_ws_6lbl 14841 0.0387 0.0496 0.0318 0.2597

The mistral_ws row matches the "ettin-68m" row for urchade/synthetic-pii-ner-mistral-v1 in the older cross-model table of this card (Strict F1 0.0269, Partial F1 0.1705). That table also lists ettin-68m on nvidia/Nemotron-PII at Strict F1 0.1493 / Partial F1 0.3210, with the note that fine-tuned models "overfit heavily β€” great on holdout, collapse on external data". The same table's holdout row is labelled "ettin-68m ckpt-22k". This repo has no step 22,000, so that row is probably a different run.

training_log_history.parquet

Column Type Description
kind string train (every 10 steps) or eval (every 200 steps)
step int64 Global step
epoch float64 Fractional epoch
loss float64 Train loss; null on eval rows
grad_norm float64 Gradient norm; null on eval rows
learning_rate float64 LR; null on eval rows
eval_loss float64 Eval loss; null on train rows
eval_runtime float64 Eval wall time (s)
eval_samples_per_second float64 Eval throughput

757 rows (721 train + 36 eval). Examples:

[
  {"kind": "train", "step": 7200, "epoch": 1.845, "loss": 255.8208, "grad_norm": 937.70, "learning_rate": 3.977e-05, "eval_loss": null, "eval_runtime": null, "eval_samples_per_second": null},
  {"kind": "eval", "step": 6200, "epoch": 1.589, "loss": null, "grad_norm": null, "learning_rate": null, "eval_loss": 104.921, "eval_runtime": 5.570, "eval_samples_per_second": 359.051}
]

Limitations

  • No task metric can be reproduced from this repo, and the externally reported ones disagree wildly across holdouts.
  • Training data and label set are unpublished.
  • Whether final_model/ equals checkpoint-6200 (merged) is inferred from load_best_model_at_end, not verified.
  • English-pretrained encoder (Ettin) fine-tuned on PT-BR. Expect weaker results on out-of-domain text.

License

Apache-2.0 as declared, matching the parent knowledgator/gliner-pii-small-v1.0 (Apache-2.0). The encoder jhu-clsp/ettin-encoder-68m is MIT.

Citation

@misc{arthrod_v0_ettin68m_token_level,
  author = {arthrod},
  title  = {v0-ettin68m-token_level-0-3: LoRA fine-tune of knowledgator/gliner-pii-small-v1.0 for PT-BR PII},
  year   = {2026},
  url    = {https://huggingface.co/arthrod/v0-ettin68m-token_level-0-3}
}
Downloads last month
26
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for arthrod/v0-ettin68m-token_level-0-3

Finetuned
(1)
this model