Warning when loading the model
First of all - Great model, cool library! Thanks!
code:
from span_marker import SpanMarkerModel
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-bert-base-uncased-acronyms")
entities = model.predict("compression algorithms like principal component analysis (pca) can reduce noise and complexity.")
print(entities)
warning:
Some weights of SpanMarkerModel were not initialized from the model checkpoint at tomaarsen/span-marker-bert-base-uncased-acronyms and are newly initialized: ['encoder.embeddings.position_ids']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
The output look OK, the spans are correct.
How to fix the warning?
Hmm, that is odd! I can reproduce this locally, and also with the cased variant of this model (tomaarsen/span-marker-bert-base-acronyms), but not with any of my other models, even if they use the same encoder (tomaarsen/span-marker-bert-base-fewnerd-fine-super). I'll try to dig into this more.
It's interesting that the performance seems unaffected: I ran the model against the validation set and it's still 91.96 F1, despite getting the warning.
For the time being - I wouldn't worry too much about the warning. There's probably ways to silence it, but it shouldn't affect the model performance.
I've trained and uploaded a new version - this one doesn't have the warning. It performs equivalently, and comes with a fancy new model card!
I'll close this for now :)