Table of Contents
Cook Reveals Cook
Home Technology peripherals AI Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni

Sep 20, 2023 pm 01:05 PM
ai Research

Enthusiasts have revealed the "secret" of Apple's Transformer

Under the influence of the wave of large models, even conservative Apple will definitely mention "Transformer" at every press conference

For example, at this year’s WWDC, Apple announced that new versions of iOS and macOS will have a built-in Transformer language model to provide an input method with text prediction capabilities.

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni

Although Apple officials did not reveal more information, technology enthusiasts can’t wait

A guy named Jack Cook successfully translated Opened a new chapter of macOS Sonoma beta, and unexpectedly discovered a lot of new information

  • In terms of model architecture, Brother Cook believes that Apple’s language model is more based on GPT-2built.
  • In terms of tokenizer , emoticons are very prominent among them.
For more details, let’s take a look.

Based on GPT-2 architecture

First of all, let us review the functions that Apple’s Transformer-based language model can achieve on iPhone, MacBook and other devices

Need to be rewritten The content is: mainly reflected in the input method. With the support of the language model, Apple's own input method can achieve word prediction and error correction functions

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni

Jack Cook tested it in detail and found that this function mainly What is achieved is prediction for a single word.

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni
The content that needs to be rewritten is: △Source: Jack Cook’s blog post
The model also sometimes predicts multiple upcoming words, but this It is limited to situations where the sentence semantics are very obvious, and is more similar to the auto-complete function in Gmail.

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni
The content that needs to be rewritten is: △Source: Jack Cook’s blog post
So where is this model installed? After some in-depth digging, Brother Cook determined:

I found the predictive text model in /System/Library/LinguisticData/RequiredAssets_en.bundle/AssetData/en.lm/unilm.bundle.

The reason is:

    Many files in unilm.bundle do not exist in macOS Ventura (13.5) and only appear in the new version of macOS Sonoma beta (14.0).
  1. There is a sp.dat file in unilm.bundle, which can be found in Ventura and Sonoma beta, but the Sonoma beta version has been updated with a set of tokens that obviously look like a tokenizer.
  2. The number of tokens in sp.dat can match the two files in unilm.bundle - unilm_joint_cpu.espresso.shape and unilm_joint_ane.espresso.shape. These two files describe the shape of each layer in the Espresso/CoreML model.
Further speculation, based on the network structure described in unilm_joint_cpu, I believe that the Apple model is built based on the GPT-2 architecture

The main components include token embedding and position encoding , decoder block and output layer, words similar to "gpt2_transformer_layer_3d" will appear in each decoder block

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni
The content that needs to be rewritten is: △Source: Jack Cook's blog post

Based on the size of each layer, I also speculated that the Apple model has about 34 million parameters and the hidden layer size is 512. In other words, it is smaller than the smallest version of GPT-2

I believe this is mainly because Apple wants a model that is not too power-consuming, but can run quickly and frequently at the same time.

And Apple’s official statement at WWDC is, “Every time a key is clicked, the iPhone will run the model once.”

However, this also means that this text prediction model cannot well continue sentences or paragraphs

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni
The content that needs to be rewritten is: △Source: In addition to Jack Cook's blog post

Model architecture, Brother Cook also dug up relevant information about the tokenizer

(tokenizer).

He found a set of 15,000 tokens in unilm.bundle/sp.dat. It is worth noting that it contains 100 emoji.

Cook Reveals Cook

Although this Cook is not that Cook, my blog post still attracted a lot of attention as soon as it was published

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni

Based on his findings, netizens enthusiastically discussed Apple’s approach to balancing user experience and cutting-edge technology applications.

Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni

Back to Jack Cook himself, he graduated from MIT with a bachelor's degree and a master's degree in computer science, and is currently studying for a master's degree in Internet social sciences from Oxford University.

He previously interned at NVIDIA, focusing on researching language models such as BERT. He also serves as a senior R&D engineer for natural language processing at The New York Times

The above is the detailed content of Hidden robot in iPhone: Based on GPT-2 architecture, with emoji tokenizer, developed by MIT alumni. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to check CentOS HDFS configuration How to check CentOS HDFS configuration Apr 14, 2025 pm 07:21 PM

