Home

Awesome

This repo is not actively maintained and has been archived. For an in-development replacement, please head over to swift-transformers!

Swift Core ML implementations of Transformers: GPT-2, DistilGPT-2, BERT, DistilBERT, more coming soon!

This repository contains:

🦄 GPT-2 and DistilGPT-2

Unleash the full power of text generation with GPT-2 on device!!

demo

🐸 BERT and DistilBERT

The BERTSQUADFP16 Core ML model was packaged by Apple and is linked from the main ML models page. It was demoed at WWDC 2019 as part of the Core ML 3 launch.

The DistilBERT Core ML models were converted from 🤗/transformers exports using the scripts in this repo.

core ml 3

🦄 Demo Time 🔥

demo

Apple demo at WWDC 2019

wwdc demo

full video here

BERT Architecture (wwdc slide)

bert

Notes

We use git-lfs to store large model files and it is required to obtain some of the files the app needs to run. See how to install git-lfson the installation page