Instructions to use RedHatAI/privacy-filter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/privacy-filter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="RedHatAI/privacy-filter")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("RedHatAI/privacy-filter") model = AutoModelForTokenClassification.from_pretrained("RedHatAI/privacy-filter", device_map="auto") - Transformers.js
How to use RedHatAI/privacy-filter with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'RedHatAI/privacy-filter'); - Notebooks
- Google Colab
- Kaggle
Download original/config.json from RedHatAI/privacy-filter: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/RedHatAI/privacy-filter/resolve/main/original/config.json
- Command line
-
hf download hf://RedHatAI/privacy-filter/original/config.json
-
curl -L -o config.json https://huggingface.co/RedHatAI/privacy-filter/resolve/main/original/config.json
707 Bytes
| { | |
| "model_type": "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" | |
| } |