How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="NangWeiLun/MiMo-VL-7B-SFT-bnb-4bit-nf4")
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, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("NangWeiLun/MiMo-VL-7B-SFT-bnb-4bit-nf4")
model = AutoModelForMultimodalLM.from_pretrained("NangWeiLun/MiMo-VL-7B-SFT-bnb-4bit-nf4", 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=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

MiMo-VL-7B-SFT — 4-bit BitsAndBytes Quantized

This is a 4-bit quantized version of XiaomiMiMo/MiMo-VL-7B-SFT,
using the BitsAndBytes library.

Quantization reduces memory usage and makes it possible to run this model on consumer GPUs
(≤ 12 GB VRAM), at the cost of a small reduction in generation quality.


Quantization Details

  • Method: BitsAndBytes (bnb)
  • Precision: 4-bit (nf4)
  • Compute dtype: bfloat16
  • Double quantization: disabled
  • Format: safetensors
Downloads last month
7
Safetensors
Model size
8B params
Tensor type
F32
·
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for NangWeiLun/MiMo-VL-7B-SFT-bnb-4bit-nf4

Unable to build the model tree, the base model loops to the model itself. Learn more.

Collection including NangWeiLun/MiMo-VL-7B-SFT-bnb-4bit-nf4