Downloads · 30 days
13
4% of all-time downloads
nisarg6502/Llama3-150M-PII-Redactor
Llama3-150M-PII-Redactor is a text generation model from nisarg6502. Use it when you need the model to write or continue text. It is set up for pytorch. The card lists the license as apache-2.0.
This is a custom 150-million parameter autoregressive language model built entirely from scratch in PyTorch. It has been modernized with Llama-3 architectural features and fine-tuned specifically to act as a local Per…
Downloads · 30 days
13
4% of all-time downloads
All-time downloads
370
Public
Repo size
2.2 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.5 GB · 100%
From the Hugging Face model README
This is a custom 150-million parameter autoregressive language model built entirely from scratch in PyTorch. It has been modernized with Llama-3 architectural features and fine-tuned specifically to act as a local Personally Identifiable Information (PII) redaction microservice.
safetensors (Optimized for secure, CPU-bound inference).This model is designed to intercept and scrub sensitive entities (names, emails, phone numbers, addresses, etc.) from raw text before the data is transmitted to external cloud services (like OpenAI or Anthropic). It acts as a highly constrained, local privacy firewall.
Because this is a custom architecture, it does not use the standard transformers auto-classes. You must load the weights into your custom PyTorch class.
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
import torch
# 1. Download the weights securely
model_path = hf_hub_download(
repo_id="nisarg6502/Llama3-150M-PII-Redactor",
filename="pii_model_epoch_3.safetensors"
)
# 2. Load into your custom GPT PyTorch class
device = torch.device("cpu")
state_dict = load_file(model_path, device=str(device))
# model = GPT(config) # (Instantiate your custom class here)
model.load_state_dict(state_dict)
model.eval()
ai4privacy/pii-masking-200k dataset.