Views
No views yet
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.whodatbo1/glm-ocr-bulgarian-lora.1from transformers import AutoModel, AutoProcessor
2model = AutoModel.from_pretrained(
3 "whodatbo1/glm-ocr-bulgarian", trust_remote_code=True, torch_dtype="bfloat16"
4)
5processor = AutoProcessor.from_pretrained(
6 "whodatbo1/glm-ocr-bulgarian", trust_remote_code=True
7)1python convert_hf_to_gguf.py whodatbo1/glm-ocr-bulgarian \
2 --outfile glm-ocr-bg-F16.gguf --outtype f16
3python convert_hf_to_gguf.py whodatbo1/glm-ocr-bulgarian \
4 --mmproj --outfile mmproj.gguf --outtype f16
5
6# GLM-OCR-specific GGUF metadata patches (see legislature_differ GUIDEBOOK)
7python -m gguf.scripts.gguf_set_metadata glm-ocr-bg-F16.gguf \
8 glm4.block_count 16 --force
9python -m gguf.scripts.gguf_set_metadata glm-ocr-bg-F16.gguf \
10 glm4.nextn_predict_layers 0 --force
11
12llama-server -m glm-ocr-bg-F16.gguf --mmproj mmproj.gguf \
13 --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.whodatbo1/glm-ocr-bulgarian-lora for dataset, recipe, and config.