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 in transformers, vLLM, or llama.cpp.

Benchmarks

Vail DLP 0.8B 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 (from Qwen/Qwen3.5-0.8B)
  • Method: LoRA with mlx-lm, merged into the 4-bit weights with mlx_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 .example domains, 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 labelled NAME instead of EMAIL
    • 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.

  • 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
Safetensors
Model size
0.8B params
Tensor type
U32
路
BF16
路
F32
路
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for iaz33m/Vail-DLP-0.8B-MLX-4bit

Finetuned
(1)
this model