Instructions to use prithivMLmods/VisionGuardrail-Evo2-27B-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use prithivMLmods/VisionGuardrail-Evo2-27B-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir VisionGuardrail-Evo2-27B-MLX prithivMLmods/VisionGuardrail-Evo2-27B-MLX
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
VisionGuardrail-Evo2-27B-MLX
VisionGuardrail-Evo2-27B is a dense 27-billion-parameter multimodal image classification model** based on Qwen/Qwen3.8-27B and trained on the ImageShield-Guardrail-Pro content-safety guardrail dataset. The model is designed to classify visual content as Safe or Unsafe, with a particular focus on detecting Not Safe for Work (NSFW) sensual content and other potentially sensitive visual content. VisionGuardrail-Evo2-27B performs detailed visual analysis of dress codes, clothing exposure, poses, framing, and visual settings to support conservative content-safety classification. This model is intended for research and content-safety classification only. Any outputs generated by this model are the sole responsibility of the user. The authors and hosting platform disclaim all liability for generated content. Users must ensure safe, ethical, and lawful usage.
Model Variants & Storage Footprint
View the tree here: huggingface-tree.hf.space
prithivMLmods/VisionGuardrail-Evo2-27B-MLX (main) [~93.84 GB Total]
├── 4bit/ [~15.02 GB]
│ ├── model shards: 3 safetensors (~15.00 GB)
│ └── metadata & configs (~19.3 MB)
│
├── 8bit/ [~27.52 GB]
│ ├── model shards: 6 safetensors (~27.50 GB)
│ └── metadata & configs (~19.3 MB)
│
└── [BF16 Base Files] [~51.32 GB]
├── model shards: 11 safetensors (~51.30 GB)
└── metadata & configs (~19.3 MB)
Use with mlx
Install the required library:
pip install -U mlx-vlm
BF16 Variant (Base Weights)
The BF16 files reside in the repository root:
CLI (Terminal)
python -m mlx_vlm generate \
--model prithivMLmods/VisionGuardrail-Evo2-27B-MLX \
--max-tokens 256 \
--temperature 0.0 \
--prompt "You are a strict, zero-tolerance content-safety guardrail classifier for visual media. Analyze and classify this image." \
--image <path_to_image>
Python API
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config
model_path = "prithivMLmods/VisionGuardrail-Evo2-27B-MLX"
model, processor = load(model_path)
config = load_config(model_path)
image = ["<path_to_image>"]
prompt = "You are a strict, zero-tolerance content-safety guardrail classifier for visual media. Analyze and classify this image."
formatted_prompt = apply_chat_template(processor, config, prompt, num_images=len(image))
output = generate(model, processor, formatted_prompt, image=image, max_tokens=256, temperature=0.0)
print(output.text)
8-bit Variant
Target the 8bit subfolder:
CLI (Terminal)
python -m mlx_vlm generate \
--model prithivMLmods/VisionGuardrail-Evo2-27B-MLX/8bit \
--max-tokens 256 \
--temperature 0.0 \
--prompt "You are a strict, zero-tolerance content-safety guardrail classifier for visual media. Analyze and classify this image." \
--image <path_to_image>
Python API
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config
model_path = "prithivMLmods/VisionGuardrail-Evo2-27B-MLX"
model, processor = load(model_path, subfolder="8bit")
config = load_config(model_path, subfolder="8bit")
image = ["<path_to_image>"]
prompt = "You are a strict, zero-tolerance content-safety guardrail classifier for visual media. Analyze and classify this image."
formatted_prompt = apply_chat_template(processor, config, prompt, num_images=len(image))
output = generate(model, processor, formatted_prompt, image=image, max_tokens=256, temperature=0.0)
print(output.text)
4-bit Variant
Target the 4bit subfolder:
CLI (Terminal)
python -m mlx_vlm generate \
--model prithivMLmods/VisionGuardrail-Evo2-27B-MLX/4bit \
--max-tokens 256 \
--temperature 0.0 \
--prompt "You are a strict, zero-tolerance content-safety guardrail classifier for visual media. Analyze and classify this image." \
--image <path_to_image>
Python API
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config
model_path = "prithivMLmods/VisionGuardrail-Evo2-27B-MLX"
model, processor = load(model_path, subfolder="4bit")
config = load_config(model_path, subfolder="4bit")
image = ["<path_to_image>"]
prompt = "You are a strict, zero-tolerance content-safety guardrail classifier for visual media. Analyze and classify this image."
formatted_prompt = apply_chat_template(processor, config, prompt, num_images=len(image))
output = generate(model, processor, formatted_prompt, image=image, max_tokens=256, temperature=0.0)
print(output.text)
License and Attribution
This model is based on and/or incorporates the following open-source projects and models:
- Qwen3.8-27B (Base): https://huggingface.co/Qwen/Qwen3.8-27B
- VisionGuardrail-Evo2-27B: https://huggingface.co/prithivMLmods/VisionGuardrail-Evo2-27B
- mlx-vlm: https://github.com/Blaizzy/mlx-vlm
- MLX: https://github.com/ml-explore/mlx
This model is released under the Apache License 2.0.
- Downloads last month
- -
4-bit
Model tree for prithivMLmods/VisionGuardrail-Evo2-27B-MLX
Base model
Qwen/Qwen3.8-27B