How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="PolicyShiftGuard/PolicyShiftGuard-3B-RP-SFT")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("PolicyShiftGuard/PolicyShiftGuard-3B-RP-SFT")
model = AutoModelForMultimodalLM.from_pretrained("PolicyShiftGuard/PolicyShiftGuard-3B-RP-SFT")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

PolicyShiftGuard-3B-RP-SFT

This repository releases the Stage-1 Randomized Policy SFT (RP-SFT) checkpoint for the 3B PolicyShiftGuard model.

RP-SFT is the first training stage in PolicyShiftGuard. It trains a Qwen2.5-VL guardrail model to read policy bundles under randomized policy identifiers and randomized policy ordering. This checkpoint is provided for reproducibility and ablation use. The final public model after the second-stage adaptation is available at PolicyShiftGuard/PolicyShiftGuard-3B.

Intended Use

Use this checkpoint when you want to reproduce the two-stage training pipeline or compare Stage-1 RP-SFT against the final BP-Adapt model.

For standard evaluation or deployment, use the final model instead:

Dataset

The model is trained with PolicyShiftBench supervision:

Notes

  • This is an intermediate checkpoint, not the final model reported as the main PolicyShiftGuard model.
  • This checkpoint corresponds to the randomized-policy no-think Stage-1 SFT setting.
  • Training-state files such as optimizer states are intentionally not included.
Downloads last month
16
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for PolicyShiftGuard/PolicyShiftGuard-3B-RP-SFT

Finetuned
(815)
this model

Dataset used to train PolicyShiftGuard/PolicyShiftGuard-3B-RP-SFT