Tools,

Falcon OCR on a Mac, tested on 10 scanned pages

1,942 of 1,955

words read on 10 pages, in 33 s

Get the script

Falcon beat Tesseract on a clean scan

Falcon OCR 1.5 is a 270M model from TII. We ran it in mlx-vlm 0.8.1.

Words found, of 1,955, and time
Run Words Time
Falcon OCR 1.5, tiiuae repo 1,942 33 s
Our Actor's code, on our Mac 1,880 54 s
Tesseract 5.5.4 1,878 34 s

Falcon peaked at 3.73 GB of memory. This is a clean, easy scan; we tested nothing harder.

The MLX community copy reads noise

The ready-made copy, mlx-community/Falcon-OCR-bf16, holds older, pre-1.5 weights. In mlx-vlm 0.8.1, every page ran to the 4,096-token limit as random word pieces. Our own bf16 copy of 1.5 did the same.

Words found, as is and with our fix
Copy Words Time
mlx-community, as is 29 468 s
Our bf16 copy, as is 5 484 s
mlx-community, fixed 1,940 34 s
Our bf16 copy, fixed 1,942 37 s

Why: mlx-vlm splits the weights twice

On every load, mlx-vlm 0.8.1's sanitize() splits each w13 weight into even and odd rows. A converted copy gets split twice, which scrambles it. The raw tiiuae repo is split once.

We found no report of this bug upstream (GitHub search, Nov 26).

The fix, if you want the smaller bf16 copy

We made our copy with mlx-vlm's own converter:

mlx/bin/python -m mlx_vlm.convert --hf-path <tiiuae copy> --mlx-path <dir> --dtype bfloat16

Our fix skips weights that are already converted. Call fix_sanitize() before load(). Our bf16 copy then made the same text as the repo, from 0.55 GB on disk.

def fix_sanitize():
    """mlx-vlm 0.8.1 falcon_ocr sanitize() splits every `.w13.` weight into its even and odd rows, also in a copy that
    is already converted (names start with language_model.), so a second load scrambles the MLP. Fix: only for raw names."""
    import mlx_vlm.models.falcon_ocr.falcon_ocr as ff

    orig = ff.Model.sanitize

    def sanitize(self, weights):
        done = {k: v for k, v in weights.items() if k.startswith("language_model.")}
        return {**done, **orig(self, {k: v for k, v in weights.items() if k not in done})}  # cos_1d/sin_1d: mlx-vlm's, as before

    ff.Model.sanitize = sanitize

The card's quickstart needs triton

The card's transformers code, with trust_remote_code=True, stopped on our Mac with an ImportError: it wants torchvision and triton. triton 3.9.0 has no macOS wheel.

The full error
ImportError: This modeling file requires the following packages that were not found in your environment: torchvision, triton. Run `pip install torchvision triton`

Strip the stray stop token

Falcon ends each page with <|end_of_query|>, tiiuae's stop token. mlx-vlm does not stop on it, so it stays, glued to the last word. Removed, the score went from 1,942 to 1,947. The script removes it.

Bigger pages read 99.9% of the words

mlx-vlm shrinks pages to at most 1024 px on the long side, tiiuae's code to 1536 px. We patched mlx-vlm to match, for this run.

Token removed, words of 1,955
Long side Words Peak
1024 px, mlx-vlm 1,947 3.73 GB
1536 px, tiiuae 1,953 5.23 GB

The script below keeps mlx-vlm's size.

What it got wrong: quotes and dashes

Install once, with an Apple Silicon Python

brew install poppler python@3.12
python3.12 -m venv mlx
mlx/bin/pip install mlx-vlm==0.8.1

One script: scanned PDF in, text out

Save this as falconocr.py:

import sys

from mlx_vlm import generate, load

model_id, *pages = sys.argv[1:]
model, processor = load(model_id, trust_remote_code=False)
# mlx-vlm sends Falcon OCR its own prompt for the "plain" category, whatever text you pass here.
for page in pages:
    r = generate(model, processor, "plain", [page], max_tokens=4096, temperature=0.0)
    print(r.text.replace("<|end_of_query|>", ""), flush=True)  # mlx-vlm leaves the stop token in

Then run it in the folder with scan.pdf:

pdftoppm -r 300 -jpeg -jpegopt quality=95 scan.pdf page
mlx/bin/python falconocr.py tiiuae/Falcon-OCR page-*.jpg > book.txt

On our scan it found 1,948 words in 43 s, with render and load. The first run also downloads the 1.08 GB model.

Same 10 pages as our MLX test

Proofread Wikisource scans, 1,955 words, scored as true words found in order.

Not tested: layout mode, tables, formulas, handwriting, other languages, other runtimes.

How we ran it
  • mlx-vlm 0.8.1 and MLX 0.32.5, in a venv made by uv.
  • Python 3.12 on macOS 26.6.
  • 1.5: tiiuae/Falcon-OCR. Pre-1.5 weights: mlx-community/Falcon-OCR-bf16, made Apr 12. Each at a fixed commit.
  • Each page as a 1920 px JPEG, prompt "plain", temperature 0, up to 4,096 tokens.
  • One Apple Silicon Mac, one model at a time, at low priority, so times are rough. Falcon times leave out the model load.
  • Tesseract: --psm 3. Our Actor: its code at build 0.1.145, its default inputs. Both lost most words on curly quotes.
  • In the card test, transformers ran the repo's config file, then stopped at the import check for its model code. mlx-vlm has its own Falcon OCR code and runs no repo code.
  • Other ways we did not test: tiiuae's own MLX engine, the vLLM image, the ONNX and OpenVINO copies, and the card's code on a GPU.
  • Scripts and results stay in our private repo, in research/bench/falcon-ocr-2026-11-26/.

No Mac setup: our Actor

Our Apify Actor, PDF to Markdown OCR, reads scans in the cloud, with nothing to install.

Questions people ask

Does Falcon OCR run on a Mac?

Yes, in mlx-vlm on Apple Silicon, loaded from the tiiuae/Falcon-OCR repo. The transformers quickstart on the model card stops on a Mac, because it needs triton, and triton 3.9.0 has no macOS wheel.

Why does the MLX bf16 copy print gibberish?

mlx-vlm 0.8.1 splits the w13 weights of Falcon OCR on every load, also in a copy that is already converted. The second split scrambles the model. Load the raw tiiuae repo, or use our fix_sanitize().

Which prompt should I send in mlx-vlm?

mlx-vlm reads the prompt as a category name. It turns "plain" and "Convert this page to Markdown." into the same plain text prompt, and "table" into the table prompt.

Is Falcon OCR free for business use?

tiiuae publishes it under Apache-2.0, which allows business use. The mlx-community copy carries the same license. mlx-vlm and MLX are MIT.