GLM-OCR Bulgarian (merged)
zai-org/GLM-OCR with a
Bulgarian-tuned LoRA merged in. Drop-in replacement for the base
GLM-OCR — same processor, same Text Recognition: prompt, same output
schema.
The LoRA-only version (~50 MB) is at
whodatbo1/glm-ocr-bulgarian-lora.
Use (transformers)
from transformers import AutoModel, AutoProcessor
model = AutoModel.from_pretrained(
"whodatbo1/glm-ocr-bulgarian", trust_remote_code=True, torch_dtype="bfloat16"
)
processor = AutoProcessor.from_pretrained(
"whodatbo1/glm-ocr-bulgarian", trust_remote_code=True
)
Use (llama.cpp / llama-server)
Convert to GGUF, patch GLM-OCR's NextN/MTP layer metadata, then serve:
python convert_hf_to_gguf.py whodatbo1/glm-ocr-bulgarian \
--outfile glm-ocr-bg-F16.gguf --outtype f16
python convert_hf_to_gguf.py whodatbo1/glm-ocr-bulgarian \
--mmproj --outfile mmproj.gguf --outtype f16
# GLM-OCR-specific GGUF metadata patches (see legislature_differ GUIDEBOOK)
python -m gguf.scripts.gguf_set_metadata glm-ocr-bg-F16.gguf \
glm4.block_count 16 --force
python -m gguf.scripts.gguf_set_metadata glm-ocr-bg-F16.gguf \
glm4.nextn_predict_layers 0 --force
llama-server -m glm-ocr-bg-F16.gguf --mmproj mmproj.gguf \
--flash-attn off -c 4096 --image-max-tokens 1024
--flash-attn off is required (llama.cpp #19721); --image-max-tokens 1024
keeps Metal compute buffers within budget for full-page A4 inputs.
Training
See the adapter card at
whodatbo1/glm-ocr-bulgarian-lora for dataset, recipe, and config.
License
Source content is in the public domain (Bulgarian official gazette). This model is released under MIT.
- Downloads last month
- 19
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for whodatbo1/glm-ocr-bulgarian
Base model
zai-org/GLM-OCR