Open yishusong opened 2 months ago
In GLiNER max_len value refers not to tokens count, but to words count, 384 words are on average approximately equal to 512 tokens. Up to this range DeBERTA model - a backbone transformer of GLiNER works the best. You can increase the maximum length, but performance can start to degrade.
from gliner import GLiNER
import torch
model = GLiNER.from_pretrained("urchade/gliner_large-v2.1", max_length = 768).to('cuda:0', dtype=torch.float16)
Where can I have like a full documentation for the arguments for GLiNER ? max_length for example isn't in any arguments doc that I found, yet it works. So, my conclusion is that I neeed that docs to search on them for modifications. Thanks
I'm trying to increase the size of the input texts, however, it seems like all large versions of Gliner (2, 2.1) have default max_len = 384. So I'm wondering what's the reasoning behind the value 384 and whether I can modify this value during inference.
Much appreciated!