What is "AI" Anyways?
I will admit that I don’t like “AI” as a term because I think it is inaccurate. It’s a nice short-hand, and in some ways has more familiarity than, say, Machine Learning or ML. The reason I don’t call it Artificial Intelligence (the artificial part is right, IMHO…) is that the “wizard” behind the curtain is just a huge pile of numbers that cannot do anything on its own, an inert file that just sits there until something else acts on it.
What, then, is going on “behind the curtain” with Large Language Models (or LLMS)? It’s interesting because there actually isn’t that much code involved. Granted, much of the code these days is “hidden” by the use of libraries that handle turning a prompt, like “if you as a Machine Learning model could improve yourself, what would you add?”, into a response. Try that one, by the way, it can be fun and useful! For instance, you can use prompts like that to get usable “tools” that do the things LLMs aren’t really meant to do, like get the current time and date (and get it right for your location!).
An example of that process is here:
https://claude.ai/share/d7f82a61-284e-40ab-99a5-eb6d593ce1a1
Anyways, if you look at various scripts related to creating and running LLMs you’ll find that the code is relatively short.
There are two main “sides” to Machine Learning. The first is training. This is the process that a fresh new model goes through to go from giant random data generator to putting together a reasonable response to “what is the best way to cook chicken if I only have 30 minutes before guests arrive”. Most of the work in that process involves some very fancy “curve fitting”, and it’s mostly fancy because of the scale involved — billions of parameters and often trillions of training examples/data. As the big pile of numbers (ML models are, at the end of the day, a bunch of numbers in a file) is “molded” into shape by repeatedly failing at the process of, say, guessing the next word, they learn over time through failure to get better at it. And then, after a few million computer-hours of time going through that out pops Claude, ChatGPT, and so on. If only someone paid us billions of dollars to fail millions of times at starting businesses…
The second side that we deal with, “inference”, is where the “magic” happens and all that computation (sometimes) pays off. We ask/prompt an ML model to give us something, and it does its very statistical best to do that, by guessing the next word, iteratively removing noise to reveal an image or a frame of video, and so on. That process is also very light in terms of code, these days if you are working with libraries you can implement inference in approximately 30 lines of Python, if that, and most of it is setting things up to run the model and process your prompt.
Thus when we talk about ChatGPT, Claude, and all the rest remember that they are just very large (often a Terabyte or more in size for the marquee ML models) collections of numbers. Those numbers are arranged into very-scary-sounding things called “tensors”, or multi-dimensional matrices. Think of an Excel spreadsheet as a two-dimensional matrix. A “tensor” is that but with three or more dimensions. And that’s it. A collection of numbers, a few lines of code, and a mountain of relatively simple repetitive math is all there is to it!
There is a whole lot of FUD about “AI”, and I can understand why — serious money is involved. I think it is important that we understand what, exactly, is being sold and what it really is. Those piles of numbers can do some impressive things, I’ve used them to help me create my business and bring my vision to life. However, at the end of the day they are inert inanimate numbers that, through massive amounts of failure, are fairly decent at mimicking human outputs. If they can do that, consider how remarkable it is that we don’t have to fail millions of times in order to come up with a coherent response to “how much wood could a woodchuck chuck if a woodchuck could chuck wood”.