Skip to content

LightOnOCR-2-1B fails to load in Docker deployment: missing LightOnOcrForConditionalGeneration in bundled transformers #200

Description

@tatankam

Description

I'm running SIE using the official Docker deployment with the image image: ghcr.io/superlinked/sie-server:latest-cuda12-default

When trying to use the model lightonai/LightOnOCR-2-1B, model loading fails with the following error:

ModelLoadFailedError: Model 'lightonai/LightOnOCR-2-1B' failed to load (DEPENDENCY, attempts=1):
ImportError: cannot import name 'LightOnOcrForConditionalGeneration' from 'transformers'

Investigation

Inside the running container:

import transformers
print(transformers.__version__)

returns:

4.57.6

and:

from transformers import LightOnOcrForConditionalGeneration

fails with:

ImportError: cannot import name 'LightOnOcrForConditionalGeneration'

The bundled Transformers package used by SIE is:

/app/bundle-libs/transformers

I also verified that there is no lighton_ocr model implementation present under:

/app/bundle-libs/transformers/models

Expected behavior

Since lightonai/LightOnOCR-2-1B appears in the available model catalog, I would expect it to either:

  1. Load successfully, or
  2. Be excluded/marked as unsupported when the required backend is not available.

Question

Is lightonai/LightOnOCR-2-1B currently supported by the Docker release of SIE?

If not, is support planned in a future image/version, or is there a recommended workaround?

Thanks a lot
Mario

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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