Token Classification
Transformers
Safetensors
English
gpt2
privacy
pii-detection
pii-redaction
sliding-window-attention
rope
swiglu
text-generation-inference
Instructions to use 8Fai/context-filter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 8Fai/context-filter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="8Fai/context-filter")# Load model directly from transformers import AutoTokenizer, ContextFilterV2 tokenizer = AutoTokenizer.from_pretrained("8Fai/context-filter") model = ContextFilterV2.from_pretrained("8Fai/context-filter") - Notebooks
- Google Colab
- Kaggle
| { | |
| "model_details": { | |
| "name": "Context Filter V2", | |
| "version": "2.1.0", | |
| "type": "Privacy-Focused Token Classification (NER)", | |
| "architecture": "ContextFilterV2 (Custom Transformer)", | |
| "framework": "PyTorch / Modal", | |
| "format": "Safetensors" | |
| }, | |
| "parameters": { | |
| "layers": 10, | |
| "hidden_size": 512, | |
| "attention_heads": 8, | |
| "kv_heads": 4, | |
| "max_sequence_length": 32768, | |
| "sliding_window": 512, | |
| "total_params": "Approx. 45M" | |
| }, | |
| "training_hyperparameters": { | |
| "epochs": 3, | |
| "learning_rate": 0.0004, | |
| "batch_size": 64, | |
| "optimizer": "AdamW", | |
| "lr_scheduler": "Linear with Warmup", | |
| "warmup_steps": 800, | |
| "weight_decay": 0.01 | |
| }, | |
| "dataset_info": { | |
| "train_samples": 500000, | |
| "val_samples": 8000, | |
| "entities_tracked": [ | |
| "PERSON", "EMAIL", "PHONE", "ADDRESS", "SSN", | |
| "CREDITCARD", "IP", "DATE", "ORG", "USERNAME", | |
| "PASSPORT", "DRIVERSLICENSE" | |
| ] | |
| } | |
| } |