# Can the Radeon RX 7800 XT run surya-ocr-2.5?

> Yes. The Radeon RX 7800 XT runs surya-ocr-2.5 fully in VRAM at FP16 / BF16 (about 2.0 GB of 16 GB).

Radeon RX 7800 XT: 16 GB (16 GB usable), 624 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
```

Docker with ROCm (AMD) (ollama):

```bash
docker run -d --name ollama --device /dev/kfd --device /dev/dri \
  -v ollama:/root/.ollama -p 11434:11434 ollama/ollama:rocm
docker exec -it ollama 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
```

Docker with ROCm (AMD) (llama.cpp):

```bash
docker run -d --name llama --device /dev/kfd --device /dev/dri -p 8080:8080 \
  -v ~/.cache/llama.cpp:/root/.cache/llama.cpp \
  ghcr.io/ggml-org/llama.cpp:server-rocm \
  -hf datalab-to/surya-ocr-2.5-gguf:Q8_0 --host 0.0.0.0 --port 8080 -ngl 99
```

Download with the lms CLI (lmstudio):

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

Serve an OpenAI-compatible API (vllm):

```bash
vllm serve datalab-to/surya-ocr-2.5
```

Docker Compose (AMD ROCm) (vllm):

```yaml
services:
  vllm:
    image: rocm/vllm:latest
    command: vllm serve datalab-to/surya-ocr-2.5 --host 0.0.0.0 --port 8000
    ports:
      - "8000:8000"
    ipc: host
    devices:
      - /dev/kfd
      - /dev/dri
    group_add:
      - video
    security_opt:
      - seccomp=unconfined
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
```

Serve an OpenAI-compatible API (sglang):

```bash
sglang serve datalab-to/surya-ocr-2.5 --host 0.0.0.0 --port 30000
```

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/rx-7800-xt): F16 ≈2.1 GB
- [PaddlePaddle/PaddleOCR-VL-1.6](https://selfhost.directory/models/paddlepaddle/paddleocr-vl-1.6/on/rx-7800-xt): F16 ≈2.64 GB
- [PaddlePaddle/PaddleOCR-VL](https://selfhost.directory/models/paddlepaddle/paddleocr-vl/on/rx-7800-xt): F16 ≈2.64 GB
- [tencent/HunyuanOCR](https://selfhost.directory/models/tencent/hunyuanocr/on/rx-7800-xt): F16 ≈3 GB
- [microsoft/Florence-2-large](https://selfhost.directory/models/microsoft/florence-2-large/on/rx-7800-xt): F16 ≈2.24 GB
- [datalab-to/surya-ocr-2](https://selfhost.directory/models/datalab-to/surya-ocr-2/on/rx-7800-xt): 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
- [Apple M4 (16 GB)](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/apple-m4-16gb): 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 9070 XT](https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/rx-9070-xt): F16

---
Model: https://selfhost.directory/models/datalab-to/surya-ocr-2.5. GPU: https://selfhost.directory/models/gpus/rx-7800-xt. Source: https://selfhost.directory/models/datalab-to/surya-ocr-2.5/on/rx-7800-xt