Image-Text-to-Text
Safetensors
MLX
mlx-vlm
gemma4_unified
gemma-4
vision-language
quantized
4-bit precision
6-bit
8-bit precision
apple-silicon
Instructions to use chanderbalaji/Grug-12B-VLM-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use chanderbalaji/Grug-12B-VLM-MLX with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("chanderbalaji/Grug-12B-VLM-MLX") config = load_config("chanderbalaji/Grug-12B-VLM-MLX") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
| { | |
| "image_processor": { | |
| "do_convert_rgb": true, | |
| "do_normalize": false, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "image_mean": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "image_processor_type": "Gemma4UnifiedImageProcessor", | |
| "image_std": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "max_soft_tokens": 280, | |
| "model_patch_size": 48, | |
| "patch_size": 16, | |
| "pooling_kernel_size": 3, | |
| "resample": 3, | |
| "rescale_factor": 0.00392156862745098, | |
| "size": { | |
| "height": 224, | |
| "width": 224 | |
| } | |
| }, | |
| "processor_class": "Gemma4UnifiedProcessor", | |
| "feature_extractor": { | |
| "feature_extractor_type": "Gemma4UnifiedAudioFeatureExtractor", | |
| "sampling_rate": 16000, | |
| "num_mel_filters": 128, | |
| "fft_length": 512, | |
| "hop_length": 160, | |
| "chunk_duration": 8.0, | |
| "overlap_duration": 1.0 | |
| }, | |
| "audio_ms_per_token": 40 | |
| } |