Skip to content

compatible issue with windows. #295

Open

Description

@ringochuchudull

Hi,

I am currently using Windonws 11 with mini conda with Python 3.10. It seem that your library isn't compatible with windows. When trying to run the example, the script unexpectedly quitted without error messages.

In this situation, is it possible to provide a hf config.json that works well with, for example, transformer pipe?

Activity

  1. davidpedrosa commented on Oct 17, 2025

    @davidpedrosa

    Hi,

    DISCLAIMER: Please take this with a pinch of salt. I am fairly new to this kind of models. However, what I am going to share served as a workaround for me (at least for the time being) so it might be helpful to someone else.

    I had developed my app in linux and it was working fine, when they demanded me to provide it for windows. Then I experienced the same issue @ringochuchudull reported.

    What I did is to open a python interpreter in linux (actually it was in WSL), load the model and export it.

    # pip install gliner
    # pip install onnxruntime==1.20.0
    
    from gliner import GLiNER
    
    # Load the desired model
    model = GLiNER.from_pretrained( "urchade/gliner_multi_pii-v1")
    model.save_pretrained("/tmp/gliner_test")
    

    At this point if I execute:

    m = GLiNER.from_pretrained("/tmp/gliner_test", load_tokenizer=True)
    

    I get the error "config.json not found in /tmp/gliner_test".

    When inspecting the directory I can check there is no config.json but there is a file named gliner_config.json.

    If I issue print(model.config.to_json_string()) I can check the output matches the contents of gliner_config.json, so I just copy glinner_config.json to config.json. Now issuing m = GLiNER.from_pretrained("/tmp/gliner_test", load_tokenizer=True) works.

    It only remains to copy /tmp/gliner_test to a suitable directory in windows and just load this model.

  2. added
    bug
    on Sep 4, 2026
  3. self-assigned this
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions