Image-Text-to-Text
MLX
Safetensors
gemma4_unified
quantized
gemma
gemma4
apple-silicon
turboquant
4-bit precision
Instructions to use majentik/gemma-4-12B-TurboQuant-MLX-MXFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use majentik/gemma-4-12B-TurboQuant-MLX-MXFP4 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("majentik/gemma-4-12B-TurboQuant-MLX-MXFP4") config = load_config("majentik/gemma-4-12B-TurboQuant-MLX-MXFP4") # 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
File size: 868 Bytes
ad64132 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | {
"image_processor": {
"do_convert_rgb": true,
"do_normalize": false,
"do_rescale": true,
"do_resize": true,
"image_mean": [
0.0,
0.0,
0.0
],
"image_processor_type": "Gemma4UnifiedImageProcessor",
"image_std": [
1.0,
1.0,
1.0
],
"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
} |