urchade / GLiNER

Generalist and Lightweight Model for Named Entity Recognition (Extract any entity types from texts) @ NAACL 2024
https://arxiv.org/abs/2311.08526
Apache License 2.0
1.46k stars 126 forks source link

Fine-tuning example is broken #169

Open candalfigomoro opened 3 months ago

candalfigomoro commented 3 months ago

I tried to run the fine-tuning example in examples/finetune.ipynb (without any change) but when I call trainer.train() I get the following error for each training step:

Skipping iteration due to error: The tensor has a non-zero number of elements, but its data is not allocated yet. Caffe2 uses a lazy allocation, so you will need to call mutable_data() or raw_mutable_data() to actually allocate memory.

@urchade Can you help me?