Skip to content
ModelListedExternal
Browse files

Trocr Math Handwritten GGUF

Handwritten math equation recognition via CrispEmbed's ggml inference engine.

KindModelBase modelfhswf/TrOCR_Math_handwrittenVersionTrocr math handwritten fp16Bgrade

Model source

Kind
Model
File size
354 MB–1.14 GB
Base model
fhswf/TrOCR_Math_handwritten
Version
vTrocr math handwritten fp16
Updated
Oct 30, 2026
Source
Hugging Face

Source description

TrOCR Math Handwritten — GGUF

Handwritten math equation recognition via CrispEmbed's ggml inference engine.

Source model: fhswf/TrOCR_Math_handwritten (AFL-3.0)

Architecture: ViT-Large encoder (24L, 1024d, 16H) + TrOCR-Large decoder (12L, 1024d, 16H, vocab=50265)

Models

FileSizeDescription
trocr-math-handwritten-fp16.gguf1.2 GBFP16 weights
trocr-math-handwritten-q4_k.gguf355 MBQ4_K quantized

Verified Output

InputRecognized
x+y=5 (hand-drawn)X + Y =
x2+1 (printed)x^{2}
3x+7=0 (printed)3x+7
+ (cross pattern)+

Usage with CrispEmbed

math_ocr_context* ctx = math_ocr_init("trocr-math-handwritten-q4_k.gguf", 4);
const char* latex = math_ocr_recognize(ctx, gray_pixels, width, height, &len);
math_ocr_free(ctx);

Conversion

Converted from HuggingFace safetensors using CrispEmbed's torch-free converter:

python models/convert-trocr-safetensors-to-gguf.py \
  --model-dir /path/to/fhswf/TrOCR_Math_handwritten \
  --output trocr-math-handwritten-fp16.gguf --fp16

Key converter features:

  • No PyTorch dependency (uses safetensors + gguf + numpy only)
  • Generates sinusoidal position embeddings (not stored in checkpoint)
  • Squeezes 3D batch dimensions, reshapes 4D conv weights
  • Preserves AFL-3.0 license in GGUF metadata

License

Academic Free License v3.0 (inherited from source model)

Provenance and EU AI Act Art. 53 note

  • Upstream model: fhswf/TrOCR_Math_handwritten — published by fhswf.
  • Upstream licence: afl-3.0. 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 f35b1d317b1b2a870ab5d8fc46c67c55d26887cc
huggingface.co/cstr/trocr-math-handwritten-gguf/tree/f35b1d317b1b2a870ab5d8fc46c67c55d26887cc

Verified Oct 30

Download files

Model artifacts

2 artifacts

trocr-math-handwritten-fp16.gguf

gguf · 1.14 GB · SHA-256 cbcdb77c65ba…4341 · Hugging Face

Download file

trocr-math-handwritten-q4_k.gguf

gguf · 354 MB · SHA-256 4dfee1f79c5d…fefe · Hugging Face

Download file

Source excerpts

2 excerpts

--- license: afl-3.0 pipeline_tag: image-to-text tags: - math - ocr - handwriting - trocr - gguf - crispembed base_model: fhswf/TrOCR_Math_handwritten --- # TrOCR Math Handwritten — GGUF Handwritten math equation recognition via [CrispEmbed](https://github.com/CrispStrobe/CrispEmbed)'s ggml inference engine. **Source model**: [fhswf/TrOCR_Math_handwritten](https://huggingface.co/fhswf/TrOCR_Math_handwritten) (AFL-3.0) **Architecture**: ViT-Large encoder (24L, 1024d, 16H) + TrOCR-Large decoder (12L, 1024d, 16H, vocab=50265) ## Models | File | Size | Description | |------|------|-------------| | `trocr-math-handwritten-fp16.gguf` | 1.2 GB | FP16 weights | | `trocr-math-handwritten-q4_k.gguf` | 355 MB | Q4_K quantized | ## Verified Output | Input | Recognized | |-------|-----------| | x+y=5 (hand-drawn) | `X + Y =` | | x²+1 (printed) | `x^{2}` | | 3x+7=0 (printed) | `3x+7` | | + (cross pattern) | `+` | ## Usage with CrispEmbed ```c math_ocr_context* ctx = math_ocr_init("trocr-math-handwritten-q4_k.gguf", 4); const char* latex = math_ocr_recognize(ctx, gray_pixels, width, height, &len); math_ocr_free(ctx); ``` ## Conversion Converted from HuggingFace safetensors using CrispEmbed's torch-free converter: ```bash python models/convert-trocr-safetensors-to-gguf.py \ --model-dir /path/to/fhswf/TrOCR_Math_handwritten \ --output trocr-math-handwritten-fp16.gguf --fp16 ``` Key converter features: - No PyTorch dependency (uses `safetensors` + `gguf` + `numpy` only) - Generates sinusoidal position embeddings (not stored in checkpoint) - Squeezes 3D batch dimensions, reshapes 4D conv weights - Preserves AFL-3.0 license in GGUF metadata ## License Academic Free License v3.0 (inherited from source model) ## Provenance and EU AI Act Art. 53 note - **Upstream model:** [fhswf/TrOCR_Math_handwritten](https://huggingface.co/fhswf/TrOCR_Math_handwritten) — published by `fhswf`. - **Upstream licence:** `afl-3.0`. 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;...

Source context: 121 downloads · 0 likes · Pipeline image-to-text · Repo cstr/trocr-math-handwritten-gguf