Downloads · 30 days
260
21% of all-time downloads
anonymous-omniguard/OmniGuard-7B
OmniGuard-7B is a text generation model from anonymous-omniguard. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
OmniGuard is a multimodal safety evaluation model designed to assess content safety across text, images, audio, and video. Built on the Qwen2.5-Omni architecture, it provides structured safety reasoning and policy enf…
Downloads · 30 days
260
21% of all-time downloads
All-time downloads
1.2K
Public
Parameters
8.9B
17.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors17.9 GB · 100%
From the Hugging Face model README
OmniGuard is a multimodal safety evaluation model designed to assess content safety across text, images, audio, and video. Built on the Qwen2.5-Omni architecture, it provides structured safety reasoning and policy enforcement.
We provide two model sizes:
# Install core dependencies
pip install torch transformers accelerate
# Install Qwen2.5-Omni support
pip uninstall transformers -y
pip install git+https://github.com/huggingface/[email protected]
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "anonymous-omniguard/OmniGuard-7B"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
attn_implementation="flash_attention_2" # Recommended
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Text-only safety evaluation
messages = [
{"role": "user", "content": "Please analyze the safety of this content: [Your content here]"}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=False
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
This model is released under the Apache-2.0 license.
For issues, questions, or contributions:
Anonymous release accompanying a paper currently under peer review.