Excel can now help you understand AI better. For some, artificial intelligence is still a big question mark. While it’s clear what these tools can do, how they work is often a mystery.
To make AI more understandable, Ishan Anand, VP of Product at Edgio, started a special project. With “Spreadsheets are all you need,” you can understand AI using a large Excel spreadsheet.
Anand has transferred the basic functions of GPT-2, a predecessor of ChatGPT-4, into an Excel spreadsheet. You can download the spreadsheet from his website. The file is significantly larger than average Excel spreadsheets at 1.25 gigabytes, containing 124 million AI parameters in one table.
The Excel spreadsheet has several pages, including a page for prompts and many pages with data. These give you insight into GPT’s processing steps:
- Tokenization
- Text & Position Embeddings
- Multi-head Attention
- Multilayer Perceptron
- Language Head
When you enter a prompt on the “Type Prompt Here” page, the Excel spreadsheet converts it into tokens. Each word is assigned one or more tokens to identify it precisely. Anand uses “Mike is quick. He moves” as an example to give the AI the task of completing the second sentence based on the given information.
In the next step, the Excel AI finds the “Text & Position Embeddings” for the tokens. Each token has a corresponding list of 768 numbers reflecting its meaning. The AI also maintains a list of word positions in the prompt. If words appear twice, they get different embedding codes.
The AI then searches for connections within the sentence in the “Multi-head Attention” step. Based on the codes, the AI recognizes that “He” refers to “Mike” and “moves” relates to “quick.”
In the “Multilayer Perceptron” step, the tool determines the meaning of the words. The English word “quick” could mean “clever” or “lively,” but in context with “moves,” it best suits a fast physical movement.
The AI searches for words like “fast,” “quickly,” and “around” from its database to fill the gap meaningfully. The “Attention” and “Perceptron” steps occur multiple times to increase the likelihood of the answer.
Finally, the “Language Head” selects the word to complete the phrase. The AI chooses from the word pool created in the previous step. In most cases, the AI selects the answer most likely based on the data, but other answers may also be suggested. In the example, the AI initially suggests “quickly.”
The Excel spreadsheet mainly illustrates AI. You won’t find a real chatbot that provides answers to questions here. This is because programs like ChatGPT still need human feedback to optimize machine learning models.
The project initially started in a Google Sheets table. However, the model quickly became too large for the program with 124 million parameters, leading Anand to switch to Microsoft Excel.