Skip to content
ModelListedExternal
Browse files

Pix2tex Mfr GGUF

GGUF-format models for on-device math OCR, converted from breezedeus/pix2text-mfr (MIT license).

KindModelBase modelbreezedeus/pix2text-mfrVersionRevision e6dff31Bgrade

Model source

Kind
Model
File size
16.8–112 MB
Base model
breezedeus/pix2text-mfr
Version
vRevision e6dff31
Updated
Oct 30, 2026
Downloads
801
Source
Hugging Face

Source description

pix2tex-mfr GGUF — Math Formula Recognition

GGUF-format models for on-device math OCR, converted from breezedeus/pix2text-mfr (MIT license).

Recognizes printed mathematical expressions in images and outputs LaTeX.

Architecture

  • Encoder: DeiT (Data-efficient Image Transformer) — 12 layers, 6 heads, hidden=384
  • Decoder: TrOCR (Transformer OCR) — 6 layers, 8 heads, d_model=256, vocab=1200
  • Input: 384×384 RGB image, patch size 16
  • Output: LaTeX token sequence (BPE, 1200 tokens)
  • Parameters: 29.3M

Available Variants

FileFormatSizeQualityUse case
pix2tex-mfr-f32.ggufFP32112 MBReferenceDevelopment/debugging
pix2tex-mfr-f16.ggufFP1656 MB~F32Desktop, full quality
pix2tex-mfr-q8_0.ggufQ8_031 MB≥99.5%Desktop, balanced
pix2tex-mfr-q4_k.ggufQ4_K17 MB≥98%Mobile, smallest

Usage with CrispEmbed

#include "math_ocr.h"

math_ocr_context *ctx = math_ocr_init("pix2tex-mfr-q8_0.gguf", 4);
int len;
const char *latex = math_ocr_recognize(ctx, grayscale_pixels, width, height, &len);
printf("LaTeX: %s\n", latex);  // e.g. "\frac{x^{2}+1}{x-1}"
math_ocr_free(ctx);

Usage with CrispCalc

CrispCalc (Flutter CAS calculator) integrates this model via its OCR feature:

  1. Tap the 📷 button on the Calculator or Notepad screen
  2. Take a photo or select from gallery
  3. The model runs on-device via CrispEmbed FFI
  4. Review the recognized expression and insert

Conversion

Converted from ONNX using:

python models/convert-pix2tex-to-gguf.py \
    --model-dir /path/to/pix2text-mfr \
    --output pix2tex-mfr-f16.gguf --fp16

Quantized using:

crispembed-quantize pix2tex-mfr-f16.gguf pix2tex-mfr-q8_0.gguf q8_0
crispembed-quantize pix2tex-mfr-f16.gguf pix2tex-mfr-q4_k.gguf q4_k

Accuracy

Verified against the ONNX reference model:

  • Encoder output: cosine similarity 0.999983 (F32)
  • Decoder logits: match to 3 decimal places
  • End-to-end: produces identical LaTeX tokens for test images

License

  • Model weights: MIT (from breezedeus/pix2text-mfr)
  • GGUF converter: AGPL-3.0 (CrispEmbed)
  • CrispCalc integration: AGPL-3.0

Part of the Crisp ecosystem

ProjectRole
CrispCalcFlutter CAS calculator with OCR
CrispEmbedggml inference engine (text + vision + math OCR)
CrispASRSpeech recognition engine

Provenance and EU AI Act Art. 53 note

  • Upstream model: breezedeus/pix2text-mfr — published by breezedeus.
  • Upstream licence: mit. This repository redistributes under the same terms; it grants no rights the upstream licence does not.
  • What was done here: format conversion and/or quantisation only (GGUF). No training, no fine-tuning, no merging, no distillation, no change to architecture, vocabulary or capability. Only the numeric representation of the upstream weights differs.
  • Training data: documented — where it is documented at all — by the upstream provider; see the upstream model card. No training data was used, added or selected by this repository.
  • Provider status: under Regulation (EU) 2024/1689 the upstream authors remain the provider of this model. Converting the serialisation format does not make this repository the provider of a new general-purpose AI model, and no such claim is made. Questions about training content, copyright policy or model capability belong upstream.

Sources

