Token Classification
MLX
openmed
openai_privacy_filter
apple-silicon
pii
privacy
de-identification
redaction
quantized
int8
q8
medical
clinical
Instructions to use OpenMed/privacy-filter-mlx-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OpenMed/privacy-filter-mlx-8bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir privacy-filter-mlx-8bit OpenMed/privacy-filter-mlx-8bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
| { | |
| "model_type": "openai_privacy_filter", | |
| "inference_contract_version": 1, | |
| "encoding": "o200k_base", | |
| "num_hidden_layers": 8, | |
| "num_experts": 128, | |
| "experts_per_token": 4, | |
| "vocab_size": 200064, | |
| "num_labels": 33, | |
| "hidden_size": 640, | |
| "intermediate_size": 640, | |
| "head_dim": 64, | |
| "num_attention_heads": 14, | |
| "num_key_value_heads": 2, | |
| "sliding_window": 257, | |
| "bidirectional_context": true, | |
| "bidirectional_left_context": 128, | |
| "bidirectional_right_context": 128, | |
| "initial_context_length": 4096, | |
| "max_position_embeddings": 131072, | |
| "default_n_ctx": 128000, | |
| "rope_theta": 150000, | |
| "rope_scaling_factor": 32.0, | |
| "rope_ntk_alpha": 1.0, | |
| "rope_ntk_beta": 32.0, | |
| "param_dtype": "bfloat16", | |
| "_name_or_path": "openai/privacy-filter", | |
| "_mlx_task": "token-classification", | |
| "_mlx_family": "openai-privacy-filter", | |
| "_mlx_model_type": "openai-privacy-filter", | |
| "_mlx_runtime": { | |
| "experimental": true, | |
| "decode": "bioes-viterbi", | |
| "tokenizer": "tiktoken" | |
| }, | |
| "num_local_experts": 128, | |
| "num_experts_per_tok": 4, | |
| "rms_norm_eps": 1e-05, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-account_number", | |
| "2": "I-account_number", | |
| "3": "E-account_number", | |
| "4": "S-account_number", | |
| "5": "B-private_address", | |
| "6": "I-private_address", | |
| "7": "E-private_address", | |
| "8": "S-private_address", | |
| "9": "B-private_date", | |
| "10": "I-private_date", | |
| "11": "E-private_date", | |
| "12": "S-private_date", | |
| "13": "B-private_email", | |
| "14": "I-private_email", | |
| "15": "E-private_email", | |
| "16": "S-private_email", | |
| "17": "B-private_person", | |
| "18": "I-private_person", | |
| "19": "E-private_person", | |
| "20": "S-private_person", | |
| "21": "B-private_phone", | |
| "22": "I-private_phone", | |
| "23": "E-private_phone", | |
| "24": "S-private_phone", | |
| "25": "B-private_url", | |
| "26": "I-private_url", | |
| "27": "E-private_url", | |
| "28": "S-private_url", | |
| "29": "B-secret", | |
| "30": "I-secret", | |
| "31": "E-secret", | |
| "32": "S-secret" | |
| }, | |
| "label2id": { | |
| "B-account_number": 1, | |
| "B-private_address": 5, | |
| "B-private_date": 9, | |
| "B-private_email": 13, | |
| "B-private_person": 17, | |
| "B-private_phone": 21, | |
| "B-private_url": 25, | |
| "B-secret": 29, | |
| "E-account_number": 3, | |
| "E-private_address": 7, | |
| "E-private_date": 11, | |
| "E-private_email": 15, | |
| "E-private_person": 19, | |
| "E-private_phone": 23, | |
| "E-private_url": 27, | |
| "E-secret": 31, | |
| "I-account_number": 2, | |
| "I-private_address": 6, | |
| "I-private_date": 10, | |
| "I-private_email": 14, | |
| "I-private_person": 18, | |
| "I-private_phone": 22, | |
| "I-private_url": 26, | |
| "I-secret": 30, | |
| "O": 0, | |
| "S-account_number": 4, | |
| "S-private_address": 8, | |
| "S-private_date": 12, | |
| "S-private_email": 16, | |
| "S-private_person": 20, | |
| "S-private_phone": 24, | |
| "S-private_url": 28, | |
| "S-secret": 32 | |
| }, | |
| "_mlx_viterbi_biases": { | |
| "transition_bias_background_stay": 0.0, | |
| "transition_bias_background_to_start": 0.0, | |
| "transition_bias_end_to_background": 0.0, | |
| "transition_bias_end_to_start": 0.0, | |
| "transition_bias_inside_to_continue": 0.0, | |
| "transition_bias_inside_to_end": 0.0 | |
| }, | |
| "hidden_dropout_prob": 0.1, | |
| "attention_probs_dropout_prob": 0.1, | |
| "layer_norm_eps": 1e-12, | |
| "swiglu_limit": 7.0, | |
| "_mlx_quantization": { | |
| "bits": 8, | |
| "group_size": 64, | |
| "mode": "affine" | |
| }, | |
| "_mlx_weights_format": "safetensors" | |
| } |