You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Hebrew-language documents the model produces no usable output: dense full pages return
empty results at every size preset, and on a large-glyph crop it reads the Latin text
correctly while answering the Hebrew text on the same image with an invented,
niqqud-decorated token repeated several times. This looks like Hebrew (Hebr script) is
outside the training distribution. Related: #3 (unanswered language-support question).
Environment
baidu/Unlimited-OCR via transformers==4.55.0, trust_remote_code=True, torch_dtype=torch.bfloat16
NVIDIA L4 (24 GB), CUDA build of torch 2.13, Linux (GCP Deep Learning VM)
Latin tokens read correctly (Master-Coach, the invoice number 10707), but ALL Hebrew on the crop answered as תְבָרִי לַלְעֹן repeated ×3 — a token that appears nowhere in the image
The Latin success in the same inference rules out an image-quality or harness problem.
An earlier full-page run with the <|grounding|> prompt degenerated into a repeated <|det|>text [102, 844, 190, 844]<|/det|>[Non-Text] loop until max_length.
Reproduction should work with any Hebrew document image (e.g. render a paragraph of Hebrew
text plus one English word at ~1200 px height and compare which of the two comes back).
Questions
Is Hebrew (or RTL scripts generally) included in the training data / supported language set?
If not, could the README document the supported-language list? (Language Support #3 asks this too.)
If Hebrew is expected to work, is there a recommended config for RTL documents?
Summary
On Hebrew-language documents the model produces no usable output: dense full pages return
empty results at every size preset, and on a large-glyph crop it reads the Latin text
correctly while answering the Hebrew text on the same image with an invented,
niqqud-decorated token repeated several times. This looks like Hebrew (
Hebrscript) isoutside the training distribution. Related: #3 (unanswered language-support question).
Environment
baidu/Unlimited-OCRviatransformers==4.55.0,trust_remote_code=True,torch_dtype=torch.bfloat16model.infer(tokenizer, prompt="<image>\nFree OCR.", image_file=..., output_path=..., save_results=True)What we tested (controlled)
Input: a scanned Hebrew business invoice (A4, mixed Hebrew/Latin header), rendered at 200 DPI
(1654×2339). Each run in a fresh process.
base_size=1024, image_size=640, crop_mode=True(default/gundam)base_size=1024, image_size=1024, crop_mode=Falsebase_size=1280, image_size=1280, crop_mode=Falsebase_size=1280, image_size=1280, crop_mode=FalseMaster-Coach, the invoice number10707), but ALL Hebrew on the crop answered asתְבָרִי לַלְעֹןrepeated ×3 — a token that appears nowhere in the imageThe Latin success in the same inference rules out an image-quality or harness problem.
An earlier full-page run with the
<|grounding|>prompt degenerated into a repeated<|det|>text [102, 844, 190, 844]<|/det|>[Non-Text]loop untilmax_length.Reproduction should work with any Hebrew document image (e.g. render a paragraph of Hebrew
text plus one English word at ~1200 px height and compare which of the two comes back).
Questions