1 source
Hugging FacePrimaryVersion e6dff316fb3394c0bebcb349b14bff657e5773c4
huggingface.co/cstr/pix2tex-mfr-gguf/tree/e6dff316fb3394c0bebcb349b14bff657e5773c4

Verified Oct 30

Download files

Repository files

File inventory only; completeness is unverified.

Model artifacts

4 artifacts

pix2tex-mfr-f16.gguf

gguf · 55.9 MB · SHA-256 5a33b57588ed…19e5 · Hugging Face

Download file

pix2tex-mfr-f32.gguf

gguf · 112 MB · SHA-256 397c78e08c62…c231 · Hugging Face

Download file

pix2tex-mfr-q4_k.gguf

gguf · 16.8 MB · SHA-256 8957d1ec5d1f…bdd6 · Hugging Face

Download file

pix2tex-mfr-q8_0.gguf

gguf · 30.2 MB · SHA-256 cdf227e9f312…e75c · Hugging Face

Download file

Source excerpts

3 excerpts

--- language: en tags: - math-ocr - latex - vision-encoder-decoder - gguf - crispembed - deit - trocr - image-to-text license: mit base_model: breezedeus/pix2text-mfr pipeline_tag: image-to-text --- # pix2tex-mfr GGUF — Math Formula Recognition GGUF-format models for on-device math OCR, converted from [breezedeus/pix2text-mfr](https://huggingface.co/breezedeus/pix2text-mfr) (MIT license). Recognizes printed mathematical expressions in images and outputs LaTeX. ## Architecture - **Encoder**: DeiT (Data-efficient Image Transformer) — 12 layers, 6 heads, hidden=384 - **Decoder**: TrOCR (Transformer OCR) — 6 layers, 8 heads, d_model=256, vocab=1200 - **Input**: 384×384 RGB image, patch size 16 - **Output**: LaTeX token sequence (BPE, 1200 tokens) - **Parameters**: 29.3M ## Available Variants | File | Format | Size | Quality | Use case | |---|---|---|---|---| | `pix2tex-mfr-f32.gguf` | FP32 | 112 MB | Reference | Development/debugging | | `pix2tex-mfr-f16.gguf` | FP16 | 56 MB | ~F32 | Desktop, full quality | | `pix2tex-mfr-q8_0.gguf` | Q8_0 | 31 MB | ≥99.5% | Desktop, balanced | | `pix2tex-mfr-q4_k.gguf` | Q4_K | 17 MB | ≥98% | Mobile, smallest | ## Usage with CrispEmbed ```c #include "math_ocr.h" math_ocr_context *ctx = math_ocr_init("pix2tex-mfr-q8_0.gguf", 4); int len; const char *latex = math_ocr_recognize(ctx, grayscale_pixels, width, height, &len); printf("LaTeX: %s\n", latex); // e.g. "\frac{x^{2}+1}{x-1}" math_ocr_free(ctx); ``` ## Usage with CrispCalc CrispCalc (Flutter CAS calculator) integrates this model via its OCR feature: 1. Tap the 📷 button on the Calculator or Notepad screen 2. Take a photo or select from gallery 3. The model runs on-device via CrispEmbed FFI 4. Review the recognized expression and insert ## Conversion Converted from ONNX using: ```bash python models/convert-pix2tex-to-gguf.py \ --model-dir /path/to/pix2text-mfr \ --output pix2tex-mfr-f16.gguf --fp16 ``` Quantized using: ```bash crispembed-quantize pix2tex-mfr-f16.gguf pix2tex-mfr-q8_0.gguf q8_0 crispembed-quantize pix2tex-mfr-f16.gguf pix2tex-mfr-q4_k.gguf q4_k ``` ## Accuracy Verified against the ONNX reference model: - Encoder output: cosine similarity **0.999983** (F32) - Decoder logits: match to 3 decimal places - End-to-end: produces identical LaTeX tokens for test images ## License - Model weights: **MIT** (from breezedeus/pix2text-mfr) - G...

Source context: 801 downloads · 0 likes · Pipeline image-to-text · Repo cstr/pix2tex-mfr-gguf

Source context: 572 downloads · 0 likes · Pipeline image-to-text · Repo cstr/pix2tex-mfr-gguf