HuggingFaceM4/the_cauldron
Viewer • Updated • 1.88M • 632k • 534
How to use smdesai/SmolVLM2-2.2B-Instruct-4bit with Transformers:
# Load model directly
from transformers import AutoProcessor, AutoModelForImageTextToText
processor = AutoProcessor.from_pretrained("smdesai/SmolVLM2-2.2B-Instruct-4bit")
model = AutoModelForImageTextToText.from_pretrained("smdesai/SmolVLM2-2.2B-Instruct-4bit")How to use smdesai/SmolVLM2-2.2B-Instruct-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir SmolVLM2-2.2B-Instruct-4bit smdesai/SmolVLM2-2.2B-Instruct-4bit
This model was converted to MLX format from HuggingFaceTB/SmolVLM2-2.2B-Instruct using mlx-vlm version 0.1.14.
Refer to the original model card for more details on the model.
pip install -U mlx-vlm
python -m mlx_vlm.generate --model smdesai/SmolVLM2-2.2B-Instruct-4bit --max-tokens 100 --temp 0.0 --prompt "Describe this image." --image <path_to_image>
Quantized
Base model
HuggingFaceTB/SmolLM2-1.7B