Pix2tex Mfr GGUF
GGUF-format models for on-device math OCR, converted from breezedeus/pix2text-mfr (MIT license).
Modellquelle
- Art
- Modell
- Dateigröße
- 16,8–112 MB
- Basismodell
- breezedeus/pix2text-mfr
- Version
- vRevision e6dff31
- Aktualisiert
- 30. Okt. 2026
- Downloads
- 801
- Quelle
- Hugging Face
Quellenbeschreibung
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
| 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
#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:
- Tap the 📷 button on the Calculator or Notepad screen
- Take a photo or select from gallery
- The model runs on-device via CrispEmbed FFI
- 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
| Project | Role |
|---|---|
| CrispCalc | Flutter CAS calculator with OCR |
| CrispEmbed | ggml inference engine (text + vision + math OCR) |
| CrispASR | Speech 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.
Quellen
1 Quelle
Quellen
1 QuelleVerifiziert 30. Okt.
Download files
Repository files
File inventory only; completeness is unverified.
Modellartefakte
4 Artefakte
Modellartefakte
4 ArtefakteQuellenauszüge
3 Auszüge
Quellenauszüge
3 Auszüge--- 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
