Skip to content

GLM-OCR fails to load — "Failed to load model" on all configurations #337

Description

@tutak

GLM-OCR fails with Failed to load model on every configuration I try. The model uses glm4 architecture and was added to llama.cpp in PR ggml-org/llama.cpp#19677 (merged Feb 18, 2026, build ~b8096). Since llama.rn 0.12.0-rc.9 syncs to b8827, I expected the architecture to be supported.

Configs tried (all fail with same error):

  • with vision

    {"model": "GLM-OCR-Q8_0.gguf", "n_ctx": 6144, "n_gpu_layers": 99, "use_mlock": true, "ctx_shift": false}

  • no ctx_shift

    {"model": "GLM-OCR-Q8_0.gguf", "n_ctx": 6144, "n_gpu_layers": 99, "use_mlock": true}

  • CPU only

    {"model": "GLM-OCR-Q8_0.gguf", "n_ctx": 6144, "n_gpu_layers": 0, "use_mlock": true}

  • bare minimum

    {"model": "GLM-OCR-Q8_0.gguf", "n_ctx": 2048, "n_gpu_layers": 0, "use_mlock": false}

Model loading failed on all attempts. No additional error details from the native layer.

  • Is LLM_ARCH_GLMOCR (and PROJECTOR_TYPE_GLM4V) compiled into the iOS binary?

  • Does GLM-OCR's Multi-Token Prediction (MTP) require any special build flag?

  • Is there anything else needed to enable this architecture on iOS/Metal?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions