/ Модель

Характеристики

Лицензия
Своя лицензия
Архитектура
lfm2_vl · dense
Базовая модель
LFM2.5-VL-450M
Библиотека
transformers.js
Опубликована
24 окт 2026

PsalmOMR-LFM2.5-VL-450M-GGUF

Изображение и текст → текст3 профессии
115скачиваний за 30 дней0лайковвеса обновлены24 окт 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Компактная зрительно-языковая модель, которая распознаёт нотную запись англиканских псалмовых хоралов и преобразует её в ABC для четырёх голосов.

PsalmOMR — специализированная модель оптического распознавания музыкальной нотации, созданная как полное дообучение Liquid AI LFM2.5-VL-450M. Она принимает фотографию, скан или снимок экрана с одним англиканским псалмовым хоралом и преобразует его в редактируемую запись ABC для четырёх голосов: сопрано, альта, тенора и баса. Модель рассчитана на стандартные одночастные и двухчастные хоралы, напечатанные на двух нотных станах; базовая архитектура — компактная зрительно-языковая LFM2 с кодировщиком изображений SigLIP2 NaFlex. Доступны сборки GGUF и ONNX, включая вариант Q4_0, пригодный для запуска на телефоне или в браузере.

Модель особенно хорошо распознаёт ноты на чистых изображениях, однако результат следует сверять с оригиналом: размытые, перекошенные и тёмные снимки ухудшают точность, а имя композитора часто распознаётся неверно. Перед обработкой рекомендуется уменьшить изображение до 1024 пикселей по длинной стороне и использовать обучающий запрос, указанный в README. Тройные и четверные хоралы, гимны, метрические псалмы и другие виды музыки не поддерживаются; модель не предназначена для диалога и плохо отвечает на посторонние вопросы. Лицензия указана как other, конкретные условия в предоставленных данных не раскрыты.

Сценарии применения

  • Преобразование фотографии одночастного англиканского хорала в ABC
  • Оцифровка двухчастных хоралов из печатного псалтиря
  • Получение редактируемой записи нот для abcjs или EasyABC
  • Создание черновой транскрипции хорала по скану или снимку экрана

Ограничения

Поддерживаются только стандартные одночастные и двухчастные англиканские хоралы, по одному на изображение; прочие музыкальные формы модель распознаёт неверно. Имена композиторов ненадёжны, а качество снижается на размытых, перекошенных и тёмных снимках; результат нужно сверять с оригиналом.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

PsalmOMR · LFM2.5-VL-450M

Photograph an Anglican psalm chant and get it back as editable ABC notation.

PsalmOMR is a fine-tune of Liquid AI's LFM2.5-VL-450M for one narrow job: optical music recognition of four-part Anglican chants, as printed in psalters such as The Parish Psalter. At 450M parameters with a 4-bit language model, it is small enough to run on a phone or in a web browser.

This repository holds two builds of the same weights:

FileSizeWhat it is
psalmomr-lfm2.5-vl-450m-Q4_0.gguf219 MBLanguage model for llama.cpp and apps built on it. Q4_0 layers, Q6_K embeddings.
mmproj-psalmomr-lfm2.5-vl-450m-f16.gguf189 MBVision encoder and projector (fine-tuned too), f16. Needed with the GGUF above.
onnx/583 MBONNX build for Transformers.js and ONNX Runtime (also in the browser): vision_encoder_fp16, embed_tokens_fp16, decoder_model_merged_q4.
onnx_wasm/577 MBThe same weights for CPU / WebAssembly, where ONNX Runtime's 4-bit MatMulNBits is slow: the decoder as 4-bit DequantizeLinear + MatMul, which ONNX Runtime expands to float once at load.
config.json, tokenizer*.json, *processor_config.json, chat_template.jinjaConfiguration for the ONNX build.

The language model was trained quantization-aware for ggml's Q4_0 format (see Training), and both builds use exactly those Q4_0 weights.

