With Mac OS 10.14, Apple has introduced two new additions for developers to Mac OS 10.14 Mojave that allow them to further develop applications with artificial intelligence. Let’s dig a little deeper into them.
Mac OS 10.14 Mojave: Machine Learning in macOS
While other Machine Learning development systems use external services from a server, Apple has placed special emphasis on creating its own frameworks and techniques that run locally to train models without additional costs. The two new additions with Core ML2 and Create ML.
Core ML 2
Core ML is Apple’s framework for machine learning on high-performance devices and has received some enhancements with Core ML 2. The latest version of the framework supports up to 30 types of layers, as well as standard machine learning models such as SVMs, tree assemblies, and generalized linear models. And applications built using Core ML models in both macOS and iOS will continue to deliver excellent performance without having to contact a server or send data from a device.
With the help of the latest version of Metal, model training with Core ML 2 can increase performance up to 20 times during creation using third-party libraries such as Turi, TensorFlow and Watson Services when using your device’s GPU.
The on-device processing has also received a performance update, up to 30% faster due to the implementation of batch predictions in the Apple framework. Developers can also reduce the size of their models by up to 75% in some cases.
Create ML
Create ML is a tool designed to help developers who are not Machine Learning experts to generate and test learning models to integrate them into their applications. Using Create ML, developers can train models to recognize images, analyze the meaning of the text, or find a relationship between numerical values. They can use common data sets or use their own.
After developers have tested their Create ML models and are satisfied with their performance, the work done with Create ML can be integrated into their applications using Core ML.
Most importantly, apart from the ease of use for non-expert developers, Create ML’s emphasis on creating custom models on your Mac is a must. Using the power of Metal and GPU model testing, developers can get really impressive results while training models with Create ML.
All the models can even be trained using Xcode Playgrounds. According to Apple documentation, image classification and natural language models built with Create ML take less time to form and end up being smaller.
At WWDC 2018, Apple’s Craig Federighi gave the example of Memrise, a developer who, among other things, uses device cameras to identify objects and pronounce their names in multiple languages. Previously, the company needed 24 hours to train one of its models using 20,000 images.
By using Create ML, Memrise was able to reduce that time to 48 minutes on a MacBook Pro and 18 minutes on an iMac Pro. Thanks to the work done for Core ML 2 and Create ML, the developer was also able to reduce the size of his model from 90MB to 3MB.