Instructions to use iaz33m/Vail-DLP-0.8B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use iaz33m/Vail-DLP-0.8B-MLX-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("iaz33m/Vail-DLP-0.8B-MLX-4bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use iaz33m/Vail-DLP-0.8B-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "iaz33m/Vail-DLP-0.8B-MLX-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "iaz33m/Vail-DLP-0.8B-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use iaz33m/Vail-DLP-0.8B-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "iaz33m/Vail-DLP-0.8B-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "iaz33m/Vail-DLP-0.8B-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iaz33m/Vail-DLP-0.8B-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use iaz33m/Vail-DLP-0.8B-MLX-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "iaz33m/Vail-DLP-0.8B-MLX-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default iaz33m/Vail-DLP-0.8B-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use iaz33m/Vail-DLP-0.8B-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "iaz33m/Vail-DLP-0.8B-MLX-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "iaz33m/Vail-DLP-0.8B-MLX-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Vail DLP 0.8B (MLX, 4-bit)
Vail DLP 0.8B is a small open-weight model fine-tuned for data loss prevention. Give it a message and it returns JSON listing every sensitive value in it: emails, phone numbers, SSNs, card numbers, API keys, passwords, full names, postal addresses, bank accounts, and other ID numbers. Each value is copied exactly as written.
It is Qwen3.5-0.8B (4-bit MLX) with a LoRA adapter merged in. It runs locally on
Apple Silicon through mlx-lm, uses about
1 GB of memory, and answers in about 0.4 s per message on an M1 Max.
MLX only. These are 4-bit MLX weights. They run on Apple Silicon Macs with
mlx-lm. They do not load intransformers, vLLM, or llama.cpp.
Benchmarks
Quick start
pip install -U mlx-lm
Python
import json
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
INSTRUCTION = """You are a Data Loss Prevention (DLP) analyzer.
Extract every real sensitive value from the text. Copy each value exactly as it appears, with no extra words.
Return ONLY a valid JSON object with this schema:
{
"sensitive": true/false,
"entities": [
{"type": "EMAIL|PHONE|SSN|CREDIT_CARD|API_KEY|PASSWORD|NAME|ADDRESS|BANK_ACCOUNT|OTHER", "value": "exact value found"}
]
}
Rules:
- Use only those types. Do not invent types.
- NAME means a full personal name. A lone first name, a role, a team, or a project name is not a NAME.
- ADDRESS means a postal address. An email is EMAIL, not ADDRESS.
- OTHER means a government, passport, medical, tax, routing, or similar ID number.
- API_KEY includes live tokens and secret keys. A git hash, request id, or documentation sample is not an API_KEY.
- Still extract a real secret if the text says it was revoked or should not have been pasted.
- Do not extract dates, times, money, counts, ticket numbers, purchase orders, invoice ids, filenames, build numbers, IP addresses, URLs, room names, masked values, incomplete tokens, or placeholders and documentation samples.
- Desk ref, File marker, Copy id, and Archive tag lines are filing markers, not sensitive values.
If nothing sensitive is found, return {"sensitive": false, "entities": []}."""
model, tokenizer = load("iaz33m/Vail-DLP-0.8B-MLX-4bit")
sampler = make_sampler(temp=0.0)
def scan(text: str) -> dict:
messages = [{"role": "user", "content": f"{INSTRUCTION}\n\nText: {text}"}]
prompt = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
enable_thinking=False, # the model was trained with thinking off
tokenize=False,
)
output = generate(model, tokenizer, prompt=prompt, max_tokens=512, sampler=sampler)
return json.loads(output)
print(scan("Our prod key is sk-live-9fA2kQ7xLm3PzR8tVb1N, rotate it after the demo."))
# {'sensitive': True, 'entities': [{'type': 'API_KEY', 'value': 'sk-live-9fA2kQ7xLm3PzR8tVb1N'}]}
Command line
python -m mlx_lm generate \
--model iaz33m/Vail-DLP-0.8B-MLX-4bit \
--chat-template-config '{"enable_thinking": false}' \
--temp 0 --max-tokens 512 \
--prompt "$(cat instruction.txt)
Text: Our prod key is sk-live-9fA2kQ7xLm3PzR8tVb1N, rotate it after the demo."
instruction.txt holds the INSTRUCTION text from the Python example.
Prompt format
The model was trained on one fixed prompt. For the results below, send exactly:
{INSTRUCTION}
Text: {your message}
as a single user turn, with thinking disabled (enable_thinking=False) and greedy
decoding (temp=0). A different instruction or system prompt will lower accuracy.
Output
{
"sensitive": true,
"entities": [
{"type": "EMAIL", "value": "exact value found"}
]
}
Types: EMAIL, PHONE, SSN, CREDIT_CARD, API_KEY, PASSWORD, NAME,
ADDRESS, BANK_ACCOUNT, OTHER (government, passport, medical, tax, routing, or similar IDs).
Memory
Peak memory while running, measured with MLX on Apple Silicon (unified memory):
| Workload | Peak memory |
|---|---|
| Weights loaded | 0.40 GB |
| Typical message (~425 prompt tokens, ~35 output tokens) | 1.03 GB |
| ~2.9K-token input | 1.65 GB |
| ~11K-token input | 2.08 GB |
| ~45K-token input | 4.72 GB |
For messages like the benchmark, budget about 1 GB. Long inputs cost more because of prompt processing, so split long documents into chunks. The model was only evaluated on short messages.
Training
- Base:
mlx-community/Qwen3.5-0.8B-4bit(fromQwen/Qwen3.5-0.8B) - Method: LoRA with
mlx-lm, merged into the 4-bit weights withmlx_lm fuse - LoRA: rank 16, scale 20, dropout 0, last 16 layers
- Optimizer: Adam, learning rate 2e-5, batch size 4, max sequence length 1024, loss on the answer only (prompt masked), seed 42
- Data: 1,875 training and 375 validation examples, all synthetic, in the same format as the benchmarks
Limitations
Trained on synthetic data only. All emails in the training and test data use
.exampledomains, and the ID numbers are generated. On hand-written real-world messages, spot checks found mistakes the benchmark does not show:- an email on a real domain (
maria.lopez@acme-corp.com) was labelledNAMEinstead ofEMAIL - a bank account number was labelled
CREDIT_CARD - a routing number in the same sentence was missed
Test it on your own data before relying on it.
- an email on a real domain (
English only. Short messages only (the benchmark averages about 270 characters).
One fixed prompt. Changing the instruction or turning thinking on will lower accuracy.
Not a compliance control on its own. Use it alongside rule-based detectors (checksums, regexes, secret scanners) and human review.
License
Apache 2.0, inherited from Qwen3.5.
- Downloads last month
- 32
4-bit
Model tree for iaz33m/Vail-DLP-0.8B-MLX-4bit
Base model
Qwen/Qwen3.5-0.8B-Base