huggingface / swift-coreml-transformers

Swift Core ML 3 implementations of GPT-2, DistilGPT-2, BERT, and DistilBERT for Question answering. Other Transformers coming soon!
Apache License 2.0
1.62k stars 179 forks source link

Unable to deserialize object #26

Closed markvanwijnen closed 2 years ago

markvanwijnen commented 2 years ago

I run xCode 13.2.1. When I build and run I get the following warnings, which results in errors.

coremlc: warning: unable to read document: /Users/name/Downloads/swift-coreml-transformers-master/Resources/gpt2-64-12.mlmodel
detail: validator error: unable to deserialize object
coremlc: error: unable to read document: /Users/name/Downloads/swift-coreml-transformers-master/Resources/gpt2-64-12.mlmodel
detail: validator error: unable to deserialize object

unable to read document: /Users/name/Downloads/swift-coreml-transformers-master/Resources/gpt2-64-12.mlmodel unable to read document: /Users/name/Downloads/swift-coreml-transformers-master/Resources/distilgpt2-64-6.mlmodel

markvanwijnen commented 2 years ago

Let me answer it myself. This has to do with GIT Large File Storage.

Hopefully this will help out others:

Not sure if that last one is needed, but with this it worked.

frederikbrammer commented 2 years ago

The last command git lfs checkoutis indeed needed to move the model files to the correct location.