How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf jolovicdev/princip-v0.2-gguf:F16
# Run inference directly in the terminal:
llama cli -hf jolovicdev/princip-v0.2-gguf:F16
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf jolovicdev/princip-v0.2-gguf:F16
# Run inference directly in the terminal:
llama cli -hf jolovicdev/princip-v0.2-gguf:F16
Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf jolovicdev/princip-v0.2-gguf:F16
# Run inference directly in the terminal:
./llama-cli -hf jolovicdev/princip-v0.2-gguf:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf jolovicdev/princip-v0.2-gguf:F16
# Run inference directly in the terminal:
./build/bin/llama-cli -hf jolovicdev/princip-v0.2-gguf:F16
Use Docker
docker model run hf.co/jolovicdev/princip-v0.2-gguf:F16
Quick Links

Princip V0.2

Reads lines of Church Slavonic manuscript and translates them into Serbian. Three tasks: transcription from an image, translation from an image, and translation from text.

Languages

Source is Church Slavonic of the Russian recension, the language of the service books in current liturgical use in the Serbian Orthodox Church, together with Old Church Slavonic from the 10th-11th century canon. Target is Serbian in the register of the 1868 Daničić translation.

Serbian-recension Church Slavonic (srpskoslovenski) is not represented. See Limitations.

Tasks

task input output
i2t image of a single text line transcription
i2s image of a single text line Serbian translation
t2s Church Slavonic text Serbian translation

Trained on single-line crops, not whole pages. Segment a folio into lines first.

Usage

import torch
from transformers import AutoProcessor, AutoModelForImageTextToText

model = AutoModelForImageTextToText.from_pretrained(
    "jolovicdev/princip-v0.2", dtype=torch.bfloat16, device_map="cuda"
)
processor = AutoProcessor.from_pretrained("jolovicdev/princip-v0.2")

Prompts, used verbatim:

  • Prevedi sledeci tekst sa staroslovenskog na srpski:\n{text}
  • image + Transkribuj staroslovenski tekst sa ove slike.
  • image + Prevedi tekst sa ove slike na srpski.

Close the thinking block before generating. The chat template opens one and leaves it open; if you do not close it the model writes reasoning instead of the answer.

text = processor.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
if text.rstrip().endswith("<think>"):
    text += "\n</think>\n\n"

This applies to llama.cpp and any OpenAI-compatible server too.

Results

Held-out data, greedy decoding.

task metric score
translation from text chrF 46.9
translation from image chrF 44.8
transcription, real manuscript folios CER 0.117
transcription, rendered lines CER 0.023

On manuscripts absent from training (Codex Assemanianus, Savvina kniga) translation scores chrF 52.6, so the model generalises beyond the hands it was trained on.

Roughly 36% of rare words, mostly proper nouns, survive into the translation. The model can produce fluent Serbian that misstates the source; verify anything that matters.

Training

LoRA fine-tune of Qwen/Qwen3.5-9B, r=32, 1 epoch, bf16, on 4x RTX 5090. 96.9M trainable parameters covering the attention and MLP projections, the vision merger, and both embedding matrices. Data: 81k samples across the three tasks, drawn from a parallel corpus of biblical, psalter and liturgical Church Slavonic aligned to Serbian, plus 49.7k line images combining real folio crops with rendered lines. Images are split by folio, so no page appears in both training and evaluation.

Sources and licensing

source licence
Daničić-Karadžić Serbian Bible 1868 public domain
Elizabeth Bible 1757 public domain
PROIEL Codex Marianus CC BY-NC-SA 4.0
TOROT (Zographensis, Psalterium Sinaiticum, Suprasliensis, Euchologium, Kiev Missal) CC BY-NC-SA 4.0
cu-books liturgical texts MIT
Serbian Mineja, SPC edition (svetosavlje.org) no explicit licence, research use
Codex Suprasliensis folio images (suprasliensis.obdurodon.org) CC BY-NC-SA 3.0
Menaion, Monomakh, Fedorovsk, Pomorsky fonts SIL OFL

The PROIEL and TOROT treebanks are non-commercial, so this model is released under CC BY-NC-SA 4.0.

Limitations

  • Serbian recension is absent. Medieval Serbian manuscripts such as Miroslavljevo jevanđelje use orthographic conventions the model has not seen. Expect degraded results.
  • Line crops only. Whole pages are out of distribution.
  • Parchment and print only. Carved stone, epigraphy and heavily degraded surfaces are outside the training distribution.
  • Glagolitic is not supported. The Old Church Slavonic sources are Glagolitic manuscripts in Cyrillic transcription; the model has not seen Glagolitic script.
  • It does not reliably refuse out-of-domain input. Shown Cyrillic that is not Church Slavonic, it will usually attempt a transcription rather than decline.
  • Serbian register follows the 1868 Daničić translation, not contemporary Serbian.
  • Non-commercial use only.
Downloads last month
3
GGUF
Model size
9B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jolovicdev/princip-v0.2-gguf

Finetuned
Qwen/Qwen3.5-9B
Adapter
(529)
this model