Cressy from the temple of Wafei
Quantum Position | 公众号 QbitAI
It's coming, it's coming, Apple's Apple Intelligence is finally meeting with fruit fans!
With the launch of iOS 18.1 beta, registered developers will be able to experience some of Apple's AI features from now on.
最明显的一处就是Siri的全面换新,变身成了Apple Intelligence & Siri。
Another big update is the writing feature, which helps polish Twitter comments and organizes advanced expressions by dividing them by two.
Even Dirty Words can be elegant and easy-going in minutes:
After Apple Intelligence is enabled, Apple's self-developed device-side large model will be downloaded to the device.
According to the feedback from the experience of netizens with fast hands, it is not like other AI that refuses service at every turn.
At the same time, the report of Apple's own large model has also been released, revealing a lot of technical details.
The report shows that in tasks such as instruction compliance and text summarization, Apple's cloud large model has achieved more results than GPT-4.
Ruoming Pang, head of Apple's base model team, also said that its model is competitive with some best-in-class models.
A Ph.D. in computer science from Princeton, a bachelor's and master's degree from Shanghai Jiaotong University and the University of Southern California, Pang Ruoming joined Apple in 2021 after 15 years as an engineer at Google.
Apple Intelligence's main conversational capabilities are powered by models developed by his team.
This time, he also emphasized that these base models are "not chatbots" but support a wide range of features, including summarization, writing aid, tool usage, and code.
In addition, Apple has also developed a number of self-developed algorithms to improve the performance of the model, and specific information is also disclosed in the report.
There are also attentive netizens who discovered Huadian from it-
The training of Apple's large model uses Google's TPU cluster, and the NVIDIA content is zero.
Siri升级,但ChatGPT暂未接入
In order to experience Apple's Apple Intelligence, there are quite a few conditions that need to be met.
First of all, the beta version of iOS 18.1 is currently limited to $99 a year for registered developers, so regular users will have to wait.
In addition, as mentioned before, only the M series and A17 Pro chips are supported, which means that only the 15 Pro and 15 Pro Max in some regions of the iPhone can be used.
In addition to the hardware and identity requirements, the system settings also need to be modified, the region must be set to United States, and the language of the device and Siri must be changed to English.
Once all these requirements have been met, it is time to ...... Joined the waiting queue.
The launch of Apple Intelligence is part of the features, mainly around the text generation, Siri and photo album modules.
Let's talk about text generation first, as an important part of Apple's AI, the scope of application of this function is not limited to Apple's official app.
As long as you use the standard input text system, you can also use this function in third-party applications for text summarization, proofreading, and rewriting.
In addition, combined with the audio transcription feature already available in Voice Memos in iOS 18 Beta, the text generation system can also generate summaries for audio recordings.
The second more important update is Siri.
On the interface, the new version of Siri is no longer a circular icon, and there will be colored lights that surround the screen constantly flashing when running.
It also provides a text conversation method for users who don't want to have a voice conversation, and double-click the bottom of the screen to bring up the keyboard and communicate with Siri typing.
In terms of content, the new version of Siri will be able to answer questions related to Apple products and help users troubleshoot.
In addition, the new Siri can understand the context of a query to the next, such as asking Siri to create a calendar event and then requesting a reminder without having to restate what is being talked about.
However, the screen awareness feature introduced earlier is not included in this Siri update.
Albums have been updated to allow users to search for specific photos and even specific moments in videos in natural language.
That's all for AI in this developer beta release, but it's important to note that this is just a few of the features shown at previous launches, and there's a lot more that hasn't been released yet.
In particular, the previously mentioned ChatGPT integration has not yet been accessed in this update.
Deciphering the Apple model
Apple has already said that ChatGPT is not mandatory in Apple's AI, and its main function is driven by its own large model.
And about this model, Apple also released a comprehensive technical report at the same time as the launch.
模型的名字简单粗暴,就叫苹果基础模型(Apple Foundation Model,简称AFM),有端侧(on-device)和云侧(server)两个版本。
The number of parameters of the device-side model is about 3B, while the cloud-side is not specifically disclosed, only that it is larger than the device-side, and both have a context window of 32k.
★ The NVIDIA content during the training process is 0
The training of the model is carried out through its own AXLearn framework based on JAX, and strategies such as tensor parallelism and flow parallelism are adopted.
The hardware uses Google TPU, of which 8192 TPUv4 chips are used on the cloud side, and 2048 TPUv5p chips are used on the end side, in short, the NVIDIA content is 0.
The data is mainly from web crawls crawled by Applebot, as well as publicly licensed code and math datasets.
It is worth mentioning that none of the datasets selected by Apple use GPL, and they are all open source licenses such as MIT, Apache, and CC0, which are more open.
In terms of process, the pre-training process of AFM is divided into three phases - core training, continuous training, and context extension.
In the core training phase, the cloud-side version has a data volume of 6.3 T tokens and a window length of 4096, and the device-side version is distilled on this basis.
As training continues, the weight of low-quality data is reduced, and math, code, and authorized high-quality data are used to improve the model's capabilities.
The process uses data from 1T tokens, and the window length also changes from 4096 to 8192.
In the next phase, the window length is further expanded to 32k, involving long sequences of text and synthetic data, with a total amount of 100B tokens.
★ Original reinforcement learning algorithm
The post-training of AFM includes supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF).
The SFT phase uses synthetic data and human-annotated data, and the synthetic data is mainly about mathematics, tool use, and code.
In the RLHF stage, Apple has created two reinforcement learning algorithms, iTeC and MDLOO.
iTeC, which stands for Iterative Teaching Committee, is an algorithm for reinforcement learning post-training, which aims to optimize the performance of the model through multiple rounds of iteration.
The core idea is to combine different preference optimization algorithms, including rejection sampling and direct preference optimization (DPO), so that the model can benefit from a variety of optimization strategies, thereby improving its adaptability and performance to specific tasks.
In each iteration, iTeC selects a set of best-performing models from the latest models to form a "model committee". These models were obtained through different training methods such as SFT, RS, DPO/IPO, and RL.
By collecting feedback on human preferences for model responses, iTeC continuously updates its reward models and uses them to train new sets of models.
After collecting each batch of human preference data, iTeC will refresh its reward model and train a new set of models, which will be repeated through multiple rounds of iteration to gradually improve the model performance.
MDLOO is an online reinforcement learning algorithm specifically designed to optimize the response quality of the model.
As an online algorithm, it decodes responses in real-time during model training and applies RL algorithms to maximize rewards.
That is, this approach allows the model to continuously learn and adjust its strategies during training to generate responses that are more in line with human preferences.
Specifically, it combines the Leave-One-Out (LOO) advantage estimator and the Mirror Decline Strategy Optimization (MDPO) to achieve a more stable and effective policy update.
★ End-side mixed-precision quantization
In order to make the device-side model run more efficiently and avoid occupying too much memory resources, Apple has quantized the device-side version of AFM.
Specifically, Apple uses a mixed-precision quantization method, and uses different quantization accuracy for different links.
The way Apple uses is known as the "palette" strategy, in which the weights are grouped together instead of each quantifying individually, and the weights within the group share the same quantization constant.
For projection weights, the same quantization constant is shared every 16 columns/rows, and 4-bit quantization is performed using the K-means algorithm.
For the embedding layer, 8-bit integers are used for per-channel quantization because the input and output are shared, and some less important layers are further compressed to 2-bit quantization.
In order to recover the performance lost after quantization, and to maintain the output quality and accuracy of the model, Apple has also introduced Accuracy-Recovery Adapters.
The adapter is a small neural network module that can be plugged into a specific layer of a pre-trained model, trained on top of the quantized model, and fine-tuned to learn how to compensate for the effects of quantization.
★ Some of the tasks surpass GPT-4
After applying a series of optimization techniques, it is also time to accept the performance of the model.
In this process, Apple has adopted a strategy of combining human evaluation with automated evaluation.
Let's start with human evaluation, where evaluators design multiple types of questions covering analytical reasoning, brainstorming, chatbots, etc., and let the model generate accordingly.
At the same time, questions are asked to the other models used for comparison, and the evaluator then judges which model has better output.
As a result, both the cloud-side and device-side models have at least a 60% probability of not losing to Llama 3, GPT-4 and other comparison models.
The rest of the tests are mainly implemented using datasets.
In terms of instruction compliance ability, Apple conducted the IFEval test, and the results showed that the cloud-side AFM surpassed GPT-4 at both the instruction and prompt levels and became the new SOTA.
The performance of the end-side model also exceeds that of similar-scale models such as Llama 3-8B and Mistral-7B.
In AlpacaEval, both the end-side and cloud-side AFMs achieved second place.
Looking at the performance of specific tasks, AFM achieved SOTA in the summary task in the writing benchmark, and it was close to the first place in the writing task.
Mathematically, Apple used two datasets, GSM8K and MATH, to evaluate.
结果端侧模型在GSM8K上不敌Llama 3-8B和微软的Phi 3 mini,云侧被GPT-4和Llama 3-70B超越,但优于GPT-3.5。
The results on MATH are relatively high, with the device-side version leading the model of the same scale, and the cloud-side version also surpassing the Llama 3-70B.
In addition to performance, security is also important, and Apple has manually evaluated AFM's ability to withstand adversarial attacks.
The results show that the violation rate of AFM in the face of adversarial prompts is significantly lower than that of other open source and commercial models.
The above are some of the contents worth paying attention to in the Apple large model technical report, and more details can be found in the original report.
One More Thing
While Apple Intelligence has been made available to developers for testing, Bloomberg broke the news that the official version may be delayed.
Indeed, according to Apple's previous version release rules, the version number of 18.1 also means that these features will not be launched with the release of the new machine in September.
In response, analyst Gene Munster suggested that Apple should consider postponing the iPhone 16 release date to align with Apple Intelligence.
It remains to be seen whether Cook will consider this suggestion.
Report Address:
https://machinelearning.apple.com/research/apple-intelligence-foundation-language-models
Reference Links:
[1]https://x.com/reach_vb/status/1818014366555586611
[2]https://www.cnbc.com/2024/07/29/apple-releases-apple-intelligence-its-long-awaited-ai-features.html
[3]https://www.tomsguide.com/phones/iphones/ios-181-developer-beta-is-live-with-apple-intelligence-heres-all-the-new-iphone-ai-features
[4]https://www.businessinsider.com/apple-intelligence-delay-wont-hurt-new-iphone-sales-analysts-2024-7
— END —
QubitAI · 头条号签约
Follow us and be the first to know about cutting-edge technology trends