Instructions to use Epivolis/enforcer-alpha-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Epivolis/enforcer-alpha-3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Epivolis/enforcer-alpha-3b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Epivolis/enforcer-alpha-3b") model = AutoModelForCausalLM.from_pretrained("Epivolis/enforcer-alpha-3b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Epivolis/enforcer-alpha-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Epivolis/enforcer-alpha-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Epivolis/enforcer-alpha-3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Epivolis/enforcer-alpha-3b
- SGLang
How to use Epivolis/enforcer-alpha-3b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Epivolis/enforcer-alpha-3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Epivolis/enforcer-alpha-3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Epivolis/enforcer-alpha-3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Epivolis/enforcer-alpha-3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Epivolis/enforcer-alpha-3b with Docker Model Runner:
docker model run hf.co/Epivolis/enforcer-alpha-3b
Enforcer Alpha
Enforcer is a family of transformer models derived from EleutherAI's foundational pythia family of open source pre-trained language models. This model is the 2.8 billion parameter model based on pythia-2.8b. While Epivolis Enforcer specifically focuses on content safety and user input screening, we plan on gradually releasing additional models created during the experimentation phase out to the public under a permissible license agreement.
The most recent model with abilities to detect & block prompt injection will remain closed source. You can access a playground of it here.
If you want to test the alpha functionalities, you can access the huggingface spaces of it here.
Model Overview
Enforcer is a generative language model trained with a corpus of open source and commercially usable red team prompts in combination with our augmentation techniques. The total number of training prompts used is ~50,000 covering general fields like detecting intent to harm, deceieve, discriminatory or malicious language.
While Epivolis is not a language interfacing model, it can output a safety rating for an input. The model outputs two tokens to indicate safety. If the input is unsafe, the model will also output a reason for the rating. However, it is important to note that while the model is designed to generate safe text, it cannot guarantee that all generated text will be safe, especially for prompts that are outside the scope of the training dataset as zero shot input screening has not been comprehensively tested against.
Known Limitations
Enforcer Alpha is merely the first iteration of fine tuning generative models to guage content safety. And while quantitative benchmarking is ongoing, it is not designed to catch targetted attacks like jailbreak prompting; e.g. subversive messaging, token smuggling, or roleplaying.
Furthermore, the model may struggle with certain types of tones or prompts, including those with complex syntax or requiring domain-specific/cultural knowledge. While the training dataset is selected for alignment and safety, the model may still allow some subversive prompts through the filter and may raise false alarms on certain prompts containing language commonly associated with malicious intent.
- Downloads last month
- -
# Gated model: Login with a HF token with gated access permission hf auth login