Exporters enables straightforward conversion of Hugging Face Transformers models to Core ML format. The project simplifies model deployment on Apple platforms like iOS, macOS, and tvOS by facilitating interoperability with Core ML. It addresses the need for a convenient alternative to manual conversion scripts, offering tight integration with the Transformers library and the Hugging Face Hub. The core technology leverages coremltools for the conversion process.
The project provides a user-friendly command-line interface for model conversion. It offers pre-built configurations for various model architectures, streamlining the export process. The integration with Hugging Face Hub allows direct conversion of models stored on the Hub. The use of the mlpackage format, introduced in 2021, supports modern Core ML features and is recommended over the older .mlmodel format. The project features a no-code transformers to Core ML conversion Space for easy experimentation.
- Model Format Support: Converts models from PyTorch, TensorFlow, and JAX to Core ML.
- Configuration Objects: Provides pre-built configurations for a variety of model architectures like BERT, GPT2, and ViT.
- Hugging Face Hub Integration: Enables direct conversion of models hosted on the Hugging Face Hub.
- Command-Line Interface: Offers a simple and intuitive command-line interface for model export.
- mlpackage Format: Uses the latest mlpackage format for improved Core ML compatibility.
- Model Topology Selection: Supports various model features and auto classes for different model architectures and tasks.
- Cross-Platform Usage: Can be used from Linux, although validation is performed on macOS.
The project is actively maintained with recent commits and a growing community presence. Documentation covers essential aspects such as installation, configuration, and various features. The project's reliability is supported by regular updates and community contributions. However, it is currently considered a work in progress, and expanded feature support is anticipated.
This project benefits developers who want to deploy Hugging Face Transformers models on Apple devices, offering an efficient and integrated solution. It supports a variety of use cases, from on-device inference to mobile applications, by enabling seamless integration with Core ML. Exporters simplifies the deployment pipeline by abstracting away the complexities of Core ML conversion, providing greater value than manual or alternative approaches.
