# Can the Apple M4 (16 GB) run surya-ocr-2.5?

> Yes. The Apple M4 (16 GB) runs surya-ocr-2.5 fully in unified memory at FP16 / BF16 (about 2.0 GB of 11 GB).

Apple M4 (16 GB): 16 GB (10.7 GB usable), 120 GB/s. Estimates at an 8K context.

## Every quantisation

| Quant | Quality | ≈ GB | Fit | Est. tok/s |
|---|---|---|---|---|
| Q4_K_M | Small loss | 0.97 | fits | — |
| Q8_0 | Lossless | 1.21 | fits | — |
| F16 (pick) | Lossless | 2.04 | fits | — |

## Run it

Q8_0 straight from Hugging Face (ollama):

```bash
ollama run hf.co/datalab-to/surya-ocr-2.5-gguf:Q8_0
```

OpenAI-compatible server with a web UI (llama.cpp):

```bash
llama-server -hf datalab-to/surya-ocr-2.5-gguf:Q8_0
```

Download with the lms CLI (lmstudio):

```bash
lms get datalab-to/surya-ocr-2.5-gguf@Q8_0
```

Ask about an image (transformers):

```python
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="datalab-to/surya-ocr-2.5", dtype="auto", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
            {"type": "text", "text": "Describe this image."},
        ],
    }
]
out = pipe(text=messages, max_new_tokens=256)
print(out[0]["generated_text"][-1]["content"])
```


## OCR models that fit comfortably

- [stepfun-ai/GOT-OCR2_0](https://selfhost.directory/models/stepfun-ai/got-ocr2_0/on/apple-m4-16gb): F16 ≈2.1 GB
- [PaddlePaddle/PaddleOCR-VL-1.6](https://selfhost.directory/models/paddlepaddle/paddleocr-vl-1.6/on/apple-m4-16gb): F16 ≈2.64 GB
- [PaddlePaddle/PaddleOCR-VL](https://selfhost.directory/models/paddlepaddle/paddleocr-vl/on/apple-m4-16gb): F16 ≈2.64 GB
- [tencent/HunyuanOCR](https://selfhost.directory/models/tencent/hunyuanocr/on/apple-m4-16gb): F16 ≈3 GB
- [microsoft/Florence-2-large](https://selfhost.directory/models/microsoft/florence-2-large/on/apple-m4-16gb): F16 ≈2.24 GB
- [datalab-to/surya-ocr-2](https://selfhost.directory/models/datalab-to/surya-ocr-2/on/apple-m4-16gb): F16 ≈2.03 GB

## Other GPUs that run it

- [GeForce RTX 4060](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/rtx-4060): F16
- [Radeon RX 6700 XT](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/rx-6700-xt): F16
- [GeForce RTX 3060 12GB](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/rtx-3060): F16
- [Arc B580](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/arc-b580): F16
- [Tesla T4](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/tesla-t4): F16
- [Arc A770 16GB](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/arc-a770): F16
- [Radeon RX 7800 XT](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/rx-7800-xt): F16
- [Tesla P40](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/tesla-p40): F16

---
Model: https://selfhost.directory/models/datalab-to/surya-ocr-2.5. GPU: https://selfhost.directory/models/gpus/apple-m4-16gb. Source: https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/apple-m4-16gb