Polyphonic-TrOMR β€” GGUF (for CrispEmbed)

GGUF conversion of Polyphonic-TrOMR (NetEase, Apache-2.0), an Optical Music Recognition model: a staff-notation image is transcribed into three parallel token streams (rhythm / pitch / lift) which are merged into symbolic music notation, e.g.

clef-F4+keySignature-CM+note-E3_eighth.|note-C4_eighth.+note-E3_sixteenth|note-D4_sixteenth+…

Runs with CrispEmbed β€” pure C/C++ ggml inference, no Python/PyTorch at runtime, Metal/CUDA/Vulkan capable.

Architecture

  • Encoder β€” timm hybrid ViT: ResNetV2 backbone (StdConv2dSame + GroupNorm, layers [2,3,7], 1β†’64β†’256β†’512β†’1024, /16) β†’ 1Γ—1 HybridEmbed projection (1024β†’256) β†’ 4-block ViT (dim 256, 8 heads, cls token, custom 2D positional index).
  • Decoder β€” x-transformers: 12 sublayers (self-attn β†’ cross-attn β†’ GLU-FF) with SIGLU attn-on-attn gating and GEGLU feed-forward, 4 parallel heads (rhythm 260 / pitch 71 / lift 7 / note 2). Autoregressive over the three streams, greedy argmax.

Files

File Precision Size
tromr-f32.gguf F32 86 MB
tromr-q8_0.gguf Q8_0 (ResNet backbone kept F16 β€” cast to F16 in-engine anyway) 31 MB

Both decode byte-identically to the reference model on the repository's own example photos. Validated vs the original PyTorch implementation: every stage cosine = 1.0 (backbone, ViT context, all 12 decoder blocks, all 4 logit heads), 100% per-position argmax agreement under teacher forcing.

Usage

# CLI (architecture is auto-detected from the GGUF)
crispembed -m tromr-q8_0.gguf --ocr score.jpg
// Dart / Flutter
final omr = CrispEmbedOmr('tromr-q8_0.gguf');
final score = omr.recognizeFile('score.jpg');

Feed a reasonably cropped single staff-system image (a plain photo works well β€” this model is robust on real-world/camera input).

Attribution & license

  • Model: Polyphonic-TrOMR, NetEase β€” https://github.com/NetEase/Polyphonic-TrOMR (Apache-2.0; the img2score_epoch47.pth weights are committed in that repo).
  • Paper: TrOMR: Transformer-Based Polyphonic Optical Music Recognition, arXiv:2308.09370.
  • This GGUF conversion is redistributed under the same Apache-2.0 license.

Provenance and EU AI Act Art. 53 note

  • Upstream model: NetEase/Polyphonic-TrOMR.
  • Upstream licence: apache-2.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/GGML). 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.
Downloads last month
250
GGUF
Model size
21.5M params
Architecture
tromr_ocr
Hardware compatibility
Log In to add your hardware

8-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Paper for cstr/tromr-GGUF