SafeWork-R1-Qwen2.5VL-7B

📂 GitHub · 📜Technical Report · 💬Online Chat

image

Overview

We introduce SafeWork-R1, a cutting-edge multimodal reasoning model demonstrating the coevolution of safety and general intelligence under the guiding principle of the AI-45° Law.

SafeWork-R1 is built upon the SafeLadder framework, which integrates large-scale, progressive, safety-oriented reinforcement learning post-training supported by multi-principled verifiers. Unlike conventional RLHF that simply learns human preferences, SafeLadder enables SafeWork-R1 to develop intrinsic safety reasoning and self-reflection abilities, leading to emergent safety “aha” moments.

ai45

Model Zoo

Model Variant Parameters Base Model Link
SafeWork-R1 72B Qwen2.5-VL-72B 🤗 link
SafeWork-R1-InternVL3-78B 78B InternVL3-78B 🤗 link
SafeWork-R1-DeepSeek-70B 70B Deepseek-R1-DistillLlama-70B 🤗 link
SafeWork-R1-Qwen2.5VL-7B 7B Qwen2.5-VL-7B 🤗 link

Quick Start

from transformers import AutoProcessor, AutoModelForCausalLM
import torch

model_name = "AI45Research/SafeWork-R1-Qwen2.5VL-7B"
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image",
                "image": "file:///path/to/image",
            },
            {"type": "text", "text": "Prompt containing harmful content."},
        ],
    }
]

# Preparation for inference
text = processor.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
    text=[text],
    images=image_inputs,
    videos=video_inputs,
    padding=True,
    return_tensors="pt",
)
inputs = inputs.to("cuda")

# Inference: Generation of the output
generated_ids = model.generate(**inputs, max_new_tokens=8192)
generated_ids_trimmed = [
    out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
    generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)

License

This project is released under the Apache 2.0 license.

Citation

If you find this work useful, feel free to give us a cite.

@misc{lab2025safework,
  title={SafeWork-R1: Coevolving Safety and Intelligence under the AI-45 Law},
  author={Lab, Shanghai AI and Bao, Yicheng and Chen, Guanxu and Chen, Mingkang and Chen, Yunhao and Chen, Chiyu and Chen, Lingjie and Chen, Sirui and Chen, Xinquan and Cheng, Jie and others},
  journal={arXiv preprint arXiv:2507.18576},
  year={2025}
}
Downloads last month
12
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AI45Research/SafeWork-R1-Qwen2.5VL-7B

Finetuned
(852)
this model
Quantizations
2 models