How to use from
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/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8" \
    --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/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8",
		"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/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8" \
        --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/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8",
		"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"
						}
					}
				]
			}
		]
	}'
Quick Links

1

Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8

Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8 is an FP8-compressed evolution built on top of prithivMLmods/Qwen2.5-VL-3B-Instruct-Unredacted-MAX. This variant leverages BF16 · FP8 (F8_E4M3) precision formats to significantly reduce memory footprint and improve inference efficiency, while preserving the unredacted multimodal instruction-following strengths of the original 3B Instruct architecture. The result is a highly efficient 3B vision-language model optimized for structured multimodal generation, detailed captioning, and strong instruction adherence across complex visual inputs, with enhanced hardware efficiency.

FP8 (8-bit floating point) weight and activation quantization using hardware acceleration on GPUs – FP8 W8A8. Quantization W8A8 FP8-dynamic recipe – examples.

Key Highlights

  • BF16 · FP8 (F8_E4M3) Compression: Transformer Engine based FP8 quantization reduces VRAM usage and improves throughput while maintaining strong multimodal instruction fidelity.
  • Unredacted MAX Training: Retains the fine-tuning strategy designed to minimize internal refusal behaviors and improve instruction adherence.
  • 3B Instruct Architecture: Built on top of prithivMLmods/Qwen2.5-VL-3B-Instruct-Unredacted-MAX, enabling efficient deployment with solid multimodal reasoning capability in a compact parameter scale.
  • Unrestricted Multimodal Generation: Designed for deep analysis of artistic, technical, abstract, or high-complexity visual content with reduced safety-driven refusals.
  • High-Fidelity Captions: Produces dense, descriptive outputs suitable for dataset generation, metadata enrichment, or accessibility workflows.
  • Dynamic Resolution Support: Retains Qwen2.5-VL’s ability to process varying image resolutions and aspect ratios effectively.
  • Optimized Deployment: FP8 compression enables smoother deployment on compatible GPU architectures with substantially lower VRAM requirements compared to larger-scale variants.

Quick Start with Transformers

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

# Load the 3B Instruct Unredacted MAX FP8 model
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
    "prithivMLmods/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8",
    torch_dtype="auto",
    device_map="auto"
)

processor = AutoProcessor.from_pretrained(
    "prithivMLmods/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8"
)

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 detailed caption and reasoning 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",
).to("cuda")

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)

Intended Use

  • Advanced Red-Teaming: Evaluating multimodal robustness and probing behavioral edge cases.
  • Complex Data Archiving: Generating detailed captions for artistic, historical, or research datasets.
  • Refusal Mechanism Research: Studying behavioral shifts in vision-language models after unredacted fine-tuning.
  • Structured Multimodal Reasoning Research: Exploring reasoning efficiency at compact 3B scale.
  • Creative Storytelling: Producing detailed visual descriptions and analytical breakdowns for narrative and world-building projects.

Limitations & Risks

Critical Note: This model is designed to minimize built-in refusal mechanisms.

  • Sensitive Content Exposure: The model may generate explicit or controversial descriptions if prompted accordingly.
  • User Responsibility: Generated outputs must be handled responsibly and used within ethical and legal boundaries.
  • Hardware Requirements: Although lightweight compared to larger variants, FP8 still requires compatible GPU support and sufficient VRAM for high-resolution image processing and extended generations.
Downloads last month
10
Safetensors
Model size
4B params
Tensor type
BF16
·
F8_E4M3
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for prithivMLmods/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8

Collections including prithivMLmods/Qwen2.5-VL-3B-Instruct-Unredacted-MAX-FP8