top of page
  • Writer's pictureAbhinav Giri

Exploring the AI Frontier: A Comprehensive Comparison of ChatGPT, Bard and LlaMa2

In the realm of artificial intelligence, generative models stand as the architects of innovation, reshaping the way we create, imagine, and interact with technology. Imagine a world where machines not only understand our commands but also possess the creative powers to generate reply - welcome to the age of generative AI. Generative AI creates content after a user query it, using data from its machine language model.


After ChatGPT was released to the public in November 2022, it was only a matter of time before other tech giants released alternatives to ChatGPT. In March 2023, Bard AI, Google’s answer to OpenAI’s game-changing chatbot. In July 2023, Meta with joint venture of Microsoft released LlaMa 2. All ChatGPT, Bard AI and LlaMa2 are AI powered language models developed to simulate the human conversations with the help of NLP (Natural Language Processing) and ML (Machine Learning).


Introducing ChatGPT

GPT, which stands for Generative Pre-trained Transformer, excels at identifying patterns within data sequences. ChatGPT, an AI-powered chatbot, employs machine learning to engage in conversational dialogues, providing responses that feel distinctly human. It also boasts the ability to retain context from previous interactions.


ChatGPT currently uses the GPT-3.5 language model and is trained on a pre-defined set of data that hasn't been updated since 2021. which is trained from human-created text on the internet. The paid version GPT-4, available to only ChatGPT Plus customers, is trained on a larger dataset. ChatGPT-4 estimated to have 100 trillion parameters compared to the training data size of 175 billion parameters of GPT-3.


Within five days, ChatGPT reached 1 million users, according to OpenAI CEO Sam Altman.


Google Bard Unveiled

Bard (Binary Augmented Retro-Framing), Google Bard AI, is also an AI (Artificial Intelligence) powered language model. Google Bard is based on Google’s LaMDA (Language Model for Dialogue Applications) technology. Google Bard can respond to various queries in a conversational fashion. It generates high-quality and fresh responses by using online information. Google Bard AI collects information from the web and user responses, and it also collects feedback to enhance its AI system performance.

Unveiling LLAMA 2

LLaMa 2 (Low-Latency and Memory-Efficient Large-Scale Model Attention) is a joint venture from Meta and Microsoft. It is a large language model that is trained on a massive dataset of text and code. LLaMa 2 is optimised for engaging two-way conversations. It can maintain extended dialogues, adapt responses based on user input, and generate a multitude of creative text formats.

LLaMa 2 is an open-source, freely available for both research and commercial use.

Llama 2 is freely accessible through Hugging Face, Amazon Web Services, and Microsoft Azure, meaning developers have access to its code and data, which will enable them to build and improve on the model. It is provided with support from a broad range of industry and academic partners who endorse the open innovation approach to AI technologies.

Common Ground

Chat GPT, Bard, and LLaMa are multimodal large language models (LLMs) designed for conversational AI applications. Each model is trained to understand and generate text in a human-like fashion and can generate text in multiple styles and genres, including poetry and stories. However, one significant drawback to large language models is that they occasionally return inaccurate results (known as hallucinations), so users are encouraged to verify any information given to them by tools like ChatGPT, Bard, or LLaMa 2.

ChatGPT, Bard and LLAMA 2: What’s the difference?

Bard, ChatGPT and LLama 2 can generate complex answers to multi-faceted queries, but this key difference in how they've been trained and built sets them apart. Here are the key points of differences to remember.


ChatGPT

Bard

Llama 2

Language Model

A specially tweaked version of OpenAI's Generative Pre-training Transformer 3 (GPT-3) or Generative Pre-training Transformer 4 (GPT-4), depending on the version

Pathways Language Model (PaLM 2)

Base models are initialized from Llama 2 and then trained on 500 billion tokens of code data

Data sources

ChatGPT was trained on a massive dataset of text, including Common Crawl, Wikipedia, books, articles, documents, and content scraped from the open internet—but its sources end in 2021, limiting latest world events and research

