Skip to content

gliner>=0.2.23 breaks HuggingFace Inference Endpoints (transformers 5.x incompatible with HF toolkit) #327

@achpalaman

Description

@achpalaman

Problem
Starting with v0.2.23, GLiNER requires transformers>=4.57.3, which pulls in transformers 5.x. This breaks deployment on HuggingFace Inference Endpoints.

Root Cause
HF Inference Endpoints use huggingface-inference-toolkit, which has a hard dependency on transformers==4.51.3. The toolkit imports from transformers.file_utils:
from transformers.file_utils import is_tf_available, is_torch_available

In transformers 5.0, these were moved to transformers.utils, causing an ImportError before any custom handler code runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions