segment-any-text/wtpsplit

Huggingface AutoModelForTokenClassification bug

asusdisciple opened this issue · 4 comments

If you load "canine s12l no adapters" with the AutoModelForTokenClassification class and from_pretrained method with hugginface you get an KeyError: "la-canine".
I looked for a key in configuration_auto.py and only found "canine". Should be a quick fix.

Hi!

la-canine is a custom model class registered by wtpsplit.

Try importing wtpsplit first (like here: https://github.com/bminixhofer/wtpsplit#advanced-usage), that should solve it.

Hi!

la-canine is a custom model class registered by wtpsplit.

Try importing wtpsplit first (like here: https://github.com/bminixhofer/wtpsplit#advanced-usage), that should solve it.

I've imported wtpsplit.
but still got KeyError: "la-canine".

AutoConfig.register("bert-char", BertCharConfig) is registered

i know..

import wtpsplit.models

Good catch. Updated in the readme and closing this!