GLiNER icon indicating copy to clipboard operation
GLiNER copied to clipboard

Conversion to ONXX

Open jitesh0034 opened this issue 6 months ago • 4 comments

Using this snippet to save pre-trained model locally -

from gliner import GLiNER
model  = GLiNER.from_pretrained("urchade/gliner_medium")
model.save_pretrained("gliner_medium")

post this, running script for onxx conversion as per documentation - python GLiNER/convert_to_onnx.py --model_path gliner_medium/ --save_path gliner_onnx/ --quantize True

getting error on - OSError: gliner_medium does not appear to have a file named config.json. Checkout 'https://huggingface.co/gliner_medium/tree/None' for available files.

Tried with changing file name from 'gliner_config.json' to 'config.json' getting new error of - ValueError: Unrecognized model in gliner_medium. Should have a `model_type` key in its config.json

jitesh0034 avatar Aug 21 '24 17:08 jitesh0034