madcato / huggingface-coreml

This repository contains a script and information to convert a Huggingface models to CoreML.
16 stars 2 forks source link

Huggingface to CoreML

This repository contains a script and information to convert a Huggingface models to CoreML.

Info

Links

Initial steps

  1. Clone repo: $ git clone https://github.com/madcato/huggingface-coreml.git
  2. Execute chatbot to try chatbot (optional), $ python3 try.py
  3. Install huggingface exporters submodule, $ git submodule init && git submodule update
  4. $ cd exporters && pip3 install -e . && cd ..
  5. python3 export

The last step will create two mlpackage files in the exported folder: one for decoder and another for decoder part of the model. These files can be opened with Xcode and the model can be tested in the playground or project.

Try

Exporters features