Image-Text-to-Text
MLX
Safetensors
mage_vl
vision-language-model
video-understanding
mage-vl
conversational
custom_code
8-bit precision
Instructions to use mlx-community/Mage-VL-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Mage-VL-8bit 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("mlx-community/Mage-VL-8bit") config = load_config("mlx-community/Mage-VL-8bit") # 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: 4,129 Bytes
0aff9ba | 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | {
"architectures": [
"MageVLForConditionalGeneration"
],
"auto_map": {
"AutoConfig": "configuration_mage_vl.MageVLConfig",
"AutoModel": "modeling_mage_vl.MageVLModel",
"AutoModelForImageTextToText": "modeling_mage_vl.MageVLForConditionalGeneration",
"AutoProcessor": "processing_mage_vl.MageVLProcessor",
"AutoVideoProcessor": "video_processing_mage_vl.MageVLVideoProcessor",
"AutoModelForCausalLM": "modeling_mage_vl.MageVLForConditionalGeneration"
},
"bos_token_id": 151643,
"dtype": "bfloat16",
"eos_token_id": 151645,
"generation_config": {
"_from_model_config": true,
"bos_token_id": 151643,
"eos_token_id": 151645,
"transformers_version": "4.57.3"
},
"image_token_id": 151655,
"model_type": "mage_vl",
"quantization": {
"group_size": 64,
"bits": 8,
"mode": "affine"
},
"quantization_config": {
"group_size": 64,
"bits": 8,
"mode": "affine"
},
"text_config": {
"_name_or_path": "/mage-vl/pretrain_models/Qwen3-4B-Instruct-2507",
"architectures": [
"MageVLForConditionalGeneration"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 151643,
"dtype": "bfloat16",
"eos_token_id": 151645,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 2560,
"initializer_range": 0.02,
"intermediate_size": 9728,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 262144,
"max_window_layers": 36,
"model_type": "qwen3",
"num_attention_heads": 32,
"num_hidden_layers": 36,
"num_key_value_heads": 8,
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"sliding_window": null,
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 151936,
"rope_parameters": {
"rope_theta": 5000000,
"rope_type": "default"
},
"tie_word_embeddings": false
},
"tie_word_embeddings": false,
"transformers_version": "5.7.0",
"video_token_id": 151656,
"vision_config": {
"attention_dropout": 0.0,
"frame_windows_size": 4,
"hidden_act": "gelu",
"hidden_size": 1024,
"image_size": 448,
"initializer_range": 0.02,
"intermediate_size": 4096,
"layer_norm_eps": 1e-06,
"layer_norm_type": "layer_norm",
"model_type": "mage_vl_vision",
"num_attention_heads": 16,
"num_channels": 3,
"num_hidden_layers": 24,
"out_hidden_size": 2560,
"patch_size": 16,
"rope_theta": 10000.0,
"spatial_merge_size": 2,
"temporal_patch_size": 1,
"text_hidden_size": 2560,
"tokens_per_second": 1,
"use_head": false,
"max_position_embeddings": 8192
},
"vision_end_token_id": 151653,
"vision_start_token_id": 151652
} |