Complete Guide to Checking HDFS Configuration in CentOS Systems This article will guide you how to effectively check the configuration and running status of HDFS on CentOS systems. The following steps will help you fully understand the setup and operation of HDFS. Verify Hadoop environment variable: First, make sure the Hadoop environment variable is set correctly. In the terminal, execute the following command to verify that Hadoop is installed and configured correctly: hadoopversion Check HDFS configuration file: The core configuration file of HDFS is located in the /etc/hadoop/conf/ directory, where core-site.xml and hdfs-site.xml are crucial. use

Centos shutdown command line Centos shutdown command line Apr 14, 2025 pm 09:12 PM

The CentOS shutdown command is shutdown, and the syntax is shutdown [Options] Time [Information]. Options include: -h Stop the system immediately; -P Turn off the power after shutdown; -r restart; -t Waiting time. Times can be specified as immediate (now), minutes ( minutes), or a specific time (hh:mm). Added information can be displayed in system messages.

What are the backup methods for GitLab on CentOS What are the backup methods for GitLab on CentOS Apr 14, 2025 pm 05:33 PM

Backup and Recovery Policy of GitLab under CentOS System In order to ensure data security and recoverability, GitLab on CentOS provides a variety of backup methods. This article will introduce several common backup methods, configuration parameters and recovery processes in detail to help you establish a complete GitLab backup and recovery strategy. 1. Manual backup Use the gitlab-rakegitlab:backup:create command to execute manual backup. This command backs up key information such as GitLab repository, database, users, user groups, keys, and permissions. The default backup file is stored in the /var/opt/gitlab/backups directory. You can modify /etc/gitlab

Centos install mysql Centos install mysql Apr 14, 2025 pm 08:09 PM

Installing MySQL on CentOS involves the following steps: Adding the appropriate MySQL yum source. Execute the yum install mysql-server command to install the MySQL server. Use the mysql_secure_installation command to make security settings, such as setting the root user password. Customize the MySQL configuration file as needed. Tune MySQL parameters and optimize databases for performance.

How to view GitLab logs under CentOS How to view GitLab logs under CentOS Apr 14, 2025 pm 06:18 PM

A complete guide to viewing GitLab logs under CentOS system This article will guide you how to view various GitLab logs in CentOS system, including main logs, exception logs, and other related logs. Please note that the log file path may vary depending on the GitLab version and installation method. If the following path does not exist, please check the GitLab installation directory and configuration files. 1. View the main GitLab log Use the following command to view the main log file of the GitLabRails application: Command: sudocat/var/log/gitlab/gitlab-rails/production.log This command will display product

How to operate distributed training of PyTorch on CentOS How to operate distributed training of PyTorch on CentOS Apr 14, 2025 pm 06:36 PM

PyTorch distributed training on CentOS system requires the following steps: PyTorch installation: The premise is that Python and pip are installed in CentOS system. Depending on your CUDA version, get the appropriate installation command from the PyTorch official website. For CPU-only training, you can use the following command: pipinstalltorchtorchvisiontorchaudio If you need GPU support, make sure that the corresponding version of CUDA and cuDNN are installed and use the corresponding PyTorch version for installation. Distributed environment configuration: Distributed training usually requires multiple machines or single-machine multiple GPUs. Place

Detailed explanation of docker principle Detailed explanation of docker principle Apr 14, 2025 pm 11:57 PM

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

How is the GPU support for PyTorch on CentOS How is the GPU support for PyTorch on CentOS Apr 14, 2025 pm 06:48 PM

Enable PyTorch GPU acceleration on CentOS system requires the installation of CUDA, cuDNN and GPU versions of PyTorch. The following steps will guide you through the process: CUDA and cuDNN installation determine CUDA version compatibility: Use the nvidia-smi command to view the CUDA version supported by your NVIDIA graphics card. For example, your MX450 graphics card may support CUDA11.1 or higher. Download and install CUDAToolkit: Visit the official website of NVIDIACUDAToolkit and download and install the corresponding version according to the highest CUDA version supported by your graphics card. Install cuDNN library:

See all articles