What it does

Input: a photo, scan or screenshot of one chant, cropped roughly to the music. Pointed psalm text around it is ignored.

Output: the four voices (Soprano, Alto, Tenor, Bass) in a fixed ABC layout:

X:1
C:J. Goss
M:none
L:1/2
%%staves [(S A) (T B)]
K:Eb
V:S clef=treble
B2 | A A | G2 || F2 | E A | A G | F2 || B2 | d d | e2 || G2 | B A | G F | E2 |]
V:A clef=treble
E2 | E E | E2 || D2 | E E | F E | D2 || E2 | A A | G2 || E2 | E E | E D | E2 |]
V:T clef=bass octave=-1
G2 | c c | B2 || A2 | G c | B B | B2 || B2 | B B | B2 || B2 | E F | G A | G2 |]
V:B clef=bass octave=-1
E2 | E E | E2 || B,2 | C C | D E | B,2 || G2 | F F | E2 || _D2 | C C | B, B, | E2 |]
  • L:1/2, so B2 is a semibreve, B a minim, B/2 a crotchet, B>A a dotted pair.
  • K: gives the key, including the mode (K:Cm), which is inferred from the key signature and the final bass note.
  • Accidentals are written as printed (^ sharp, _ flat, = natural).
  • C: is the composer line, included only when a composer is printed on the page.

Any ABC tool (for example the abcjs editor or EasyABC) can then show, play, transpose or re-engrave it.

Limitations

  • Single and double chants only. Four-part Anglican chant in the standard single (7 bars) or double (14 bars) form, on two staves with S+A in treble and T+B in bass. Triple and quadruple chants are not supported: the model has never seen one and will not transcribe them correctly. Hymns, metrical psalms, plainsong and anything else are forced into this shape or come out wrong.
  • Composer names are unreliable. The model reads notes much better than it reads the small print above the music. On the held-out real chants, the composer line is wrong in about a quarter of the images while fewer than 1 in 1,000 notes are wrong (see Results). Treat C: as a guess.
  • One chant per image. Crop to a single chant.
  • Check the output. It is right most of the time on clean prints, less often on blurred, skewed or low-light photos. Treat it as a fast first draft and compare it with the page.
  • Not a chatbot. The fine-tune narrows the model to this task. Other questions get poor answers.

How to use it

  • Scale the image down to at most 1024 pixels on its longest edge first. llama.cpp splits bigger images into tiles, and the model was only ever trained on whole, untiled images, so a full-size phone photo gives much worse results.

  • Use the exact prompt the model was trained on, word for word:

    Transcribe this Anglican psalm chant into ABC notation (four voices S A T B on two staves). Output only the ABC.
    
  • Decode greedily (temperature 0), with room for up to 1024 new tokens.

With llama.cpp, for example:

llama-mtmd-cli -hf yclicc/PsalmOMR-LFM2.5-VL-450M-GGUF:Q4_0 --jinja --temp 0 -n 1024 --image chant.png \
  -p "Transcribe this Anglican psalm chant into ABC notation (four voices S A T B on two staves). Output only the ABC."

With Transformers.js, load it as AutoModelForImageTextToText with dtype: { vision_encoder: "fp16", embed_tokens: "fp16", decoder_model_merged: "q4" }. The processor config here turns off tiling and Transformers.js's default 512×512 resize. Without WebGPU, add subfolder: "onnx_wasm" and session_options: { extra: { session: { disable_quant_qdq: "1" } } }: about 8× faster per token on WebAssembly, at the cost of ~1.5 GB of memory.

Results

Exact match means every note, rhythm, bar line, key and header line is right, including the composer. Pitch error rate is the edit distance on pitches per reference note.

Measured at the end of training, with the language model's linear layers at their exact Q4_0 values (as in both builds here) and images resized as in training:

