Machine Learning
Shaistha Fatima
March 27, 2024
min read

Foundational Models: An Essential Guide to Begin With

Shaistha Fatima
March 27, 2024

The recent advancements in artificial intelligence have led to countless useful functionalities that AI systems are capable of today. Generating immersive images from text descriptions, holding realistic conversations with people, and many more capabilities emerge from AI systems. These capabilities are made possible through the use of foundational models.

Foundational models are the wireframes over which complex AI systems can be built as required, designed to a specific or an umbrella of purposes. Consider foundational models as independent AI models that can perform a variety of generic tasks but can also be trained to achieve targeted results through specific training.

Similarly, foundational models enable the development of complex AI functions that learn from one set of data and apply the learning to a variety of other tasks.

This blog is designed to help you understand foundational models a little better.

Understanding Foundational Models

Foundational models are basically large-scale AI models that are trained on copious amounts of data that are unlabelled. These models typically learn through self-supervision, enabling them to become highly generalized and customizable into a variety of tasks.

Some examples of the tasks that foundational models can tackle off the bat are image processing, language processing, and even answering questions.

The accuracy of foundational models is surprisingly high, owing to the large amounts of data that they learn from. While foundational models do perform exceptionally well at human-assisted tasks, there may be some challenges along the way when using them for enterprise-level use cases.

This typically is true when enterprise tasks require specific capabilities that are out of scope for generalized models. It may return dubious results that may seem accurate at first glance though being completely fabricated through deficiencies and gaps in model capabilities.

Data scientists can actually leverage foundational models to build specific and task-oriented AI systems on top of them by tweaking and finetuning the capabilities. This exercise has the potential of opening up a vast avenue of functionalities that enterprises can capitalize on with just the fundamental kits.

The working of foundational models itself is simple to understand. The models leverage the patterns and relationships learned through input data to predict the next item or string of responses that come in the sequence.

A user-initiated “prompt” triggers a seed vector, which then acts as a cue for the AI systems to start generating an output.

Understanding Foundational Models

Key Foundational Models

Five key foundational models provide a wide range of capabilities and functionality for developing more complex AI systems on top of them.


BERT, or Bidirectional Encoder Representations from Transformers (BERT), is one of the first foundation models. It was trained with 3.3 billion tokens and 340 million parameters using plain text. It is bidirectional and can analyze the context of a sequence to make a prediction.

Bidirectional models are special because they can read text from right to left and left to right, all at once, in contrast to unidirectional models. This property gives BERT the robust capability to understand the context implied through dialogue or paragraphs, as it can analyze the surrounding text as well as derive insight. This is possible in BERT because it is based on the transformer model.

The BERT foundation model has been pre-trained on Masked Language Modelling (MLM) and Next Sentence Prediction (NSP) using bidirectional capabilities.

2. GPT

GPT, also known as Generative Pre-trained Transformer (GPT), is one of the most popular generative AI foundation models. It was trained using the BookCorpus dataset. Its successor, GPT-2, was trained on 1.5 billion parameters. The recent GPT-3 was trained on a whopping 500 billion word dataset of Common Crawl. The popular chatbot known as ChatGPT is based on GPT3.5.

The most recent version of GPT is the GPT-4, released in 2022. 

The GPT models form the basis of their own, more task-specific versions of GPT systems, which include the ChatGPT chatbot product. In fact, several other foundation models use GPT as the first base, for example, EleutherAI and several others developed by Cerebras.

One popular example of GPT foundation models used by a big-name company is EinsteinGPT, developed by Salesforce.

3. Amazon Titan

Amazon Titan foundation models are already pre-trained on large datasets, which makes them a robust framework for general purposes. It is possible to finetune these models towards specific tasks without having to annotate large volumes of data.

To begin with, Titan offers two types of foundation models:

a) Generative Large Language Model:

This model is best suited for tasks like text generation, summarization, open-ended Q&A, etc.

b) Embeddings LLM:

This model is best suited for tasks like translations.

You cannot use Amazon Titan for text generation. However, this model will perform exceptionally on tasks like personalization and search. This is because the Embeddings LLM helps it polish its recommendations better than word-matching algorithms.

The best part of Titan is that it can remove inappropriate user input and filter its outputs to promote ethical and unbiased use.

4. Stable Diffusion

If you have ever used popular AI-powered software that generates images from a text-based description, you have seen text-to-image-based foundation models in action.

Stable Diffusion is one such foundation model capable of generating high-definition and realistic images from text-based descriptions.

This model is based on diffusion models that apply denoising and noising techniques to create images. The best part about Stable Diffusion is that it isn’t as extensive as other similar foundation models (like DALL-E 2), making it friendly for use on normal graphics cards or even smartphones.

Exploring Advanced Techniques in Foundational Models

