Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
text-generation-inference
experimental
mtp
image-classification
VIGOR
VisionGuard
qwen3.5-4B
JSON
content-safety
content-moderation
multimodal
safety-classifier
guardrail
visual-safety
multimodal-content-filter
uncensored
conversational
Instructions to use prithivMLmods/VIGOR-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/VIGOR-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/VIGOR-mini") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("prithivMLmods/VIGOR-mini") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/VIGOR-mini", device_map="auto") 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prithivMLmods/VIGOR-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/VIGOR-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/VIGOR-mini", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/VIGOR-mini
- SGLang
How to use prithivMLmods/VIGOR-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/VIGOR-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/VIGOR-mini", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/VIGOR-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/VIGOR-mini", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use prithivMLmods/VIGOR-mini with Docker Model Runner:
docker model run hf.co/prithivMLmods/VIGOR-mini
|
Download README.md from prithivMLmods/VIGOR-mini: direct link, hf CLI and curl.
- Browser
- Download file 10.6 kB
-
https://huggingface.co/prithivMLmods/VIGOR-mini/resolve/main/README.md
- Command line
-
hf download hf://prithivMLmods/VIGOR-mini/README.md
-
curl -L -o README.md https://huggingface.co/prithivMLmods/VIGOR-mini/resolve/main/README.md
10.6 kB
| tags: | |
| - text-generation-inference | |
| - experimental | |
| - mtp | |
| - image-classification | |
| - VIGOR | |
| - VisionGuard | |
| - qwen3.5-4B | |
| - JSON | |
| - content-safety | |
| - content-moderation | |
| - multimodal | |
| - safety-classifier | |
| - guardrail | |
| - visual-safety | |
| - multimodal-content-filter | |
| - uncensored | |
| base_model: | |
| - Qwen/Qwen3.5-4B | |
| license: apache-2.0 | |
| language: | |
| - en | |
| pipeline_tag: image-text-to-text | |
| library_name: transformers | |
|  | |
| # **VIGOR-mini** | |
| > **VIGOR-mini (Vision Intelligence and Guardrail Oriented Reasoning)** is a dense 4-billion-parameter multimodal vision classification model based on **Qwen/Qwen3.5-4B**. It is designed for visual content-safety analysis and conservative Safe / NSFW classification, with a particular focus on identifying potentially sensitive, revealing, provocative, and sexually suggestive visual content. VIGOR-mini performs detailed visual analysis of clothing, dress codes, body exposure, poses, framing, and contextual settings to support structured content-safety decisions. | |
| > [!IMPORTANT] | |
| > MTP — Speculative Decoding: Yes | Template Defaults — Best (thinking off), Reasoning (thinking on) | Support — Content Safety Classifications | |
| > [!IMPORTANT] | |
| > VIGOR-mini is an experimental content-safety classification model. Its predictions should not be treated as definitive judgments. Review outputs before using them in moderation, parental-control, or other safety-critical workflows. | |
| ## **Key Highlights** | |
| - **Qwen 3.5 Foundation:** Built on the Qwen/Qwen3.5-4B multimodal architecture. | |
| - **Dense 4B Architecture:** A compact 4-billion-parameter model designed for local inference. | |
| - **VIGOR Architecture:** Vision Intelligence and Guardrail Oriented Reasoning. | |
| - **Multimodal Image Classification:** Analyzes visual content using image inputs. | |
| - **Safe / NSFW Classification:** Provides binary content-safety classifications. | |
| - **Sensual Content Detection:** Identifies potentially suggestive visual content. | |
| - **Explicit and Sensitive Content Detection:** Focuses on visual exposure and potentially inappropriate content. | |
| - **Dress-Code Analysis:** Examines clothing, revealing outfits, and levels of exposure. | |
| - **Pose Analysis:** Evaluates poses and visual presentation. | |
| - **Context and Setting:** Considers the surrounding visual context when classifying images. | |
| - **Conservative Classification:** Uses a strict classification threshold for potentially unsafe content. | |
| - **Structured JSON Output:** Produces consistent classification results with complementary safety indicators. | |
| - **MTP Tensor Preservation:** Retains Multi-Token Prediction tensors for speculative decoding support. | |
| ## **Standard Prompt** | |
| The following prompt is designed for strict content-safety classification and structured JSON output. | |
| ```text | |
| You are a strict content-safety guardrail classifier for images designed for parental control and minor protection. | |
| Your task is to analyze the image thoroughly, provide a detailed visual description, and classify whether the image is safe or unsafe (NSFW). | |
| Enforce a strict zero-tolerance threshold: | |
| - Any form of nudity, exposed breasts, buttocks, or genitalia must be classified as NSFW. | |
| - Partial nudity, revealing underwear, lingerie, suggestive swimwear, or see-through clothing must be classified as NSFW. | |
| - Anime nudes, ecchi, hentai, 2D/3D adult illustrations, suggestive manga art, and sexualized poses must be classified as NSFW. | |
| - Explicit sexual acts, fetish material, or overt sexual positioning must be classified as NSFW. | |
| - When in doubt, classify as NSFW. | |
| Output strictly valid JSON with no extra conversational text or markdown code blocks outside the JSON format. Use exactly these keys in this order: | |
| { | |
| "scene_description": "<Detailed, objective description of the subject, clothing, exposure, and pose>", | |
| "is_nsfw": true | false, | |
| "classification_reason": "<Precise reason for the classification based on clothing, exposure, or pose>", | |
| "nsfw": 1 | 0, | |
| "safe": 1 | 0 | |
| } | |
| Field constraints: | |
| - "is_nsfw" must be a JSON boolean (true or false), never a string. | |
| - "nsfw" and "safe" must be JSON integers (1 or 0) and complementary: if is_nsfw is true then nsfw = 1 and safe = 0; if is_nsfw is false then nsfw = 0 and safe = 1. | |
| ``` | |
| > [!NOTE] | |
| > The standard prompt is primarily intended for GGUF and other inference workflows that use an explicit system prompt. For Transformers inference, a shorter classification instruction can also be used. | |
| ## **Quickstart** | |
| ### Installation | |
| ```bash | |
| pip install transformers | |
| pip install accelerate | |
| ``` | |
| ### Transformers Inference | |
| ```python | |
| from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor | |
| import torch | |
| # Load the model on the available device(s) | |
| model = Qwen3_5ForConditionalGeneration.from_pretrained( | |
| "prithivMLmods/VIGOR-mini", | |
| dtype="auto", | |
| device_map="auto" | |
| ) | |
| # Recommended: Enable Flash Attention 2 for better acceleration | |
| # and memory efficiency, especially in multi-image scenarios. | |
| # | |
| # model = Qwen3_5ForConditionalGeneration.from_pretrained( | |
| # "prithivMLmods/VIGOR-mini", | |
| # dtype=torch.bfloat16, | |
| # attn_implementation="flash_attention_2", | |
| # device_map="auto", | |
| # ) | |
| processor = AutoProcessor.from_pretrained("prithivMLmods/VIGOR-mini") | |
| messages = [ | |
| { | |
| "role": "user", | |
| "content": [ | |
| { | |
| "type": "image", | |
| "image": "https://path/to/your/image.jpg", | |
| }, | |
| { | |
| "type": "text", | |
| "text": "Classify this image as safe or nsfw." | |
| }, | |
| ], | |
| } | |
| ] | |
| # Prepare inputs for inference | |
| inputs = processor.apply_chat_template( | |
| messages, | |
| tokenize=True, | |
| add_generation_prompt=True, | |
| return_dict=True, | |
| return_tensors="pt" | |
| ) | |
| inputs = inputs.to(model.device) | |
| # Generate the model output | |
| generated_ids = model.generate( | |
| **inputs, | |
| max_new_tokens=256 | |
| ) | |
| 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[0]) | |
| ``` | |
| ## **Sample Outputs** | |
| ### 1. Safe Classification | |
| **Input:** An image showing two Rottweiler puppies playing and wrestling with each other. | |
| **Output:** | |
| ```json | |
| { | |
| "scene_description": "Two Rottweiler puppies are playing and wrestling with each other. Both animals are fully covered by their natural fur, and the scene contains no sensitive or suggestive visual content.", | |
| "is_nsfw": false, | |
| "classification_reason": "The image depicts ordinary animal play with no nudity, explicit content, or suggestive visual elements.", | |
| "nsfw": 0, | |
| "safe": 1 | |
| } | |
| ``` | |
| ### 2. Safe Classification | |
| **Input:** An image showing a middle-aged man preparing food in a kitchen. | |
| **Output:** | |
| ```json | |
| { | |
| "scene_description": "A middle-aged man is preparing food in a kitchen. He is engaged in an ordinary cooking activity, and the scene contains no revealing clothing or suggestive visual elements.", | |
| "is_nsfw": false, | |
| "classification_reason": "The image depicts a normal domestic activity without nudity, explicit content, or sexually suggestive presentation.", | |
| "nsfw": 0, | |
| "safe": 1 | |
| } | |
| ``` | |
| ### 3. NSFW Classification | |
| **Input:** An image showing a woman outdoors wearing a sheer top and bikini bottoms. | |
| **Output:** | |
| ```json | |
| { | |
| "scene_description": "A woman is standing outdoors wearing a sheer top and bikini bottoms. The outfit exposes significant areas of the body and presents potentially revealing visual content.", | |
| "is_nsfw": true, | |
| "classification_reason": "The image contains revealing and partially transparent clothing that meets the strict content-safety threshold.", | |
| "nsfw": 1, | |
| "safe": 0 | |
| } | |
| ``` | |
| ## **Intended Use** | |
| VIGOR-mini is intended for: | |
| - Multimodal Image Classification | |
| - Content Safety Classification | |
| - NSFW and Sensual Content Detection | |
| - Parental Control Applications | |
| - Image Content Moderation | |
| - Multimodal Safety Research | |
| - Guardrail Development | |
| - Visual Safety Analysis | |
| ## **Limitations** | |
| - **Experimental Model:** VIGOR-mini is an experimental multimodal classification model. Its outputs may contain unexpected behaviors or reasoning artifacts. | |
| - **False Positives:** Conservative classification may flag otherwise acceptable images as unsafe. | |
| - **False Negatives:** Some sensitive visual content may not be detected correctly. | |
| - **Context Sensitivity:** Classification accuracy can vary depending on image context, composition, and visual ambiguity. | |
| - **Conservative Policy:** The strict classification threshold may result in over-classification of borderline content. | |
| - **Visual Ambiguity:** Clothing, poses, lighting, occlusion, and image quality can affect classification. | |
| - **Computational Requirements:** Although based on a compact 4B architecture, inference requirements depend on the selected precision, hardware, and image resolution. | |
| - **Automated Decisions:** Model predictions should not replace human review or serve as definitive legal, professional, or safety determinations. | |
| ## **License and Attributions** | |
| - **Base Model:** [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) - The foundational multimodal model used for VIGOR-mini. | |
| - **Previous Variant:** [prithivMLmods/OneDecision-VisionGuard-4B-SFT](https://huggingface.co/prithivMLmods/OneDecision-VisionGuard-4B-SFT). | |
| - **Classification Improvements:** VIGOR-mini introduces improvements targeting marginal False Positive (FP / Type I Error) and False Negative (FN / Type II Error) classification errors, aiming for more reliable and consistent visual content-safety decisions. | |
| - **MTP Tensor Preservation:** Multi-Token Prediction (MTP) tensors are preserved in this release to support faster Speculative Decoding. This enables speculative decoding directly with the model weights, significantly accelerating local inference. | |
| - **TRL:** [Transformers Reinforcement Learning](https://huggingface.co/docs/trl/en/index) - A full-stack library for supervised fine-tuning, GRPO, DPO, and reward modeling. | |
| - **Transformers:** [Hugging Face Transformers](https://huggingface.co/docs/transformers/en/index) - Provides models and tools for text, computer vision, audio, video, and multimodal inference and training. | |
| - **Developed by:** [prithivMLmods](https://huggingface.co/prithivMLmods). | |
| - **License:** VIGOR-mini follows the Apache 2.0 license of the base Qwen/Qwen3.5-4B model, subject to applicable model and component terms. |