This is a 4-bit AWQ quantized version of
allenai/Molmo-72B-0924 using
LLM Compressor
This selective quantization ensures that vision understanding quality remains nearly identical to the original model while significantly reducing size.
1from transformers import AutoModelForCausalLM, AutoProcessor, GenerationConfig
2from PIL import Image
3import requests
4
5# Load model and processor
6processor = AutoProcessor.from_pretrained(
7 "ronantakizawa/molmo-72b-awq-w4a16",
8 trust_remote_code=True,
9 torch_dtype='auto',
10 device_map='auto'
11)
12
13model = AutoModelForCausalLM.from_pretrained(
14 "ronantakizawa/molmo-72b-awq-w4a16",
15 trust_remote_code=True,
16 torch_dtype='auto',
17 device_map='auto'
18)
19
20# Process the image and text
21inputs = processor.process(
22 images=[Image.open(requests.get("https://picsum.photos/id/237/536/354", stream=True).raw)],
23 text="Describe what you see in this image."
24)
25
26# Move inputs to the correct device and make a batch of size 1
27inputs = {k: v.to(model.device).unsqueeze(0) for k, v in inputs.items()}
28
29# Generate output
30output = model.generate_from_batch(
31 inputs,
32 GenerationConfig(max_new_tokens=200, stop_strings="<|endoftext|>"),
33 tokenizer=processor.tokenizer
34)
35
36# Decode the generated tokens
37generated_tokens = output[0, inputs['input_ids'].size(1):]
38generated_text = processor.tokenizer.decode(generated_tokens, skip_special_tokens=True)
39print(generated_text)
1from PIL import Image
2image = Image.open(...)
3if image.mode != "RGB":
4 image = image.convert("RGB")
1@misc{molmo-72b-awq,
2 title={Molmo-72B AWQ 4-bit},
3 author={Quantized by ronantakizawa},
4 year={2025},
5 url={https://huggingface.co/ronantakizawa/molmo-72b-awq-w4a16}
6}