You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
Activity
davidpedrosa commentedon Oct 17, 2025
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.
At this point if I execute:
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 issuingm = 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.