SuiteImagesExactPitch error rateComposer right
Real Parish Psalter crops, held out490.7550.00080.755
… the same, resized the way llama.cpp does it490.7350.00080.735
Synthetic, renderers seen in training10000.9660.00090.980
Synthetic, unseen renderer (abcm2ps)10000.9860.00050.997
Held-out real chants, synthetic engraving4680.8630.00020.872
Random-interval chants (nothing to guess from musical habit)10000.8160.00640.976
Hidden / dashed / partial bar lines10000.9210.00170.989
LilyPond engraving, 13 music fonts6000.9500.00070.998

The real-chant test set is 7 chants cropped from The Parish Psalter that were never seen in training, in any key. Each appears as printed, plus 3 simulated scans and 3 simulated phone photos. On that set every image that was not an exact match had the composer wrong; key signature and mode were right in all 49. Double chants are harder than single ones (0.67 vs 0.82 exact on the real crops).

The table's evaluation kept the token embeddings and output head in full precision. These builds round them (GGUF: both Q6_K, as they share one tensor; ONNX: embeddings fp16, output head Q4_0), which was spot-checked but not measured on the full suites.

Training

  • Base: LiquidAI/LFM2.5-VL-450M.
  • Method: full fine-tune of the whole model (language model, vision encoder and projector), 20,000 steps × 32 images (640k images), on one RTX 6000 Ada (7.7 hours including evaluation).
    • Quantization-aware: every forward pass rounded the language model's 92 linear layers to their exact ggml Q4_0 values, with gradients passed straight through to float32 master weights. Both builds here are quantized from those float32 weights, so they hold exactly the Q4_0 weights the model trained with.
    • Image sizing: every image was fitted within 1024 px and 256 image tokens (sides multiples of 32 px), the size llama.cpp's LFM2 preprocessor picks, with tiling off. Half the images went through a port of llama.cpp's own (non-antialiased) bilinear resize.
    • Hard-example mining: a no-grad pass tagged per-token losses by voice, pitch, rhythm, key, font and so on, and steered the data generator towards what the model got wrong.
  • Data: no hand-labelled images. Chants are generated on the fly (transpositions of public-domain seed chants, a procedural SATB harmoniser, and random-interval chants in every key up to 7 sharps or flats), engraved with abcjs, Verovio (4 fonts) and LilyPond (13 fonts) with varied spacing, staff sizes, line weights and hidden bar lines, then degraded to look like old prints, scans and phone photos. 2% of training images are real Parish Psalter crops of training chants. Nine seed chants are held out of training entirely, in every key.
  • Export: GGUF with llama.cpp b9541 (convert_hf_to_gguf.py, then llama-quantize … Q4_0). The ONNX build reuses the graphs of onnx-community/LFM2.5-VL-450M-ONNX with these weights written in: the language model as MatMulNBits blocks holding the same Q4_0 values (block 32, zero point 8, output head included), the embeddings and vision encoder in fp16.

About the base model

LFM2.5-VL-450M is Liquid AI's small vision-language model: an LFM2.5-350M language backbone (a hybrid of short convolutions and grouped-query attention) and an 86M-parameter SigLIP2 NaFlex vision encoder that handles images at their native aspect ratio. See the LFM2.5-VL-450M model card for its training, intended uses and limitations, which still apply to the underlying model.

License

This model is a modified version of LFM2.5-VL-450M: all of its weights were changed by fine-tuning. It is released under the LFM Open License v1.0, the license of the base model. That license is based on Apache 2.0, with one addition: commercial use is licensed only to organisations with less than US$10 million in annual revenue (qualified non-profits using it for non-commercial purposes are exempt). Read the full text before using it commercially.

The chants in the examples and in the real-image test set are from The Parish Psalter and earlier sources, and are in the public domain.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers.js

Нельзя запустить

Модель выложена для браузера (ONNX / transformers.js).

Класс архитектуры
Lfm2VlForConditionalGeneration
Ревизия весов
5d4fd84

0 моделей