Artificial Intelligence

Tariq Ali
11 min readOct 23, 2023

Language Models

The current AI hype is all around Language Models, which in very simplistic terms, are word and sentence prediction engines, or programs. That is what ChatGPT, Pi, Bard, Claude and other AI Chat Bots are essentially doing using very complex and sophisticated algorithms, fancy math.

It is a program that has learned from tons of text written by people, like books, articles, and conversations. It uses all that knowledge to predict what words or sentences should come next when you give it some text. So, when you type or say something to it, it can generate a response that sounds like it came from a real person, even though it’s just a computer doing its best to understand and communicate with you.

Conventional software is created by human programmers, who give computers explicit, step-by-step instructions, by contrast, ChatGPT is built on a neural network that was trained using billions of words of ordinary language.

As a result, no one fully understands the inner workings of LLMs (Large Language Models — See definition below). Researchers are working to gain a better understanding, but this is a slow process that will take many years to complete.

Some preliminary definitions to get us all on the same page:

AI: Artificial Intelligence is an entity that performs behaviors that a person might reasonably call intelligent if a human were to do something similar, like problem-solving, learning from experience, understanding natural language, recognizing patterns, and making decisions.
AI is all about making computers and machines “smart” in a way that they can think and act like humans to some extent. It involves teaching computers to learn from data, adapt to new information, and perform tasks that would normally need human intelligence, such as playing chess, recognizing faces in photos, or even understanding and responding to text or speech.

Machine Learning: Machine learning is a subset of artificial intelligence (AI) that focuses on teaching computers to learn from data and make decisions or predictions without being explicitly programmed for each task. In essence, it’s a way to make computers improve their performance on a task by learning from experience.
For example, imagine you have a computer program that can recognize different types of fruit. Instead of telling the program explicitly how to recognize each fruit, you show it lots of pictures of various fruits and let it figure out the differences on its own. Over time, the program becomes better at distinguishing apples from oranges or bananas from grapes because it learns from the patterns and features it sees in the pictures.

Deep Learning: Deep learning is a specialized area within machine learning that focuses on using artificial neural networks to solve complex problems.
For example, recognizing objects in photos. In deep learning, you would use a deep neural network, which is like a computer program designed to mimic the structure and function of the human brain. This network consists of layers of interconnected nodes, or “neurons,” and each layer processes the data in a progressively more abstract and meaningful manner.
The first layer might detect simple features like edges or colors, while deeper layers can recognize more complex patterns like shapes or object parts. By passing data through these multiple layers, deep learning models can learn to represent and understand data in a highly sophisticated way.

AGI: Artificial General Intelligence is a type of artificial intelligence that possesses human-like intelligence and the ability to understand, learn, and apply knowledge across a wide range of tasks and domains, much like a human being.
In simpler terms, AGI represents the idea of creating machines or software that can think and learn in a way that’s not limited to a specific task or domain. While most AI systems today are designed for narrow, specific purposes (Artificial Narrow Intelligence — ANI), AGI would have the capability to adapt to new situations, understand various types of information, and perform tasks across different domains with a high level of general intelligence.
Think of AGI as the Holy Grail of artificial intelligence, where machines can exhibit a level of intelligence and versatility comparable to human beings. Achieving AGI is a significant challenge in the field of AI, and it’s a goal that researchers and scientists are actively working towards. Once achieved, AGI could potentially revolutionize various industries and have a profound impact on society.
It is important not to confuse linguistic fluency with intelligence.
It is sometimes argued that anything that could count as an AGI must be conscious, have agency, and experience subjective perceptions or feel feelings.

LLM: A Large Language Model (LLM) is a type of artificial intelligence model designed to understand and generate human language. What sets large language models apart is their vast size and complexity. These models are typically created by training on enormous amounts of text data from the internet and other sources.
These models work by using complex mathematical algorithms and neural network architectures (Deep Learning) to process and analyze language data. The “large” part refers to the immense number of parameters (variables that the model uses to make predictions) and the extensive training data they have been exposed to. The larger the model, the more powerful it tends to be in terms of language understanding and generation capabilities.

