c3750-mdeberta_base-vanilla-1-2 (legacy span-level GLiNER on mDeBERTa-v3-base)

Superseded. This is an early experiment, kept because it has a DOI (10.57967/hf/8513). For current pt-BR PII detection use arthrod/gliner-mmbert-small-ptbr-pii-full-3x-v1 or the OpenAI Privacy Filter fine-tune arthrod/gliner-opf-ptbr-pii-v1; results for both are in arthrod/gliner-opf-ptbr-pii-bench-v1.

TL;DR. The legacy "nightmare" PII run from August 2025: a classic span-level GLiNER (span_mode: markerV0, the "vanilla" in the repo name) on microsoft/mdeberta-v3-base, saved every 250 steps up to step 3,750 (the "c3750" in the name). The run stopped at step 3,750 of a planned 15,000. The only metric recorded is eval loss, and it got worse after fine-tuning started: 4,409 at step 0, then 19.6k–21.8k at every saved checkpoint. The weights at the repo root are a copy of checkpoint-1250, not checkpoint-3750. No task metric (F1) was ever computed for any checkpoint. Treat this repo as an experiment record.

What the other name tokens mean is not recorded anywhere in the repo: 1-2 is unknown.

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

GLiNER.from_pretrained("arthrod/c3750-…") may pull the whole snapshot (about 55 GB, 15 checkpoints). Download only what you need first. GLiNER 0.2.25 has no subfolder argument, so pass a local path:

from huggingface_hub import snapshot_download
from gliner import GLiNER

repo = "arthrod/c3750-mdeberta_base-vanilla-1-2"
# Root weights (a copy of checkpoint-1250):
path = snapshot_download(repo, allow_patterns=["gliner_config.json", "pytorch_model.bin", "tokenizer*.json"])
model = GLiNER.from_pretrained(path)

# Or any saved checkpoint, e.g. the one with the lowest post-training eval loss (2750):
# path = snapshot_download(repo, allow_patterns=["checkpoint-2750/*"], ignore_patterns=["*optimizer*", "*rng_state*", "*scheduler*"])
# model = GLiNER.from_pretrained(f"{path}/checkpoint-2750")

text = "Meu nome é Maria Silva, CPF 123.456.789-09, moro na Rua das Flores, 42, São Paulo."
labels = ["first name", "last name", "cpf document number", "location street", "location city"]
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. The config was written by transformers 4.55.0.

Files and checkpoint layout

Path What it is
pytorch_model.bin, gliner_config.json, tokenizer.json, tokenizer_config.json Root model. pytorch_model.bin has the same LFS sha256 as checkpoint-1250/pytorch_model.bin; it was copied there on 2026-03-19 "for GLiNER compatibility" (commit history).
onnx/model.onnx ONNX export (opset 19, added 2026-03-19, 1.16 GB). Exported after the root copy, so presumably from checkpoint-1250.
checkpoint-<step>/ (15 dirs) Full HF Trainer checkpoints: pytorch_model.bin (1.16 GB), optimizer.pt, rng_state.pth, scheduler.pt, trainer_state.json, GLiNER config, tokenizer (incl. spm.model). About 3.49 GB each.
training_log_history.parquet Every log entry from checkpoint-3750/trainer_state.json as a flat table (added by this card update; see schema below).
pre_eval.log, .ipynb_checkpoints/pre_eval-checkpoint.log Log of a zero-shot "pre-evaluation" of checkpoint-1000 (2025-08-07) on 500 of 50,264 items in convert2.jsonl, threshold 0.5, seed 13. It ends at "Evaluating char-space…" with no score: the run never finished.

Checkpoints

The gliner config is identical in all 15 checkpoints. Eval loss is from checkpoint-3750/trainer_state.json. "Mean train loss" is the mean of the per-step train loss over the 250 steps before the checkpoint (computed from the same file). Losses use sum reduction, so they scale with batch size and number of entity types.

Checkpoint Epoch Eval loss Mean train loss (prev. 250 steps)
step 0 (before training, not saved) 0.00 4,409.32 –
checkpoint-250 0.75 19,297.71 2,227.64
checkpoint-500 1.49 20,614.66 1,205.63
checkpoint-750 2.24 21,827.94 1,146.03
checkpoint-1000 2.99 20,890.04 1,125.55
checkpoint-1250 (= root) 3.73 20,353.40 1,104.08
checkpoint-1500 4.48 20,999.42 1,090.74
checkpoint-1750 5.22 20,129.69 1,086.40
checkpoint-2000 5.97 20,904.20 1,079.54
checkpoint-2250 6.72 20,414.78 1,070.89
checkpoint-2500 7.46 19,853.14 1,066.30
checkpoint-2750 8.21 19,646.01 1,063.62
checkpoint-3000 8.96 20,356.60 1,062.11
checkpoint-3250 9.70 20,810.62 1,056.22
checkpoint-3500 10.45 19,705.70 1,053.63
checkpoint-3750 11.19 20,677.74 1,053.47

