TinyGPT2 for TinyBrain
This repository packages sshleifer/tiny-gpt2 for the TinyBrain runtime on Apple Watch.
TinyBrain bundle contract
The conversion script produces a single bundle archive:
tinygpt2_only_logits.mlmodelc.zip
The zip layout is:
tinygpt2_only_logits.mlmodelc/tokenizer/metadata.json
Runtime interface
- Task: causal language modeling
- Inputs:
input_ids(Int32, shape1 x 16)attention_mask(Int32, shape1 x 16)
- Output:
logits
Files included in tokenizer/
tokenizer.jsonwhen provided by Transformersvocab.jsonmerges.txtspecial_tokens_map.jsontokenizer_config.jsontoken_decoder.json
Build
Run:
python3 convert_tinygpt2_to_coreml.py
The script:
- Downloads the model and tokenizer from Hugging Face.
- Converts the model to Core ML.
- Compiles the package to
.mlmodelc. - Writes TinyBrain runtime metadata.
- Packages the compiled model, tokenizer, and metadata into one zip.
- Downloads last month
- 4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support