Bard was trained on Infinite set, a data set including Common Crawl, Wikipedia, documents, and conversations and dialogues from the web; Bard can search the web in real-time to find the most recent answers to questions and latest research

Llama 2 was trained with 2 trillion "tokens" from publicly available sources like Common Crawl (an archive of billions of webpages), Wikipedia, and public domain books from Project Gutenberg as a cutoff date of September 2022 but also includes tuning data from as recently as July 2023

Architecture

Modified transformer architecture with a novel technique called “information-based training”

Transformer architecture with a unique encoder-decoder structure

Custom-built transformer architecture with a focus on density and diversity

Training Objective

Multiple objectives, including masked language modelling, next sentence prediction, and sentiment analysis

Maximum likelihood estimation with a masked language modelling objective

Diverse set of objectives, including masked language modelling, next sentence prediction, sentiment analysis, and dialogue generation

Training Data Size

175B parameters (GPT-3)

100 trillion parameters (GPT-4)

137B parameters

Three variant size model: 7B, 13B, 70 B parameters

Inference Speed

Fast

Fast

Slower compared to Google Bard and ChatGPT4 due to larger size

Multi-Task Learning

Yes

No

Yes

Task Adaptability

​Improved

Limited

Improved

Knowledge Base

Larger

Large

Largest

Emotional Intelligence

Advanced

Basic

Advanced

Conversational Capabilities

Advanced

Basic

Advanced

Context Understanding

Better

Good

Best

Maintain context of conversation

ChatGPT is a chat-bot, hence it has memory. It can maintain context as per its memory

No

Llama2 by itself also doesn't maintain history. Need to attach memory to it to maintain conversation context.

Nature of response

Chat GPT can return only text responses.

Google Bard AI can return regular search results.

Return JSON format responses

URL address

Chat GPT is accessed through the URL, https://chat.openai.com/chat

The URL to access Google Bard AI is https://bard.google.com

Begin by filling access form on Meta's website then head over to the Hugging Face model card for whichever model you'd like to use https://huggingface.co/<model_id>

Prompt Structure

The prompt can be a question, statement, or any other stimulus intended to spark creativity, reflection, or engagement. It can take image or video as input and give outputs in text format.

The prompt can be a question, statement, image or any other stimulus intended to spark creativity. It can take input as text, images and videos and can give text, images and video as output.

The prompt can be a question, statement, or any other stimulus intended to spark creativity, reflection, or engagement. It supports multi-modal inputs, including images, text, and audio and give outputs in text format.

Prompt Size Limitation

2048 Characters

4,000 Characters

3000 Words (70B model)

Source Of Information

Chat GPT generates responses using feed data

Google Bard generates responses using internet.

LLama 2 generates responses using feed data

Language Support

26+ languages

95+ languages

20+ languages

Integration Across Platforms

Yes

No

Yes

Variants Available

GPT-3, GPT-3.5 and GPT-4

Single

Three variants based on parameters:parameters 7 billion parameters, 13 billion parameters, 70 billion parameters

Source Model

Closed source

Closed source

Open source

Supportive Hardware Requirement

No

No

​Requires high processing GPU


1)7B model: least 10GB VRAM at a minimum

2)13B model: run on GPUs like the RTX 3090 and RTX 4090

3)70B model: Will require very powerful hardware like an A100 80GB

Pricing

For OpenAI's APIs first time user gets $5 worth of token free. After which every token is chargeable. ChatGPT Plus is billed at $20/month to include access during peak times, faster response times, priority access to new features, and use of GPT-4.

Bard is free to users who have access.

It is open-source. It is free to use.Price comes with respect to resources required for processing or to host llama2 model.


Performance Analysis¹

Evaluating Creativity

To assess their creative and humorous capabilities, we challenged both ChatGPT and Llama 2 AI models with our signature creativity and sarcasm test. The task involved discussing the merits of space exploration.

ChatGPT's performance stood out as noticeably superior when compared to Llama 2's response. While Llama 2 impressed with its creative output, it fell just short of ChatGPT's excellence. Google's Bard, on the other hand, lagged both ChatGPT and Llama 2.

