CoolFace
Modelpublic

AI45Research/SafeWork-RM-Knowledge-72B

sourceHugging Faceapache-2.0updated 11mo agoView on Hugging Face
0likes13downloads
Model Card

SafeWork-RM-Knowledge-72B

📂 GitHub · 📜Technical Report · 💬Online Chat

<div align="center"> <img alt="image" src="https://cdn-uploads.huggingface.co/production/uploads/666fe1a5b07525f0bde69c27/9VqjAkK1Lshl3TVpMFV9-.png"> </div>

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.

<div align="center">

ai45

</div>

Model Zoo

The SafeWork-R1 Reward Models serve as the multi-principled verifiers that guide reinforcement learning in the SafeLadder framework. They are trained with curated datasets of safety, moral reasoning, and factual verification dialogues.

<table> <tr> <th>Reward Model</th> <th>Type</th> <th>Base Model</th> <th>Link</th> </tr> <tr> <td>SafeWork-RM-Safety-7B</td> <td>Safety Verifier</td> <td>Qwen2.5-7B</td> <td><a href="https://huggingface.co/AI45Research/SafeWork-RM-Safety-7B">🤗 link</a></td> </tr> <tr> <td>SafeWork-RM-Value-72B</td> <td>Value Verifier</td> <td>Qwen2.5-72B</td> <td><a href="https://huggingface.co/AI45Research/SafeWork-RM-Value-72B">🤗 link</a></td> </tr> <tr> <td>SafeWork-RM-Knowledge-72B</td> <td>Knowledge Verifier</td> <td>Qwen2.5-72B</td> <td><a href="https://huggingface.co/AI45Research/SafeWork-RM-Knowledge-72B">🤗 link</a></td> </tr> </table>

Performance

ModelJudgeBenchVLRewardBenchMMRewardBenchAvg.
Qwen2.5-VL-7B26.334.924.928.7
Qwen2.5-VL-72B50.056.251.352.5
GPT-4o45.349.360.651.7
Claude Sonnet 3.749.353.256.152.8
Claude Sonnet 3.7 (thinking)62.061.069.464.1
Knowledge Verifier 7B54.961.955.257.3
Knowledge Verifier 72B72.766.065.668.1

Quick Start

python
import torch
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info


model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
    "AI45Research/SafeWork-RM-Knowledge-72B", dtype="auto", device_map="cuda"
)
processor = AutoProcessor.from_pretrained("AI45Research/SafeWork-RM-Knowledge-72B")

SYSTEM_PROMPT = "Carefully evaluate the Answer's correctness for the given Question. The Answer must be factually accurate and complete. Base your judgment on objective knowledge, not the Answer's phrasing alone. If fully correct, output 'Yes'; otherwise, 'No'. Respond only with a single word: Yes/No.\n\n"

QUESTION_RESPONSE_FORMAT = "Question: {question}\n\nModel's Response:\n{response}"

messages=[
    {
        "role": "system",
        "content":[
            {"type": "text", "text": SYSTEM_PROMPT}
        ]
    },
    {
        "role": "user",
        "content": [
            {"type": "image", "image": "file:///path/to/image"},
            {"type": "text", "text": QUESTION_RESPONSE_FORMAT.format(question="your question", response="your response")},
        ],
    },
]

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")

generated_output = model.generate(
    **inputs,
    max_new_tokens=1,
    do_sample=False,  
    return_dict_in_generate=True,
    output_scores=True
)

certain_id = processor.tokenizer.convert_tokens_to_ids("Yes")
uncertain_id = processor.tokenizer.convert_tokens_to_ids("No")

certain_prob, uncertain_prob = torch.nn.functional.softmax(generated_output.scores[0][0, [certain_id, uncertain_id]], dim=-1).tolist()
reward = (certain_prob + (1 - uncertain_prob)) / 2

print(reward)

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}
}