Downloads · 30 days
231
6% of all-time downloads
RichardErkhov/ab-ai_-_PII-Model-Phi3-Mini-gguf
ab-ai_-_PII-Model-Phi3-Mini-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
231
6% of all-time downloads
All-time downloads
3.6K
Public
Repo size
43.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf51.1 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
PII-Model-Phi3-Mini - GGUF
| Name | Quant method | Size |
|---|---|---|
| PII-Model-Phi3-Mini.Q2_K.gguf | Q2_K | 1.32GB |
| PII-Model-Phi3-Mini.IQ3_XS.gguf | IQ3_XS | 1.51GB |
| PII-Model-Phi3-Mini.IQ3_S.gguf | IQ3_S | 1.57GB |
| PII-Model-Phi3-Mini.Q3_K_S.gguf | Q3_K_S | 1.57GB |
| PII-Model-Phi3-Mini.IQ3_M.gguf | IQ3_M | 1.73GB |
| PII-Model-Phi3-Mini.Q3_K.gguf | Q3_K | 1.82GB |
| PII-Model-Phi3-Mini.Q3_K_M.gguf | Q3_K_M | 1.82GB |
| PII-Model-Phi3-Mini.Q3_K_L.gguf | Q3_K_L | 1.94GB |
| PII-Model-Phi3-Mini.IQ4_XS.gguf | IQ4_XS | 1.93GB |
| PII-Model-Phi3-Mini.Q4_0.gguf | Q4_0 | 2.03GB |
| PII-Model-Phi3-Mini.IQ4_NL.gguf | IQ4_NL | 2.04GB |
| PII-Model-Phi3-Mini.Q4_K_S.gguf | Q4_K_S | 2.04GB |
| PII-Model-Phi3-Mini.Q4_K.gguf | Q4_K | 2.23GB |
| PII-Model-Phi3-Mini.Q4_K_M.gguf | Q4_K_M | 2.23GB |
| PII-Model-Phi3-Mini.Q4_1.gguf | Q4_1 | 2.24GB |
| PII-Model-Phi3-Mini.Q5_0.gguf | Q5_0 | 2.46GB |
| PII-Model-Phi3-Mini.Q5_K_S.gguf | Q5_K_S | 2.46GB |
| PII-Model-Phi3-Mini.Q5_K.gguf | Q5_K | 2.62GB |
| PII-Model-Phi3-Mini.Q5_K_M.gguf | Q5_K_M | 2.62GB |
| PII-Model-Phi3-Mini.Q5_1.gguf | Q5_1 | 2.68GB |
| PII-Model-Phi3-Mini.Q6_K.gguf | Q6_K | 2.92GB |
| PII-Model-Phi3-Mini.Q8_0.gguf | Q8_0 | 3.78GB |
license: mit language:
This repository contains a fine-tuned version of the Phi3 Mini model for detecting personally identifiable information (PII). The model has been specifically trained to recognize various PII entities in text, making it a powerful tool for tasks such as data redaction, privacy protection, and compliance with data protection regulations.
The model is capable of detecting the following PII entities:
Personal Information:
firstnamemiddlenamelastnamesexdob (Date of Birth)agegenderheighteyecolorContact Information:
emailphonenumberurlusernameuseragentAddress Information:
streetcitystatecountyzipcodecountrysecondaryaddressbuildingnumberordinaldirectionGeographical Information:
nearbygpscoordinateOrganizational Information:
companynamejobtitlejobareajobtypeFinancial Information:
accountnameaccountnumbercreditcardnumbercreditcardcvvcreditcardissueribanbiccurrencycurrencynamecurrencysymbolcurrencycodeamountUnique Identifiers:
pinssnimei (Phone IMEI)mac (MAC Address)vehiclevin (Vehicle VIN)vehiclevrm (Vehicle VRM)Cryptocurrency Information:
bitcoinaddresslitecoinaddressethereumaddressOther Information:
ip (IP Address)ipv4ipv6maskednumberpasswordtimeordinaldirectionprefix### Instruction:
Identify and extract the following PII entities from the text, if present: companyname, pin, currencyname, email, phoneimei, litecoinaddress, currency, eyecolor, street, mac, state, time, vehiclevin, jobarea, date, bic, currencysymbol, currencycode, age, nearbygpscoordinate, amount, ssn, ethereumaddress, zipcode, buildingnumber, dob, firstname, middlename, ordinaldirection, jobtitle, bitcoinaddress, jobtype, phonenumber, height, password, ip, useragent, accountname, city, gender, secondaryaddress, iban, sex, prefix, ipv4, maskednumber, url, username, lastname, creditcardcvv, county, vehiclevrm, ipv6, creditcardissuer, accountnumber, creditcardnumber. Return the output in JSON format.
### Input:
Greetings, Mason! Let's celebrate another year of wellness on 14/01/1977. Don't miss the event at 176,Apt. 388.
### Output:
To use this model, you'll need to have the transformers library installed:
pip install transformers
from transformers import AutoTokenizer, AutoModelForTokenClassification
# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("ab-ai/PII-Model-Phi3-Mini")
model = AutoModelForTokenClassification.from_pretrained("ab-ai/PII-Model-Phi3-Mini")
input_text = "Hi Abner, just a reminder that your next primary care appointment is on 23/03/1926. Please confirm by replying to this email [email protected]."
model_prompt = f"""### Instruction:
Identify and extract the following PII entities from the text, if present: companyname, pin, currencyname, email, phoneimei, litecoinaddress, currency, eyecolor, street, mac, state, time, vehiclevin, jobarea, date, bic, currencysymbol, currencycode, age, nearbygpscoordinate, amount, ssn, ethereumaddress, zipcode, buildingnumber, dob, firstname, middlename, ordinaldirection, jobtitle, bitcoinaddress, jobtype, phonenumber, height, password, ip, useragent, accountname, city, gender, secondaryaddress, iban, sex, prefix, ipv4, maskednumber, url, username, lastname, creditcardcvv, county, vehiclevrm, ipv6, creditcardissuer, accountnumber, creditcardnumber. Return the output in JSON format.
### Input:
{input_text}
### Output: """
inputs = tokenizer(model_prompt, return_tensors="pt").to(device)
# adjust max_new_tokens according to your need
outputs = model.generate(**inputs, do_sample=True, max_new_tokens=120)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response) #{'middlename': ['Abner'], 'dob': ['23/03/1926'], 'email': ['[email protected]']}