Home / Blog / Mirage: VLM and OCR and Detection and Segment and Decide in…
Tech News

Mirage: VLM and OCR and Detection and Segment and Decide in 22 MB

Cactus Compute released Mirage, a 51.3 million parameter vision model in 22 MB that runs VLM, OCR, detection, and masks in 74 ms on a Galaxy S26 NPU.

By Dillip Chowdary • Dec 06, 2026 • Source: cactuscompute.com

Mirage: VLM and OCR and Detection and Segment and Decide in 22 MB
Illustration · Pexels

At a glance

Product
Mirage by Cactus Compute
Parameters
51.3 million
File size
21.6 MB (about 22 MB, 2-bit Cactus Quants)
Galaxy S26 latency
74 ms on NPU, 107 ms on CPU
OCR support
Latin script only, 306 characters
Availability
PyPI, Hugging Face, and GitHub

Cactus Compute has released Mirage, a 51.3 million parameter vision model built for phones, wearables, robots, and other consumer devices, according to cactuscompute.com's report. Fitting in about 22 MB using 2-bit Cactus Quants, the model describes scenes, detects objects, reads text, generates segmentation masks, identifies spatial relations, and makes decisions in a single pass. On a Samsung Galaxy S26, Mirage runs end to end in 74 ms on the NPU or 107 ms on the CPU, sharing the same engine binaries as Needle and Whistle.

This article breaks down Mirage's structured JSON outputs, Python and native C deployment interfaces, text-model pairing experiments, and underlying neural architecture. It is written for mobile, embedded, and application developers evaluating compact, on-device vision models that run locally without cloud dependencies.

01Structured JSON outputs and Latin text recognition

Mirage returns a single JSON record for an image, covering scene descriptions in English, German, French, Spanish, Italian, Dutch, and Polish alongside open-vocabulary object names, bounding boxes, and attributes like colour, shape, or material. Each object receives an entity identifier so multiple instances, such as two trees, share one id, while segmentation masks return as outlines, separate pieces, or bitmaps.

A built-in reader extracts text crops with bounding boxes and detection scores, though it supports Latin script only across 306 characters. That set includes 95 printable ASCII characters, À through ÿ excluding × and ÷, all 128 Latin Extended-A characters from U+0100 to U+017F, and 21 punctuation and currency symbols.

The JSON record also maps spatial relations, events, and a short reasoning trace into a queryable scene graph. In a released 2-bit example on COCO image 231049, Mirage scored a red octagonal stop sign at 0.644 and a black metal pole at 0.558, while misreading an accent in ARRÉT.

Note: Mirage's reasoning trace is generated text intended to aid inspection, so Cactus Compute notes it can contain inferred errors and warrants the same scrutiny as other outputs.

02Python installation, filtering, and form decisions

Developers can test Mirage locally by installing the cactus-compute package with pip and calling cactus.Mirage(). The base installation handles image decoding, while the first run downloads and caches the engine and weights for subsequent offline use. Applications can pass a file path, encoded image bytes, a Pillow image, or an RGB array to vision.describe().

To limit output size, callers can request specific sections such as objects and text, select fields like bounding boxes, scores, or polygon masks, and specify a target language such as language="de". Bounding boxes use a 0 to 1000 relative coordinate scale, with conf, text_conf, max_objects, max_text_lines, and max_tokens controlling thresholds and output bounds.

For structured choices, vision.extract() accepts a form schema—such as an enum of stop, yield, or speed limit signs—and reuses the same image features to return the chosen value with label probabilities. Forms also support counts within a range, short text fields, and bounding boxes linked to detected objects.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

03Text-only LLM pairing on VQAv2 questions

Because Mirage outputs structured JSON observations, developers can pass that text directly into an existing language model alongside a visual question without training a new adapter or modifying weights. Mirage handles visual perception, and the text model reasons strictly over the serialized scene record as ordinary text.

In an experiment called Structured Visuo-Semantic Perception, Cactus Compute paired Mirage with Qwen3-0.6B across 256 VQAv2 validation questions spanning 128 images. Supplying Mirage's structured record and complete reasoning trace scored 31.3 out of 100 on VQA consensus credit, compared with 22.2 when given a mismatched image's record.

Omitting the reasoning trace raised the score to 33.1, showing no reliable benefit from including it. Because Qwen3-0.6B never sees raw pixels, any detail absent from Mirage's record remains inaccessible, and follow-up tests with larger text-only readers did not show consistent gains.

04Banded convolutions, shared memory, and quantization

Mirage processes a 512 px image through a five-stage convolutional stem into a 16 × 16 feature grid, followed by 16 body blocks with gated 3 × 3 mixing and HConvGLU, plus 12 attention blocks using grouped-query attention and four register tokens. Global Response Normalisation balances channels, while gated level memory blends earlier features into the final grid.

HConvGLU pairs fixed Walsh-Hadamard transforms with three learned 65-channel banded convolutions, storing 512 × 65 weights per convolution—about eight times fewer parameters than a full 512 × 512 matrix. Finer stem features feed the object, text, and shared-prototype mask heads, while a CTC reader transcribes detected text crops.

An eight-layer decoder from the Simple Attention family used by Needle and Whistle combines Hadamard MLPs, engram lookups, visual cross-attention, and four mHC residual lanes over 256 image memory cells and box slots. Most quantised matrices use 2 bits, token embeddings and mHC routing use 4 bits, and HConvGLU bands remain 16-bit floating point, yielding a 21.6 MB file.

05Native C deployment and model distribution

For native applications outside Python, cactus_load loads the mirage.cact model file, and cactus_describe accepts raw RGB pixels with the same configuration options. Needle, Whistle, and Mirage can all be loaded into the same engine binary simultaneously while keeping their weights separate.

Cactus Compute hosts Mirage's weights and configuration files on Hugging Face, while the source code is available on GitHub. Engine binaries and supported platform details live in a dedicated repository, and a browser-based local sandbox lets developers test predictions on live camera feeds or uploaded photos.

Frequently asked questions

How fast does Mirage run on a smartphone?

On a Samsung Galaxy S26, Mirage runs end to end in 74 ms on the NPU and 107 ms on the CPU. The 51.3 million parameter model uses 2-bit Cactus Quants to fit into a 21.6 MB file.

What languages and scripts does Mirage support?

Mirage generates scene descriptions in English, German, French, Spanish, Italian, Dutch, and Polish. Its built-in OCR reader supports Latin script only across 306 characters, including ASCII, À to ÿ excluding × and ÷, Latin Extended-A, and 21 symbols.

Can Mirage run alongside Needle and Whistle?

Yes, Needle, Whistle, and Mirage run in the same engine binaries and can be loaded into the same engine simultaneously with separate weights. Developers can load mirage.cact natively using cactus_load or run it in Python via cactus-compute.

How does Mirage perform when paired with a text-only LLM?

When paired with Qwen3-0.6B on 256 VQAv2 validation questions from 128 images, Mirage's structured record scored 31.3 out of 100 with the reasoning trace and 33.1 without it. Follow-up runs with larger text-only readers did not establish consistent gains.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →