- Notifications
You must be signed in to change notification settings - Fork180
Swift Core ML 3 implementations of GPT-2, DistilGPT-2, BERT, and DistilBERT for Question answering. Other Transformers coming soon!
License
huggingface/swift-coreml-transformers
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repo is not actively maintained and has been archived. For an in-development replacement, please head over toswift-transformers!
Swift Core ML implementations of Transformers: GPT-2, DistilGPT-2, BERT, DistilBERT, more coming soon!
This repository contains:
- ForBERT andDistilBERT:
- pretrainedGoogle BERT andHugging Face DistilBERT models fine-tuned for Question answering on the SQuAD dataset.
- Swift implementations of theBERT tokenizer (
BasicTokenizer
andWordpieceTokenizer
) and SQuAD dataset parsing utilities. - A neat demo question answering app.
- ForGPT-2 andDistilGPT-2:
- aconversion script from PyTorch trained GPT-2 models (see our
transformers
repo) to CoreML models. - TheGPT-2 generation model itself, including decoding strategies (greedy and TopK are currently implemented) and GPT-2 Byte-pair encoder and decoder.
- A neat demo app showcasing on-device text generation.
- aconversion script from PyTorch trained GPT-2 models (see our
Unleash the full power of text generation with GPT-2 on device!!
TheBERTSQUADFP16
Core ML model was packaged by Apple and is linked from themain ML models page. It was demoed at WWDC 2019 as part of the Core ML 3 launch.
TheDistilBERT
Core ML models were converted from🤗/transformers
exports using the scripts in this repo.
Apple demo at WWDC 2019
full videohere
We usegit-lfs
to store large model files and it is required to obtain some of the files the app needs to run.See how to installgit-lfs
on theinstallation page
About
Swift Core ML 3 implementations of GPT-2, DistilGPT-2, BERT, and DistilBERT for Question answering. Other Transformers coming soon!
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.