GPT: “GPT” stands for “Generative Pre-trained Transformer,” and it refers to a type of large language model used in the field of natural language processing (NLP). GPT models are designed to understand and generate human language.

Here’s a breakdown of what GPT stands for:

1. Generative: This indicates that GPT models have the ability to generate text or language. They can produce coherent and contextually relevant sentences, paragraphs, or even longer pieces of text.

2. Pre-trained: GPT models are pre-trained on a massive amount of text data from the internet and other sources. This initial training helps them learn grammar, vocabulary, and a wide range of language patterns.

3. Transformer: The term “Transformer” refers to the neural network (Deep Learning) architecture used in GPT models. Transformers are known for their effectiveness in processing sequential data, making them well-suited for NLP tasks.
You can think of it as a series of layers. Each layer of the model synthesizes some data from the input. Each layer of the transformer gets “smarter” and better at grasping the sentence’s meaning and nuances. The first few layers tend to focus on understanding a sentence’s syntax and resolving any ambiguities. Then, later layers tackle a more holistic understanding of a passage’s meaning. GPT-3 has 96 layers.
Within the transformer are functions that encode (encoder) and decode (decoder), which in simplistic terms compress and decompress data, since storing and referencing all of the text from various sources all over the Internet would become rapidly inefficient.

GenAI: Generative artificial intelligence is a type of artificial intelligence that can create new data, such as: Text, Images, Videos, Audio, 3D models, Code.
GenAI models learn patterns from existing data and then generate new data that has similar characteristics. They can transform data between multiple modalities, including text, images, video, and audio.
GenAI allows users to input a variety of prompts to generate new content. It “learns” and is trained on documents and artifacts that already exist online.

GPT and LLM

GPT models, such as GPT-3, GPT-4, and so on, have become some of the most prominent and powerful language models in AI. They are used for various applications, including text generation, translation, summarization, chatbots, and more. GPT-3, for example, has 175 billion parameters, making it one of the largest and most capable language models available. The model was trained on about 500 billion words. By comparison, a human child has absorbed about 100 million words by age 10. So that’s a 5,000x multiple on the language digested by a 10-year-old.

There is no official number of parameters for GPT-4, but some analysts mention anywhere between 1 and 2 trillion parameters. These models have shown remarkable language understanding and generation abilities, making them valuable tools in the field of AI and NLP (Natural Language Processing).

Creating and training large language models requires significant computational resources and data, and it’s an active area of research in the field of artificial intelligence.

Large language models, including ChatGPT, GPT-4, and others, do exactly one thing: they take in a bunch of words and try to guess what word should come next.

ChatGPT and similar can do a lot of things seemingly very well: write poetry, answer questions about science and technology, summarize documents, draft emails, and even write code.

LLMs have analyzed billions of conversations on just about every topic. An LLM can produce words that look like it is having a conversation with you. It has seen billions of poems and music lyrics on just about everything conceivable, so it can produce text that looks like poetry. It has seen billions of homework assignments and their solutions, so it can make reasonable guesses about your homework even if slightly different. It has seen billions of standardized test questions and their answers. It has seen people talk about their vacation plans, so it can guess words that look like vacation plans. It has seen billions of examples of code doing all sorts of things. It has seen billions of examples of wrong code and their corrections on stackoverflow.com. It can take in your broken code and suggest fixes. It has seen billions of people tweet that they touched a hot stove and burned their fingers, LLMs have learned some common sense. It has read a lot of scientific papers, so it can guess well-known scientific facts. It has seen billions of examples of people summarizing, rewriting text into bullet points, describing how to make text more grammatical or concise or persuasive.

When you ask ChatGPT or another Large Language Model to do something, there is a really good chance that you have asked it to do something that it has seen billions of examples of. A LLM can mix and match bits and pieces to assemble a reasonable sounding response.

Resources

When comparing the amount of resources required for AI (computing, electricity, data, etc.) to the human brain, and the human body (sight, hearing, language, DNA, etc.), it’s really remarkable what we as a species are capable of, and really highlights the majesty and power of the creator, and how far off we are from even coming close to these capabilities with such a small and efficient package.

When we examine the complexities of the human body, the minute details in our own sophisticated design, it would give a person pause and realize that creating an AI at the level of human seems far fetched.

