Image-Text-to-Text
MLX
Safetensors
English
cohere_compass
mlx-vlm
vision-language
multimodal
cohere
north
quantized
conversational
8-bit precision
Instructions to use mlx-community/North-Micro-Vision-Instruct-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/North-Micro-Vision-Instruct-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/North-Micro-Vision-Instruct-8bit") config = load_config("mlx-community/North-Micro-Vision-Instruct-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
- Atomic Chat
File size: 5,001 Bytes
4980ae4 | 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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | {
"architectures": [
"CohereCompassForConditionalGeneration"
],
"chunk_size_feed_forward": 0,
"do_sample": true,
"dtype": "bfloat16",
"eos_token_id": [
255001
],
"fusion_config": {
"patch_embeddings": true
},
"generation_config": {
"bos_token_id": 2,
"eos_token_id": [
255001
],
"pad_token_id": 0,
"do_sample": true,
"temperature": 0.7,
"top_p": 0.8,
"top_k": 20
},
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"image_token_id": 255031,
"is_encoder_decoder": false,
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"model_type": "cohere_compass",
"output_attentions": false,
"output_hidden_states": false,
"pad_token_id": 0,
"problem_type": null,
"quantization": {
"group_size": 64,
"bits": 8,
"mode": "affine"
},
"quantization_config": {
"group_size": 64,
"bits": 8,
"mode": "affine"
},
"return_dict": true,
"temperature": 0.7,
"text_config": {
"architectures": null,
"output_hidden_states": false,
"return_dict": true,
"dtype": "bfloat16",
"chunk_size_feed_forward": 0,
"is_encoder_decoder": false,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"problem_type": null,
"vocab_size": 262144,
"hidden_size": 2048,
"intermediate_size": 6144,
"logit_scale": 0.25,
"num_hidden_layers": 28,
"num_attention_heads": 16,
"num_key_value_heads": 8,
"hidden_act": "silu",
"max_position_embeddings": 500000,
"initializer_range": 0.02,
"layer_norm_eps": 1e-05,
"use_cache": true,
"pad_token_id": 0,
"bos_token_id": 2,
"eos_token_id": 255001,
"tie_word_embeddings": true,
"rope_parameters": {
"sliding_attention": {
"mrope_interleaved": true,
"mrope_section": [
24,
20,
20
],
"rope_type": "default",
"rope_theta": 50000
},
"full_attention": null,
"rope_theta": 10000.0,
"rope_type": "default"
},
"attention_bias": false,
"attention_dropout": 0.0,
"sliding_window": 4096,
"layer_types": [
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention",
"sliding_attention",
"sliding_attention",
"sliding_attention",
"full_attention"
],
"score_shift_a": null,
"score_shift_b": null,
"pooling": null,
"head_dim": 128,
"_name_or_path": "",
"model_type": "cohere_compass_text",
"output_attentions": false
},
"tie_word_embeddings": true,
"top_k": 20,
"top_p": 0.8,
"transformers_version": "5.15.0.dev0",
"video_token_id": 255032,
"vision_config": {
"architectures": null,
"output_hidden_states": false,
"return_dict": true,
"dtype": "bfloat16",
"chunk_size_feed_forward": 0,
"is_encoder_decoder": false,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"problem_type": null,
"depth": 27,
"hidden_size": 1152,
"hidden_act": "gelu_pytorch_tanh",
"intermediate_size": 4304,
"num_heads": 16,
"in_channels": 3,
"patch_size": 16,
"spatial_merge_size": 2,
"temporal_patch_size": 2,
"out_hidden_size": 2048,
"num_position_embeddings": 2304,
"deepstack_visual_indexes": [
8,
16,
24
],
"initializer_range": 0.02,
"_name_or_path": "",
"model_type": "cohere_compass_vision",
"output_attentions": false
},
"vision_end_token_id": 255029,
"vision_start_token_id": 255028
} |