Assessing Math Skills

When it comes to mathematical abilities, Llama 2 displayed potential when compared to Bard but fell considerably short when matched against ChatGPT in solving algebraic and logical math problems, which were the focal points of our examination. Intriguingly, Llama 2 successfully tackled numerous math problems that had initially stumped both ChatGPT and Bard during their early iterations.

While it's evident that Llama 2 doesn't match up to ChatGPT's math prowess, it does shine as a promising contender in this arena.

Assessing Coding Skills

In our evaluation of coding prowess, Llama 2 exhibited substantial promise when compared to ChatGPT and Bard. We assigned all three AI chatbots the challenging tasks of crafting a functional to-do list app, coding a basic Tetris game, and constructing a secure authentication system for a website.

ChatGPT excelled in nearly flawless execution across all three assignments. In contrast, Bard and Llama 2 delivered similar results, successfully producing functional code for the to-do list and authentication system but encountering difficulties in developing the Tetris game. Below, you'll find a screenshot of Llama 2's to-do app in action.

Common sense and Logical Reasoning

Common sense is an area a lot of chatbots are still struggling with, even the established ones like ChatGPT. We tasked ChatGPT, Bard, and Llama 2 with solving a set of common sense and logical reasoning problems. Once again, ChatGPT significantly exceeded both Bard and Llama 2. The competition was between Bard and Llama 2, and Bard had a marginal edge over Llama 2 in our test.


Cost Analysis²

As a crucial final step in the decision-making process, it is imperative to analyse cost structures across the three AI frontiers. Below, you will find a basic comparison along with an illustrative sample task that includes cost considerations for processing a specific dataset size.


Basic Analysis

ChatGPT

​New users enjoy an initial $5 token credit, after which token usage is billed. ChatGPT Plus (GPT-4) subscription is priced at $20 per month.

BARD

​It currently provides free access with no associated charges.

LlaMa 2

​Open-source and accessible without cost.

Expenses are linked to the resources required for processing and hosting the Llama 2 model.


Sample Task

Now, taking sample task for deep analysis of costing by ChatGPT, Bard and LLAMA 2:

Say we wanted to take the English Wikipedia - 6M articles, 1000 tokens (unit of text that is used to represent a word) each and summarize them to half the size using LLMs.

Size of the Wikipedia Corpus

  • ~ 6 million articles in total

  • ~ 750 Words per article

  • ~ 1000 tokens per article

Interesting pointers on the cost of this task with various models

  • Doing it with GPT-4 would cost about $360k.

  • Same task with GPT-3 Davinci variant (AI engine designed for general natural language processing and problem-solving) 175B parameters would be about $180K and if you used a fine-tuned variant of Davinci, that would be >$1M

  • Compare it with the equivalent size model Llama 2 (7B variant). It would cost ~$2k and the fine-tuned version of it would cost ~$3k. That is about 9x and 40x difference in cost in comparable models between pre-trained and fine-tuned versions respectively.

Comparison of ChatGPT, Bard and LlaMa2: Conclusion

ChatGPT, Bard, and LLAMA 2 represent prominent milestones in the AI landscape with a diverse array of tools and capabilities, from advanced emotional intelligence and creativity to real-time web-based information retrieval and cost-effectiveness.

  • ChatGPT impresses with creativity and context understanding.

  • Bard excels in real-time internet information retrieval.

  • LLAMA 2 offers adaptability and diversity as an open-source model.

These models showcase AI's evolving abilities in communication, math, coding, and reasoning. While none are flawless, they open doors to new possibilities. Cost-wise, they vary from token-based billing to free access and resource-dependent hosting.

They mark a transformative moment in AI, propelling us towards more sophisticated human-machine interactions and reshaping our relationship with technology. They not only define the present but also pave the way for a future where AI continues to evolve and shape our interactions with technology.


References:


84 views

Comments


Commenting has been turned off.
bottom of page