Instructions to use prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED") 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)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED") model = AutoModelForImageTextToText.from_pretrained("prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED" # 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/Qwen3-VisionCaption-2B-it-REDACTED", "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/Qwen3-VisionCaption-2B-it-REDACTED
- SGLang
How to use prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED 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/Qwen3-VisionCaption-2B-it-REDACTED" \ --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/Qwen3-VisionCaption-2B-it-REDACTED", "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/Qwen3-VisionCaption-2B-it-REDACTED" \ --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/Qwen3-VisionCaption-2B-it-REDACTED", "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/Qwen3-VisionCaption-2B-it-REDACTED with Docker Model Runner:
docker model run hf.co/prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED
Qwen3-VisionCaption-2B-it-REDACTED
Qwen3-VisionCaption-2B-it-REDACTED is a strictly censored image captioning model built upon Qwen3-VL-2B-Instruct, optimized for safe and controlled caption generation. It is designed to follow censorship rules closely while still providing clear, structured, and context aware visual descriptions. The abliterated image-captioning version is here: https://huggingface.co/prithivMLmods/Qwen3-VisionCaption-2B
Key Highlights
- Strictly censored and safety aligned captioning output.
- Reliable captions for general, artistic, technical, abstract, and synthetic images.
- Consistent performance across wide, tall, square, panoramic, and irregular formats.
- Adjustable detail level from short summary captions to detailed reasoning while respecting safety.
- Built on Qwen3-VL-2B-Instruct architecture with strong multimodal reasoning and instruction following.
- Multilingual output capability through prompt based control.
Datasets
This model was fine tuned using the following datasets:
- prithivMLmods/blip3o-caption-mini-arrow High quality caption dataset focused on descriptive and reasoning oriented captions.
- prithivMLmods/Caption3o-Opt-v2 Dataset optimized for precision, contextual understanding, and descriptive generalization.
- Private and unlisted datasets curated for controlled and safe captioning intended for restricted visual interpretation.
The training objective focused on improving correctness, clarity, and responsible captioning across diverse visual categories while preventing unsafe or explicit outputs.
Quick Start with Transformers
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info
import torch
model = Qwen3VLForConditionalGeneration.from_pretrained(
"prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED", torch_dtype="auto", device_map="auto"
)
processor = AutoProcessor.from_pretrained("prithivMLmods/Qwen3-VisionCaption-2B-it-REDACTED")
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
},
{"type": "text", "text": "Provide a clean safe caption for this image."},
],
}
]
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_ids = model.generate(**inputs, max_new_tokens=128)
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)
Intended Use
- Safe image captioning for general purpose applications.
- Moderation aware visual understanding for research and evaluation.
- Education, training, and documentation tasks requiring controlled output quality.
- Captioning of stylized, synthetic, or complex images while respecting safety filters.
Limitations
- May overly filter content in visually ambiguous or artistic scenarios.
- Not intended for roles requiring unrestricted analysis or red teaming.
- Performance may vary for extreme edge case images or heavy distortions.
- Downloads last month
- 6