The accuracy and capabilities of AI and ML models are continuously improving and expanding. The foundational models are also experiencing advancements in order to create downstream functions that can be better molded to specific and targeted purposes. These advanced techniques can be attributed to chiefly three key verticals:

1. Technical Advances

Modern foundation models build on delivering higher processing speeds and accuracy by means of leveraging more streamlined ways of data selection and optimization. By optimizing domain weights and applying diagonal approximation, the speed of the entire process can be enhanced.

Additionally, techniques like Direct Preference Optimization enable training AI models against pairwise preference data during alignment.

2. Application Advancements

Foundation model techniques now have the potential to be applied to various industries like law, healthcare, and robotics. The advancements are exploring the applicability of foundation models to:

  • Legal reasoning in law
  • Data augmentation and teaching tools in healthcare
  • Household robotics with a view to enhancing the users’ daily lives

3. Social Responsibility Advancements

This aspect of advancement includes societal implications of foundation models concerning factors like copyrights, privacy, watermarking, evaluation, and transparency. It is essential to incorporate user safety and creator interests at the core of creating AI systems using foundation models.

Challenges and Considerations in Foundational Models

Foundation models are thoroughly capable but also highly generalized. They are developed by training the AI wireframe with large-scale data that is unlabelled. As such, there are bound to be a few teething troubles that occur when using them to develop highly purpose-oriented AI systems. Three of the major challenges that thus occur are:

1. Data Quality and Availability

Foundation models need to be trained with large-scale data that is not just diverse but curated as well. As such, one of the major challenges is foundational model data quality and availability.

You may come across copyrights or privacy concerns in acquiring these datasets for model training. Additionally, the collection, cleaning, and organization of this data can be challenging.

2. Overfitting and Underfitting

Overfitting and underfitting are part of the same spectrum of challenges but at extreme ends. Overfitting occurs when a trained foundation model performs accurately on training data but fails with new data (generalization). Underfitting occurs when the model is unable to determine a functional or useful relationship between the input and the output (bias).

3. Interpretability and Explainability

Achieving foundational model interpretability and explainability in foundation models can be a challenge simply because of the scale of the training data involved. They can hinder the identification and mitigation of model biases, compliance issues, and even achieving specific results from a model. Complex models must incorporate high interpretability and explainability for results to be trustworthy and accurate.

Choosing the Right Model

Whether your business is just starting out or you run an enterprise, it is important to consider the following aspects of foundational models to make the best selection:

1. Degree of Customization

Considering this aspect helps you finetune the output from the model with new data, right from prompt-based methods to retraining the entire foundation model.

2. Size of the Model

The size of the model is determined by the information that it has learned by way of parameter count. Consider this metric to select the right model size for your data size.

3. Inference Options

Consider this aspect if you require assistance or paraphernalia to deploy the model, for example, API calls or self-managed deployments.

4. Licensing Agreements

Some foundational models imply strict licensing agreements that may not be conducive to the purpose you require them.

5. Context Windows

Context window refers to the amount of information that can fit into a single prompt. It determines the data boundaries for which the AI system will remain effective.

6. Latency

Latency is basically the speed of response of the AI model. For real-time applications, systems with low latencies are best.

Foundation Models in Generative AI

Generative AI makes extensive use of foundation models for a variety of purposes. The beauty of these models is that even though they are pre-trained, they continue to learn from the data inputs and prompts. The generated outputs can thus be made highly comprehensive when prompts are selected or designed carefully.

The working of generative foundation models itself is simple to understand. Using a prompt (input) in the form of human language – whether spoken or typed – the models generate the output.

Depending on the type of foundational model you are working with (text-to-image, chatbot, etc.), the framework they use to generate the output would be different. They may use neural networks, GANs (Generative Adversarial Networks), transformers, and variational encoders.

For example, image generation models would work with the given prompts to either create new images or to sharpen and define the input images to produce high-quality outputs. On the other hand, for text-generative models, the output would be derived from a probability distribution to predict the next word or sentence through the input string.


There is no question that AI-based improvements are advancing at a dizzying pace. The capabilities and speed with which AI works keep expanding, leading to more efficient and speedier systems that perform at high accuracy.

Foundation models provide the base layer over which complex AI systems can be created with the right tweaking and adjustments.

With MarkovML, your enterprise can empower data scientists to create highly efficient applications using foundation models. The platform is an AI wireframe with dedicated features in data intelligence and management, generative AI, and machine learning-based workflows.

The user-friendly interface of the MarkovML platform helps you promptly get to the point and automate tasks, govern enterprise data, and even create Gen AI apps.

To understand the full width of MarkovML's offerings, visit the website.

Shaistha Fatima

Technical Content Writer MarkovML

Get started with MarkovML

Empower Data Teams to Transform Work with AI
Get Started

Let’s Talk About What MarkovML
Can Do for Your Business

Boost your Data to AI journey with MarkovML today!

Get Started