Image-Text-to-Text
Transformers
coreai-aimodel
coreai
aimodel
apple-silicon
on-device
vision-language
siglip2
cohere
Instructions to use mlboydaisuke/North-Micro-Vision-CoreAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlboydaisuke/North-Micro-Vision-CoreAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mlboydaisuke/North-Micro-Vision-CoreAI")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mlboydaisuke/North-Micro-Vision-CoreAI", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mlboydaisuke/North-Micro-Vision-CoreAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlboydaisuke/North-Micro-Vision-CoreAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlboydaisuke/North-Micro-Vision-CoreAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mlboydaisuke/North-Micro-Vision-CoreAI
- SGLang
How to use mlboydaisuke/North-Micro-Vision-CoreAI with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mlboydaisuke/North-Micro-Vision-CoreAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlboydaisuke/North-Micro-Vision-CoreAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mlboydaisuke/North-Micro-Vision-CoreAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlboydaisuke/North-Micro-Vision-CoreAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mlboydaisuke/North-Micro-Vision-CoreAI with Docker Model Runner:
docker model run hf.co/mlboydaisuke/North-Micro-Vision-CoreAI
File size: 5,804 Bytes
0a0480a 60d7f05 | 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 | ---
library_name: transformers
license: apache-2.0
base_model: CohereLabs/North-Micro-Vision-Instruct
tags:
- coreai
- aimodel
- apple-silicon
- on-device
- vision-language
- siglip2
- cohere
language:
- en
- de
- fr
- es
- it
- pt
- hi
- ja
- ko
- zh
- ar
pipeline_tag: image-text-to-text
---
# North-Micro-Vision-Instruct β Apple Core AI (`.aimodel`)
**Cohere's 2.4B multilingual VLM converted to Apple's Core AI** (the Core ML successor announced
at WWDC26), running on iOS 27 and macOS 27. On an iPhone 17 Pro it answers about an image at
**18.2 tok/s and 24/24 tokens identical to the fp32 reference** β not "close", identical.
Two bundles, run in sequence: a **400M vision tower** (custom-trained from SigLIP2-SO400M, and
structurally a Qwen3-VL visual encoder β deepstack mergers included) emitting `image_embeds
[256, 2048]` + `deepstack_embeds [768, 2048]`, and a **2B Cohere decoder** with the image tokens
spliced in as extension ids. Eleven languages, including Japanese. Apache-2.0.
> Requires iOS 27 / macOS 27 (Core AI ships with the OS). Conversion code, gates and knowledge
> base: **[coreai-model-zoo](https://github.com/john-rocky/coreai-model-zoo)**.
## Bundles
| path | size | measured | numerics |
|---|---:|---|---|
| `gpu-pipelined/north_micro_vision_instruct_vision_fp16` | 1.0 GB | **83.4 ms**/image (M4 Max) | `image_embeds` cos **0.999996** vs fp32 |
| `gpu-pipelined/north_micro_vision_instruct_decode_int8lin` | 2.4 GB | β | suite **9/9 cases, 338/338 tokens** |
| `gpu-pipelined/β¦_decode_int8lin_textcore` | 2.4 GB | **145.3 prompt / 118.6 decode tok/s** (M4 Max) | the same weights with no image inputs |
| `ios-h18p/β¦_decode_int8lin` + `ios-h18p/β¦_vision_fp16` | 2.5 GB | **21.5 prefill / 18.2 decode tok/s** (iPhone 17 Pro) | nat 16/16 + **image oracle 24/24** |
M4 Max, macOS 27.0 (26A5378n), Xcode 27.0 (27A5218g), `coreai-torch 0.4.1`,
`llm-benchmark -p 128 -g 256 -n 3`, `COREAI_CHUNK_THRESHOLD=1`. The Mac tok/s row is the text
core because `llm-runner` cannot bind an image buffer. The iPhone rows are PipelinedBench,
including a mandatory 1024-token generation (the iOS compiler miscompiles KV specializations at
seq β₯ 2048 and a 256-token run cannot see it) β clean.
**int8 costs this model nothing measurable.** **int4 is not published**: 0 of 9 cases, with a
lost sentence boundary and instruction boilerplate leaking in (*"β¦a blanket.**Answer: Cats.I
apologize, but I cannot provide a detailed description of the image**"*) plus flat repetition.
int4 tolerance is a property of the individual model β a sibling port at 3B took int4 for free
and a 450M one cratered β so read the generations rather than the parameter count.
## Run it
```bash
git clone https://github.com/apple/coreai-models # + the zoo's engine patches, see below
swift build -c release --product llm-runner
COREAI_CHUNK_THRESHOLD=1 .build/release/llm-runner \
--model gpu-pipelined/north_micro_vision_instruct_decode_int8lin_textcore \
--prompt "The alphabet begins A, B, C," \
--max-tokens 64 --sampling-strategy greedy \
--inference-engine-variant coreai-pipelined --warmup off
```
The `coreai-pipelined-static-inputs` patch (which binds `image_embeds`, `deepstack_embeds` and
the two rope-shift scalars) is in the zoo under `apps/`.
For the image path the host resizes to a 512Γ512 canvas with an **antialiased BICUBIC** filter,
normalizes `(x/255 β 0.5)/0.5`, and patchifies into 16Γ16 patches in **Qwen-VL order** β
block-major over 2Γ2 merge groups, and `[C][T][py][px]` inside each patch with the still frame
duplicated (`patch_dim` 1536). Then it runs the tower, binds both outputs, and rewrites the
prompt's `<image>` ids (255031) to `V + slot`. Reference implementation:
[`_smoke/northmv_preprocess.py`](https://github.com/john-rocky/coreai-model-zoo/blob/main/_smoke/northmv_preprocess.py).
Note the export bakes a square grid while the upstream processor is **native-resolution** (it
keeps a 640Γ480 image's own 30Γ40 patch grid), so non-square images are stretched.
## Converting this yourself
The oracle needs **transformers git main**: the 5.15.0 release does not know `cohere_compass`
and raises on `AutoConfig`.
The decoder is where the work is, and each of these runs fine when done wrong: a **parallel
block** (one LayerNorm, attention and MLP summed into the residual), **Cohere LayerNorm** (the
mean is subtracted, no bias), `SSSF Γ 7` layer types where the 7 full-attention layers have **no
positional encoding at all** while the 21 sliding ones carry interleaved M-RoPE in a 4096
window, `logit_scale 0.25`, and a 262 144-entry embedding tied to the head.
The tower needed no work: it loads into the zoo's existing Qwen3-VL encoder with zero missing
keys and matches every seam at cos 1.000000.
Everything is in
[`conversion/export_northmv_pipelined.py`](https://github.com/john-rocky/coreai-model-zoo/blob/main/conversion/export_northmv_pipelined.py)
and [`knowledge/north-micro-vision-port.md`](https://github.com/john-rocky/coreai-model-zoo/blob/main/knowledge/north-micro-vision-port.md).
## License
Apache-2.0, carried from
[`CohereLabs/North-Micro-Vision-Instruct`](https://huggingface.co/CohereLabs/North-Micro-Vision-Instruct)
(revision `373bda96ac70bf89f99f7048f420cf00dc07c149`). Not affiliated with Apple or Cohere.
<!-- funnel:v1 -->
---
**More models in this format:** [Core AI Model Zoo](https://huggingface.co/collections/mlboydaisuke/core-ai-model-zoo-6a7ff330f753e8dcae04671a) β 75 models, each with the recipe that produced it.
**Want a different model on-device?** [Open a request](https://github.com/john-rocky/on-device-requests) β free, open weights only; the export and its measured numbers get published publicly.
<!-- /funnel:v1 -->
|