You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from tner import TransformersNER
model = TransformersNER("tner/deberta-v3-large-btc")
model.predict(["Congratulations Local 330 members who were promoted this morning! Steve Kaut to Deputy Chief, Todd Kelly to District Chief, Matt Askea and Brent Scarbrough to Captain, and Will Carter, Jeff Gostkowski, and Dave Goodspeed to Lieutenant. Good luck in your positions. #330forthe330 https://t.co/acHXx6DRY4"])
First of all, the model is deberta large model fine-tuned on BTC dataset https://huggingface.co/datasets/tner/btc, and we fine-tune models on NER task with CRF layer https://towardsdatascience.com/conditional-random-fields-explained-e5b8256da776, which is not available on the inference API at the moment, so when we call the model via inference API, it runs the model with out the CRF layer, which results in the different output from the tner API. In short, CRF layer adds bias of the sequence dependencies (eg. I-PER should come after B-PER) to fix the prediction, so you can expect the prediction from inference API is slightly worse than what you can get from tner API due to the CRF availability.
Uploading question.docx…
The text was updated successfully, but these errors were encountered: