Unbabel / COMET

A Neural Framework for MT Evaluation
https://unbabel.github.io/COMET/html/index.html
Apache License 2.0
441 stars 72 forks source link

Runtime error when loading wmt23-cometkiwi-da-xl #202

Closed radka-j closed 4 months ago

radka-j commented 4 months ago

🐛 Bug

I get the following error when trying to load the model from HuggingFace:

RuntimeError: Error(s) in loading state_dict for UnifiedMetric:
        Missing key(s) in state_dict: "encoder.model.embeddings.position_ids". 

To Reproduce

I am following the example on the HuggingFace page:

from comet import download_model, load_from_checkpoint

model_path = download_model("Unbabel/wmt23-cometkiwi-da-xl")
model = load_from_checkpoint(model_path)

Environment

OS: MacOS

Dependencies:

huggingface_hub = "0.12.1"
python = ">=3.9,<4.0.0"
unbabel-comet= "2.0.1"
torch = "2.0.1"
pytorch-lightning = "1.9.5"
radka-j commented 4 months ago

Issue resolved by updating unbabel-comet package to latest version.