Which checkpoint is best? Going only by recorded metrics: none of the fine-tuned checkpoints beats the starting point (step 0). Among the saved ones, checkpoint-2750 has the lowest eval loss. The root copy (checkpoint-1250) is mid-pack. Train loss kept falling while eval loss stayed about 20x higher. That pattern points to a train/eval mismatch or overfitting, not to a model that improved.

Training data

Not documented in the repo. What is known:

  • pre_eval.log loads convert2.jsonl (50,264 items) on a ROCm box (/home/rocm-user/jupyter/…).
  • trainer_state.json gives 335 optimizer steps per epoch at batch size 128. That works out to about 42.9k training examples. Eval throughput (~70 samples/s × ~67 s) puts the eval split at about 4.75k examples. Both are derived numbers, consistent with a train/eval split of a ~50k-item file.
  • An earlier version of this card called it a "legacy multi-PII experiment". It pointed to a private arthrod/v1-mdeberta_base-vanilla-1-1 as "the clean v1 release".

Training recipe

From gliner_config.json and checkpoint-3750/trainer_state.json:

  • Encoder microsoft/mdeberta-v3-base (12 layers, hidden 768, vocab 250,105), GLiNER span_mode: markerV0, max_width 12, hidden_size 512, dropout 0.4, RNN on (has_rnn: true), max_len 384, max_types 25, subtoken_pooling: first, whitespace word splitter.
  • Initialization (inferred): every field that both configs have matches urchade/gliner_multi_pii-v1's gliner_config.json. That includes its idiosyncratic leftovers (name: "correct", num_steps: 30000, warmup_ratio: 5000, eval_every: 5000, train_batch_size: 8, lr_encoder: "5e-6"). The low step-0 eval loss also fits a pretrained GLiNER head rather than a random one. So this run most likely continued from urchade/gliner_multi_pii-v1. Those config fields are inherited metadata, not the hyper-parameters that were actually used.
  • Trainer (from trainer_state.json): batch size 128, max_steps 15,000 (45 epochs), eval and save every 250 steps, logging every step. The LR ramps linearly at 3.33e-8 per step (about 1,500 warmup steps to ~5e-5). The run stopped at step 3,750 (epoch 11.19).
  • Date: 2025-08-07 (initial commit and pre_eval.log).

Evaluation

There is no task-level evaluation (precision/recall/F1) for any checkpoint. The pre-evaluation in pre_eval.log never produced a score. An April-2026 version of this card showed a cross-model leaderboard in which this model's row was empty ("-"). The table is still in the repo history (commit d459fe58).

training_log_history.parquet

Column Type Description
kind string train (per-step training log) or eval (evaluation log)
step int64 Global optimizer step
epoch float64 Fractional epoch
loss float64 Train loss (sum reduction); null on eval rows
grad_norm float64 Gradient norm before clipping; null on eval rows
learning_rate float64 LR at that step; null on eval rows
eval_loss float64 Eval loss; null on train rows
eval_runtime float64 Eval wall time in seconds
eval_samples_per_second float64 Eval throughput

3,766 rows (3,750 train + 16 eval). Examples:

[
  {"kind": "train", "step": 3750, "epoch": 11.194, "loss": 1080.1953, "grad_norm": 414.35, "learning_rate": 4.665e-05, "eval_loss": null, "eval_runtime": null, "eval_samples_per_second": null},
  {"kind": "eval", "step": 3750, "epoch": 11.194, "loss": null, "grad_norm": null, "learning_rate": null, "eval_loss": 20677.736, "eval_runtime": 67.403, "eval_samples_per_second": 70.561}
]
import polars as pl
from huggingface_hub import hf_hub_download
p = hf_hub_download("arthrod/c3750-mdeberta_base-vanilla-1-2", "training_log_history.parquet")
df = pl.read_parquet(p)

Limitations

  • No F1/precision/recall exists, and the only recorded metric (eval loss) got worse during fine-tuning. Do not use for real PII redaction.
  • Training data, label set and language mix are not recorded. Earlier cards listed pt and en.
  • The repo name says 3,750, but the root weights are checkpoint-1250.
  • This is a classic span-level (markerV0) GLiNER with max_width 12. Entities longer than 12 words cannot be predicted.

License

MIT, as declared by the owner on this repo. Upstream licenses: the encoder microsoft/mdeberta-v3-base is MIT. The likely parent urchade/gliner_multi_pii-v1 is Apache-2.0, so if this run did continue from it, Apache-2.0 attribution terms also apply.

Citation

@misc{arthrod_c3750_mdeberta_base_vanilla,
  author = {arthrod},
  title  = {c3750-mdeberta_base-vanilla-1-2: legacy span-level GLiNER PII checkpoints on mDeBERTa-v3-base},
  year   = {2025},
  doi    = {10.57967/hf/8513},
  url    = {https://huggingface.co/arthrod/c3750-mdeberta_base-vanilla-1-2}
}

@inproceedings{zaratiana2024gliner,
  title     = {GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer},
  author    = {Zaratiana, Urchade and Tomeh, Nadi and Holat, Pierre and Charnois, Thierry},
  booktitle = {NAACL},
  year      = {2024}
}
Downloads last month
27
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for arthrod/c3750-mdeberta_base-vanilla-1-2

Finetuned
(313)
this model