Open apeuvotepf opened 4 months ago
Hi @apeuvotepf , we will definitely consider it in the next releases. Thank you for pointing out the importance of offline mode and your proposed temporary fix. To make it more general, we need to consider more aspects of the current realization, but it should be realized in the next release.
xref #108
Hello
I am unable to load a model in offline mode (i.e., from a local directory). Surprisingly, this works for the model
urchade/gliner_multi
but not for the modelurchade/gliner_multi-v2.1
. Other models have not been tested.Error
The following error occurs:
Temporary Fix
Below is the modified code in
gliner/model.py
to allow offline mode functionality. Thelocal_files_only
argument was not propagated to all relevant functions for loading the model. While this solution might not be ideal as the process is different depending on the model (modification ofconfig.model_name
forurchade/gliner_multi-v2.1
but not forurchade/gliner_multi
), it temporarily fixes the issue.Modified Code
The following code shows the modifications:
Please consider addressing this issue in the next release to ensure better support for offline model loading.