exporters
exporters copied to clipboard
Export Hugging Face models to Core ML and TensorFlow Lite
Hello. I am trying to convert finetuned pytorch version of bert-small-uncased model to coreml one but getting the following error: ``` python -m exporters.coreml --model=./small_legal_bert --feature text-classification exported/ Using framework...
I get this error when trying to convert `gpt2` ``` /site-packages/coremltools/converters/mil/mil/input_type.py", line 162, in validate_inputs raise ValueError(msg.format(name, var.name, input_type.type_str, ValueError: Op "137" (op_type: fill) Input shape="136" expects tensor or scalar...
Would be great to figure out how to support OPT models. `models.md` has a note that OPT is not supported yet: > `OPT [TODO verify] Conversion error on a slicing...
Seems like each of the Keras models need a config.json file. For e.g. `python -m exporters.coreml --model=keras-io/transformers-qa exported/` works because this model has a config.json but `python -m exporters.coreml --model=keras-io/image-captioning...
Note: requires Transfomers 4.27.3. For some reason, the `default` task works but `image-classification` causes a segmentation fault. The only difference is in the classification head, which already includes a softmax...
### Description Hi, I encounter following error when exporting sentence-tranformers/all-MiniLM-L6-v2 (a pytroch model) to a Coreml model. ` python -m exporters.coreml --model=sentence-transformers/all-MiniLM-L6-v2 exported/` ``` Using framework PyTorch: 1.12.1 Overriding 1...
`ane_transformers` (https://github.com/apple/ml-ane-transformers and https://machinelearning.apple.com/research/neural-engine-transformers) suggest weight-compatible changes to transformers allowing better mapping of the ops to ANE and thus resulting in significant performance improvement. @hollance do you think these optimizations...
Would it be possible to support the OneFormer model? I am not experienced with ML, but would love to use that model on mobile devices if possible. Thank you so...
When trying to export the Huggingface models Deeppavlov/rubert-base-cased and ckiplab/bert-base-chinese-ner using the command line, it fails with the output ``` Some weights of the model checkpoint at Deeppavlov/rubert-base-cased were not...
I'm unable to use `exporters` for `meta-llama/Llama-2-7b-chat-hf` model. Here is my command ``` python -m exporters.coreml --model=meta-llama/Llama-2-7b-chat-hf models/llama2.mlpackage ``` And here is the output ```bash % python -m exporters.coreml --model=meta-llama/Llama-2-7b-chat-hf...