Our ability to process language through sound, sight, and even touch, it’s amazing when you think about it, and while you think about it, think about how amazing our ability to think is. Our ability to feel pain, physical and emotional, can that be understood by AI? It becomes a never ending cycle of complexity and sophistication, something we can begin appreciate in our own design. Our ability to share our knowledge and history by recording it, mostly through writing, but also through sound and video, there is no other species capable of this. LLMs wouldn’t exist without this pre-exiting human knowledge.

The Future of AI

A human desire to believe in consciousness in machines has never matched up with reality, as a person of faith, I can’t believe that true consciousness can be created, it is an ability only available to the One True Creator of everything.

To claim that nonbiological systems simply can’t be intelligent, because they are “just algorithms,” for example, seems arbitrary. It’s likely better to separate “intelligence” from “consciousness” or “sentience” or “agency”.

Creating consciousness in artificial intelligence systems is a dream for many technologists. Large language models are the latest example of our quest for clever machines, and some people (contentiously) claim to have seen glimmers of consciousness in conversations with them.

AI systems don’t have brains, so it’s impossible to use traditional methods of measuring brain activity for signs of life. It is important not to confuse linguistic fluency with intelligence.

Language

We currently have google translate and other products capable of helping humans understand other languages, but imagine an AI trained on several LLMs of different languages, the ability of an AI to make connections and instantly translate, creating an ultimate Rosetta Stone, allowing for all received communications to be translated in relative real time, and imagine a device that could do this using only sound (voice). The likes of Star Treks Universal Translator, rather than translating the language into text, they were able to directly translate whatever was being spoken, in the speaker’s own voice, we’re actually seeing this now on some platforms doing video translations. Who knows, maybe one day we’ll be able to translate and understand what animals are saying.

Sound

We’ve seen AI create new music, new lyrics, new sound, using existing music, AI is just at the beginning of getting a voice, producing it’s own sounds and language.

Images

Image recognition has been one of the most difficult tasks for AI. If we take a look at the complexity of our eyes, and how quickly our brain is able to process images, it’s makes you appreciate how we were built. Now we’re at the point where we can describe an image and AI can create something entirely new, the image at the top of this article was created using Bing Image Creator.

All of these advancements are leading to deep fakes, where AI has the ability to fake the image, likeness (video and pictures), and voice (sound) of people, it will only get more advanced as time moves forward.

Interactive AI

For the near future we’ll likely see more advancements and use of AI in ways we couldn’t imagine. Interactive AI would allow the integration and automation of AI functions across disparate technologies, think of home automation with an AI like J.A.R.V.I.S. (Just A Rather Very Intelligent System) from the movie Iron Man, where the home would become intelligent enough for it to interact with you, to have conversations with you, there could eventually be a JARVIS type AI in our cars, not only interacting with us, but driving for us completely autonomously. We already have Alexa and Siri, just inject some AI into those and let’s see what happens.

Creative use of AI to aid in new discoveries, to enhance fields such as medicine, psychology, education, technology, among others will help move humanity forward in ways that weren’t possible just a few years ago.

The mixing of robotics and AI may usher in a new wave of technologies designed to make life easier for humanity, to increase productivity, and to pass on mundane tasks that are better suited for machines that don’t tire.

When the world of bioscience and AI combine to create something new, that will be something truly remarkable, an organic living AI would take humanity to another level. Imagine injecting some kind of biological AI into animals, giving them the capability of communicating with us directly, scary, but so intriguing at the same time, I mean we don’t want a Planet of Apes situation unfolding.

We live in very exciting times, and as exciting as these developments are, there are also risks, we need to be aware of those and take precaution, but at the same time we shouldn’t limit progress, as fear of the future will only delay what will eventually happen.

Islamic Resources for AI

ChatGPT is mostly a general intelligence model. There are some really helpful LLMs that are trained on specific texts, and if you’re interested in exploring LLMs that have been trained on Islamic texts (Quran, Hadith, Islamic Scholars, etc.) take a look at a couple of these:

--

--

Living in Fremont, California USA with his wife and two kids. A Director level IT Professional by trade.