Run this model with HF Jobs

Run aavhawkeye/privacy-gateway-adapter on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/aavhawkeye/privacy-gateway-adapter. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/aavhawkeye/privacy-gateway-adapter on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/aavhawkeye/privacy-gateway-adapter. Ask me which benchmark to run, then save the scores and the per-example results to a new private dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/aavhawkeye/privacy-gateway-adapter. Push it to a new private model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Team Red Privacy Gateway Adapter

A QLoRA adapter fine-tuned on top of unsloth/gpt-oss-20b-bnb-4bit (OpenAI GPT-OSS 20B, 4-bit quantized).

Purpose

The adapter was trained on two tasks: replacing institution-specific identifiers with placeholders and returning a structured refusal when a request asks for the original values. The output format includes reasoning hints and permitted audiences for local restoration.

Training Details

Parameter Value
Base model unsloth/gpt-oss-20b-bnb-4bit
Method QLoRA (4-bit base + LoRA r=16, alpha=32)
Training examples 4,800 (train) + 800 (validation)
Epochs 2
Final train loss 0.00145
Training hardware NVIDIA A100 80GB (Modal.com)
Training time ~2 hours

Usage

from unsloth import FastLanguageModel
from peft import PeftModel
import json

model, tokenizer = FastLanguageModel.from_pretrained(
    "unsloth/gpt-oss-20b-bnb-4bit",
    max_seq_length=3072,
    load_in_4bit=True,
)
model = PeftModel.from_pretrained(model, "aavhawkeye/privacy-gateway-adapter")
FastLanguageModel.for_inference(model)

query = {
    "task": "privacy_gateway",
    "query": "Prepare this finding bundle for Gemini. Hide local identifiers but preserve the cybersecurity meaning.",
    "context": { ... }
}

prompt = (
    "### Instruction:\n"
    "You are Team Red's local privacy gateway. Transform the raw cybersecurity context "
    "into the exact JSON packet contract used before hosted reasoning. Preserve meaning, "
    "create stable placeholders, and keep restore audiences on each entity.\n\n"
    f"### Input:\n{json.dumps(query)}\n\n"
    "### Response:\n"
)

inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=1024, temperature=0.05)
response = tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True)
print(json.loads(response))

Output Contract

Sanitization output

{
  "gateway_mode": "deterministic_local",
  "sanitized_query": "...",
  "sanitized_context": {},
  "entity_count": 6,
  "entities": [
    {
      "placeholder": "[ASSET_01]",
      "type": "ASSET",
      "original_value": "District Sign-In Hub",
      "reasoning_hint": "education / identity_portal / critical",
      "restore_audiences": ["SYSADMIN"]
    }
  ],
  "reasoning_hints": [...]
}

Refusal output (for reverse-lookup attempts)

{
  "decision": "refuse",
  "policy": "no_reverse_lookup",
  "message": "Do not reveal, reconstruct, or export protected identifiers from the local placeholder map.",
  "safe_next_step": "Keep the placeholder map local and use deterministic local rehydration for approved sysadmins."
}

Hardware Requirements

Minimum ~18GB VRAM in 4-bit mode. Tested on A100 40GB and A100 80GB.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for aavhawkeye/privacy-gateway-adapter

Adapter
(1)
this model