The architecture of today's small and large language models, which provides the source of learned knowledge that chatbots such as ChatGPT, Gemini and Claude use to generate answers.
Essentially a "pattern recognition" system, a neural network is technically an "artificial" neural network (ANN) because it is only loosely based on the human nervous system and by no means an exact replica. Hypothesized in the 1940s, there were elementary neural networks as far back as the 1950s.
The neural network is used in image, language and speech recognition, text-to-speech conversion, robotics, diagnosing, forecasting and generative AI. Unlike regular applications that are programmed for precise results (if-then-else), large language models are "trained" on millions and billions of words and images, and the answers generated for users are provided by "inference" processing (see
inference). See
AI secret sauce,
AI programming,
AI training,
AI model and
generative AI.
Servers and GPUs
Data centers can have thousands of servers. The more servers, the larger the neural network, the larger the language model and the more comprehensive the training. Desktop and mobile devices run the chatbots that communicate with the models in the data center, and desktop and laptop computers may be also used to train small models; for example, see
DGX Spark.
Data center servers have a number of GPUs, each with its own processor and memory; for example, an NVIDIA H100 contains eight GPUs (see
H100). In a large data center, even with tens of thousands of servers, it can take months to train huge language models. To support the neural networks of ever-larger models as well as reduce training time from months to days, it is estimated that a million or more GPUs may be required. See
GPU and
AI training vs. inference.
Layers and Nodes
A neural network is a "math machine" that learns from examples. It comprises multiple layers of computational units called "nodes" or "neurons" that are mathematically connected to each other (see diagrams below). There is an input layer, an output layer and any number of "hidden" layers in between.
A Single Neuron/Node
A neuron, or "node," is a mathematical processing unit within the neural network, and a single GPU processes many neurons simultaneously. The activation function determines if the value leaving the neuron should be altered. The weights and bias values are modified in the training passes when predictions are compared against the correct answers. If this all sounds very strange... it is! See
AI weights and biases.
Tracing a Neuron
The neural network is a pattern detection system. The text in sentences (word, part of a word, etc.) is turned into a token that is converted into an "embedding," which is a one-dimensional array of numbers known as a "vector." Each layer transforms the embeddings mathematically by looking at the tokens in the sentence and making the embeddings more meaningful. The last layer predicts the next token.
Training models means constantly predicting what comes next and evaluating that prediction for accuracy (see
AI training passes). Essentially, AI companies have taken all the information ever published and turned it into a gigantic maze of numbers! See
AI secret sauce and
copyright infringement.
A Tiny Network
This neural network example has only 17 neurons/nodes in three hidden layers and might be used for limited pattern recognition in a small sensor.
A Larger Network
This neural network example has 8,192 neurons/nodes in eight hidden layers for a total of 65 thousand nodes and 4.3 billion connections that are adjusted in the training stages. Now imagine a neural network with 500 billion nodes and you can begin to visualize the complexity of large AI models.
There Are Many Network Designs
The following diagrams from the Asimov Institute in the Netherlands reveal the variety of neural network architectures. Only a few layers are shown in each example; however, there can be hundreds or thousands of layers depending on the network type. For the type of neural network that is easier to grasp, see
convolutional neural network.
Neural Network Architectures
Network designs are one of the most researched areas of AI in the 21st century. The examples above are only a small sample. (Images courtesy of Fjodor van Veen and Stefan Leijnen (2019). The Neural Network Zoo.)