pranaydeeps / Ancient-Greek-BERT

Pre-trained BERT Models for Ancient and Medieval Greek, and associated code for LaTeCH 2021 paper titled - "A Pilot Study for BERT Language Modelling and Morphological Analysis for Ancient and Medieval Greek"
GNU General Public License v3.0
32 stars 4 forks source link

Loading POS Tagger #3

Open Dinarque opened 2 weeks ago

Dinarque commented 2 weeks ago

Hello,

I am very interested in you work on Ancient Greek and tried to download the model you created to use it on POS tagging with the code given in the readme

from flair.models import SequenceTagger tagger = SequenceTagger.load('SuperPeitho-FLAIR-v2/final-model.pt')

Unfortunately it seems there is a problem with the pt file. I encounter this mistake : -> 1338 magic_number = pickle_module.load(f, **pickle_load_args) 1339 if magic_number != MAGIC_NUMBER: 1340 raise RuntimeError("Invalid magic number; corrupt file?")

UnpicklingError: invalid load key, 'v'

I tried to download the model from the raw file which changed the error as a problem happens in the HF authentification : huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '../LM/SuperPeitho-v1'. Use repo_type argument if needed. It seems that the tokenizer the model is trying to load is not available and I havent discovered a way to change it into a correct path to make the model run.

Does the POS model still work for you with the code given on github ? Would you have other ideas to solve this and use the model ?

Many thanks for your help and good luck for your current works, Best, Louis J