Views
No views yet

Qwen3-VL-4B-Instruct-Unredacted-MAX-FP8 is an FP8-compressed evolution built on top of Qwen3-VL-4B-Instruct-Unredacted-MAX. This variant preserves the unredacted abliterated training strategies of the original MAX release while applying BF16 · F8_E4M3 FP8 weight compression for improved efficiency. The result is a highly capable 4B vision-language model optimized for unrestricted, detailed reasoning and captioning across complex visual inputs, with reduced memory footprint and improved hardware throughput.
1from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
2from qwen_vl_utils import process_vision_info
3import torch
4
5# Load the 4B Unredacted MAX FP8 model
6model = Qwen3VLForConditionalGeneration.from_pretrained(
7 "prithivMLmods/Qwen3-VL-4B-Instruct-Unredacted-MAX-FP8",
8 torch_dtype="auto",
9 device_map="auto"
10)
11
12processor = AutoProcessor.from_pretrained(
13 "prithivMLmods/Qwen3-VL-4B-Instruct-Unredacted-MAX-FP8"
14)
15
16messages = [
17 {
18 "role": "user",
19 "content": [
20 {
21 "type": "image",
22 "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
23 },
24 {"type": "text", "text": "Provide a detailed caption and reasoning for this image."},
25 ],
26 }
27]
28
29text = processor.apply_chat_template(
30 messages, tokenize=False, add_generation_prompt=True
31)
32
33image_inputs, video_inputs = process_vision_info(messages)
34
35inputs = processor(
36 text=[text],
37 images=image_inputs,
38 videos=video_inputs,
39 padding=True,
40 return_tensors="pt",
41).to("cuda")
42
43generated_ids = model.generate(**inputs, max_new_tokens=256)
44
45generated_ids_trimmed = [
46 out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
47]
48
49output_text = processor.batch_decode(
50 generated_ids_trimmed,
51 skip_special_tokens=True,
52 clean_up_tokenization_spaces=False
53)
54
55print(output_text)Critical Note: This model is designed to minimize built-in refusal mechanisms.