Home Ideas Someone Got GPT2 Running Entirely in a Spreadsheet

Someone Got GPT2 Running Entirely in a Spreadsheet

11
someone got gpt2 running entirely in a spreadsheet

AI companies present their products as magical, but it’s all just code and math under the hood. Don’t believe me? Someone got an AI model working in an Excel spreadsheet. Spreadsheets are all you need is a project by Ishan Anand that re-creates a GPT2, a precursor to the technology that powers ChatGPT, entirely in a single Excel spreadsheet. This is the AI equivalent to getting Doom running on an old smart fridge.

The file, predictably, is a massive 1.34 GB, and it won’t load on the Mac or web version of Excel—you’re going to need Windows to get this working, ideally with a decent processor. And you can’t expect to use it the way you would chat-based large language models. This, obviously, isn’t going to replace ChatGPT, and it’s not supposed to. It’s mostly just a great way to learn how large language models work.

You can get started by downloading the spreadsheet from Github. You add your prompt to the spreadsheet’s second sheet. The prompt needs to be entered one word per cell, with any spaces added manually at the beginning of words and each bit of punctuation mark using up its own line.

The spreadsheet will produce a single word—the next word in your sentence. It’s a good idea to stick to a simple sentence that you’d like the spreadsheet to add a word to. I went with “My cat is so—.” After you’ve entered your prompt, you click Calculate Now in the Formulas tab to start the crunching. Eventually the spreadsheet will output the next word for you (in my case, “cute,” which is accurate.)

The real fun, though, is that you can now explore all of the other sheets and see the exact math that was used to guess what the next word should be. I am not going to attempt to break this down—it’s well outside my wheelhouse—but there are video lessons on the website that do a great job of explaining the math and how the spreadsheet does it all. It’s hard to think of a more accessible way to see how large language models work.

Source: LifeHacker.com