Instructions to use ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward
- SGLang
How to use ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward 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 "ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward with Docker Model Runner:
docker model run hf.co/ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward
PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward
A privacy-aligned variant of nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16, fine-tuned with RL against an annotation-conditioned reward: a pairwise LLM judge that scores candidate responses conditioned on per-example privacy annotations.
Training
- Method: online policy optimization (RL), KL-regularized to the base policy.
- Algorithm: SAPO (
tau_pos = 1.0,tau_neg = 1.05). - Reward: a pairwise LLM judge conditioned on the example's privacy annotations
- Judge model:
nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16(thinking enabled).
Hyperparameters
| Base model | nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16 |
| Algorithm | SAPO |
| KL coefficient | 0.002 |
| Learning rate | 1e-6 (constant w/ warmup, 10 step warmup) |
| Weight decay | 0.01 |
| Global prompt batch size | 64 |
| Precision | bf16 |
| Num generations per prompt | 4 |
Paper & citation
For full details on the method, data, and evaluation, please read our paper:
PrivacyAlign: Contextual Privacy Alignment for LLM Agents
@article{tamber2026privacyaligncontextualprivacyalignment,
title={PrivacyAlign: Contextual Privacy Alignment for LLM Agents},
author={Manveer Singh Tamber and Abhay Puri and Marc-Etienne Brunet and Perouz Taslakian and Jimmy Lin and Spandana Gella},
year={2026},
eprint={2606.21710},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2606.21710},
}
- Downloads last month
- 2
Model tree for ServiceNow/PrivacyAlign-Nemotron-3-Nano-4B-Annotation-Conditioned-Reward
Base model
nvidia/NVIDIA-Nemotron-Nano-12B-v2-Base