QomSSLab/Anonymizer-4b
is a fine-tuned
Gemma 3 4B
model designed to anonymize Persian legal texts by masking or replacing all personally identifiable information (PII). It is trained on the
QomSSLab/Anonymized_Cases
dataset.
💡 Use Cases
Data privacy for legal document processing.
Preprocessing step for building publicly shareable Persian legal corpora.
Protecting PII in judicial NLP pipelines.
🧠 Model Details
Base Model
: Gemma 3 4B
Language
: Persian (Farsi)
Training Data
: Synthetic and real anonymized Persian legal cases.
Task
: Text-to-text generation (anonymization)
📦 Example Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
from transformers import pipeline
model = AutoModelForTokenClassification.from_pretrained("QomSSLab/Anonymizer-xlm-roberta", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("QomSSLab/Anonymizer-xlm-roberta")
ner = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
text="پروندهای درباره ازدواج بین هانیه و عبدالرحیم با اطلاعات هویتی متعدد"
entities = ner(text)
for ent in entities:
print(f"Entity: {ent['word'],ent['start'], ent['end']}, Type: {ent['entity_group']}, Score: {ent['score']:.4f}")
📊 Evaluation
The model was evaluated qualitatively on a diverse collection of Persian legal documents. It effectively identifies and anonymizes a range of personally identifiable information (PII), including:
Full names
National IDs
Addresses
Dates of birth
Case numbers
Geographic locations
The model is particularly well-suited for preprocessing court cases for research, public data release, or downstream tasks like summarization and classification while preserving privacy.
Limitations
May occasionally miss rare or out-of-distribution PII formats.
Not guaranteed to anonymize very short or extremely noisy texts.
Trained primarily on formal legal language; performance may degrade on informal Persian.
📁 Dataset
This model was fine-tuned on the
QomSSLab/Anonymized_Cases
dataset, which includes manually and synthetically anonymized court documents and legal filings in Persian. The dataset contains a mix of real and simulated entities, helping the model generalize across varied legal formats and writing styles.
Runs of QomSSLab Anonymizer-xlm-roberta on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About Anonymizer-xlm-roberta huggingface.co Model
Anonymizer-xlm-roberta huggingface.co
Anonymizer-xlm-roberta huggingface.co is an AI model on huggingface.co that provides Anonymizer-xlm-roberta's model effect (), which can be used instantly with this QomSSLab Anonymizer-xlm-roberta model. huggingface.co supports a free trial of the Anonymizer-xlm-roberta model, and also provides paid use of the Anonymizer-xlm-roberta. Support call Anonymizer-xlm-roberta model through api, including Node.js, Python, http.
Anonymizer-xlm-roberta huggingface.co is an online trial and call api platform, which integrates Anonymizer-xlm-roberta's modeling effects, including api services, and provides a free online trial of Anonymizer-xlm-roberta, you can try Anonymizer-xlm-roberta online for free by clicking the link below.
QomSSLab Anonymizer-xlm-roberta online free url in huggingface.co:
Anonymizer-xlm-roberta is an open source model from GitHub that offers a free installation service, and any user can find Anonymizer-xlm-roberta on GitHub to install. At the same time, huggingface.co provides the effect of Anonymizer-xlm-roberta install, users can directly use Anonymizer-xlm-roberta installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Anonymizer-xlm-roberta install url in huggingface.co: