Robert Johns | 17 Jan, 2024

OpenAI Might Be Leading The Race, But What Are The Best LLMs?

In this article, we explore the 5 best large language models in 2024.

As the end of 2024 draws nearer, one thing is for sure: AI and large language models have been at the center of a new tech revolution.

But what are large language models anyway? Don’t worry, we’ll cover that first! We’ll even look into the latest news from OpenAI about creating your own GPT.

So, whether you’re curious about AI and large language models or an experienced developer trying to find the best large language models for your project, read on to learn more.

But before we start, I wonder, outside of the hugely popular ChatGPT, how many other large language models have you heard of?

There’s no doubt that OpenAI is the race leader right now, but that’s not to say that tech giants like Google, Meta, and others aren’t knocking on the door.

So, if you’re ready, let’s dive into the 5 best large language models available in 2024.

What Is An LLM?

There can be no doubt that 2024 has been a breakthrough year for AI tools and AI models, and the driving force behind this generative AI model revolution has to be the rise of the LLM.

LLMs have become a major area of research and development in artificial intelligence as they can be used for a vast range of applications, including the now ubiquitous AI chatbot.

By now, many of us have been using ChatGPT for what feels like a realllllly long time, but have you ever wondered how it was created? 

Maybe you’ve heard the term large language model or LLM thrown around? Perhaps you’ve even used the phrase, but do you know what an LLM actually is?

Unless you’ve taken an AI course, let’s take a moment to demystify this concept!

An LLM is a type of AI that’s been designed to understand, generate, and sometimes translate human language prompts.

This leads me nicely to another buzz phrase for 2024: natural language processing, or NLP.

Yep, LLMs use the deep learning technique, NLP. Wow, that’s a lot of letters, right?!

But why are they called large language models?

Great question! They’re known as large language models because they are trained on vast amounts of text data, known as the corpus of data.

They also have an enormous number of parameters. These are super important, as they’re the parts of the model that learn from the training data.

So, now you know the basics, let’s cover the key characteristics of an LLM:

  • Size: LLMs have been trained on billions or even trillions of parameters.
  • Training Process: They’re trained on massive datasets from books, websites, and articles to learn language patterns, grammar, vocabulary, and writing styles.
  • Capabilities: They can perform language-related tasks like writing essays, translating languages, summarizing text, answering questions, generating code, and more.
  • Pre-training and Fine-tuning: They are typically pre-trained on a general dataset and then fine-tuned for specific tasks with targeted datasets.
  • Interactivity: LLMs can be interactive, allowing them to engage in dialogue with users by providing coherent and contextually appropriate responses.

Is ChatGPT A Large Language Model?

When it comes to LLMs, the most famous has to be ChatGPT.

Created by OpenAI, ChatGPT is built upon the GPT architecture, and it’s been trained on a diverse range of internet text.

And as you’ve no doubt experienced yourself, it’s fine-tuned for conversational dialogue and commonsense reasoning.

Note that ChatGPT is actually part of the GPT family of models. 

A major factor in the success of the GPT model set has to be their large number of parameters alongside their ability to generate human-like text. 

Side note: the GPT actually stands for Generative Pretrained Transformer. At first glance, you might be conjuring images of a preschool Optimus Prime!

But no, this simply means that at its core, ChatGPT uses the Transformer model architecture.

What Are The Top 5 Large Language Models?

Let’s play a game to see how many of these LLMs you’ve heard of!  I’m close to 100% certain that you’ll be familiar with OpenAI’s offerings, but what about the rest? (Note that I also made a YouTube video discussing the best LLMs).

 

 

 

1. GPT-4 by OpenAI

Until proven otherwise, I think it’s safe to say that OpenAI’s GPT-4 is the most powerful and famous LLM in widespread use right now.

Billed as a cutting-edge iteration in OpenAI's series of GPTs, its capabilities extend to complex reasoning tasks with a near-human level of comprehension and problem-solving. 

Most of us who have interacted with GPT-4 have done so via ChatGPT, but you can also access it via the API if you’re building AI projects.

Whichever route you choose, I know I’m always blown away by the model’s remarkable understanding of nuanced language.

It’s almost spooky how well it performs when participating in sophisticated conversations in various domains, from highly academic to practical everyday knowledge.

Depending on your needs, some of its key capabilities include language translation, content generation and summarization, and the ability to code, as long as you respect the limits for context length.

For the hackr.io community, the last one is probably the most impressive, as you can use GPT-4 as a coding tutor or intern, depending on your needs and skill level.

It’s also really interesting to see new features and capabilities constantly appearing.

For example, you can now create your own GPT!

Plus, GPT-4 has recently become multimodal, which means it can process and interpret text and images. It will even interact with DALL-E to generate images for you.

On top of that, ChatGPT can now search the internet actively via Microsoft’s Bing. If you didn't already know, Microsoft is a massive investor in OpenAI. 

This feature is super interesting to me, as it’s a pretty clear indicator that they want to use their first-mover advantage to keep users on the platform.

Why, you might ask? 

Well, Google, who we’ll be talking about next, also has big plans to integrate their LLM into search.

And, as you can imagine, neither of these tech giants wants to lose the battle for the prime destination for us to ask questions and find answers.

To wrap things up, let’s touch on bias. Given its massive reach, GPT-4 has the potential to influence on a major scale, so it's super important that the model avoids bias.

If you read the OpenAI docs, GPT-4 has been fine-tuned with a focus on mitigating harmful outputs and biases. 

The major challenge with this subject is that defining bias for an LLM can be biased! I know, head-scratcher.

I won’t dive into it in much detail here, but the main takeaway is to do your research before accepting any answers or information from any LLM. 

2. PaLM 2 by Google

Given Google’s enormous influence on the evolution of the Internet, it’s unsurprising that they want to remain at the forefront and compete with OpenAI’s GPT models.

Enter PaLM 2, Google's next-generation large language model, advancing their previous model, PaLM.

Available in multiple sizes, each of which is named after a different animal, you can choose from Gecko, Otter, Bison, and Unicorn, with Gecko being the smallest version.

This will power Google Bard, their in-house alternative to ChatGPT, and it also shines in various forms of complex reasoning.

This includes coding, math, classification, answering questions, multilingual translation, and natural language generation.

Despite being smaller than its v1 predecessor, PaLM 2 offers better performance, efficiency, and lower costs thanks to compute-optimal scaling and a more varied and multilingual dataset.

Some other stand-out features of PaLM 2 include an advanced understanding of human language nuances with tricky concepts like idioms and riddles and multilingual translation.

In fact, over the next year, our experience with Google search will change forever, and PaLM 2 will be at the center of this, with AI-generated results and LLM capabilities being baked in.

We’ve all been Googling for answers for the longest time, but then ChatGPT came along, and many of us started heading there instead.

One thing’s for sure: it will be fascinating to observe this AI and LLM race and to see whether our collective habits shift when Google integrates PaLM 2 into search.

I guess time will tell!

To round things off, one of the most important aspects of any LLM is the propensity for bias. 

This is a hot topic for anyone developing an LLM, and I don’t expect that to change soon.

After all, when we ask questions or search, we often look for truth or objective data. But LLMs, like PaLM 2 and the others in our list, can inherit bias.

Google claims they’ve rigorously evaluated for biases, harms, and capabilities, but as I mentioned with GPT-4, this is a tricky area that can become quite subjective!

3. Llama 2 by Meta

As the first open-source LLM on our list, Llama 2 (Large Language Model Meta AI) is the latest development of its predecessor, the aptly named Llama. 

Developed and released by Meta AI (in partnership with Microsoft) under an Apache license, it’s one of the most popular open-source LLMs on huggingface.

And being an open-source LLM also means it’s freely available for research and commercial use without paying royalties.

I really appreciate this approach, as it emphasizes an open approach to AI while also focusing on innovation in the rapidly evolving generative AI space.

It’s also super curious to see Microsoft involved with this project alongside the more commercialized OpenAI. They certainly want to be in the race, that’s for sure!

When it comes to training data, the pre-trained models used a massive corpus of 2 trillion tokens. Yep, that’s trillion, with a ‘T’!

On top of that, the fine-tuning process included more than 1 million human annotations to enhance the model's accuracy and reliability.

This process is known as Reinforcement Learning from Human Feedback (RLHF), but I guess that’s a fancy way of saying humans told the model how to improve!

It’s also nice to see that Llama Chat underwent external testing and red-teaming processes to address any responses that might be unsafe or overly biased.

I’m also impressed that Llama 2 is available for developers on Azure AI's model catalog. This makes it super easy to spin up the model directly in the cloud.

Regarding features, the two standouts are Llama Chat and Code Llama.

You’ve probably guessed what they each do, but just in case, Llama chat is akin to ChatGPT, and code Llama is a bit like an AI coding assistant.

But unlike something like GitHub Copilot, which can auto-generate code in your IDE, Llama code is a chat interface that generates code for you.

So, I guess, in many ways, it’s also like ChatGPT when you ask for coding help!

Interestingly, though, there are in fact three specialized variants of Code Llama:

  • Foundational: for general coding tasks.
  • Code Llama - Python: Specialized for Python programming.
  • Code Llama - Instruct: Fine-tuned for natural language comments and instructions.

This is interesting, as they’ve tried to cater to different use cases with their code tool.

That said, I’d be curious to see whether it’s more or less effective than something like Amazon CodeWhsiperer or GitHub Copilot.

4. Claude 2 by Anthropic

Designed with the purpose of being a next-generation AI assistant, Claude 2 (amazing name) from Anthropic is the next LLM on our list and the latest iteration of their LLM assistant.

Side note: Anthropic itself was founded in 2021 by a team that worked on OpenAI’s GPT-2 and GPT-3 models, so they certainly know their stuff.

If I had to distill Claude 2 into something simple, it’s a lot like ChatGPT, but its core focus is to generate helpful, honest, and harmless (HHH) content.

To that end, safety is a major factor in the design of Claude, which is why it’s a closed system. This means that unlike GPT-4, it cannot search the internet.

That said, it’s highly capable when assisting with summarization, creative and collaborative writing, Q&A, and coding. 

Claude is also well-liked for being very user-friendly, including customization for personality, tone, and behavior. 

You can tell from the feature set that it’s being targeted toward customer service and other assistant-style roles, meaning it’s popular among enterprise users.

In fact, it’s even used by DuckDuckGo and Quora.

There are two versions of Claude to choose from: Claude for high-performance and Claude Instant, which is faster and more cost-effective.

For developers, Claude 2 offers enhancements in coding and math reasoning, as shown by impressive scores in coding benchmarks and quantitative reasoning.

It also offers a robust API, which is ideal if you want to build something specific with Claude working behind the scenes. 

Regarding bias, Claude 2 has undergone various evaluations, including internal red-teaming, which is unsurprising, given the emphasis on harmless responses. 

5. GPT-3.5 by OpenAI

To round things off, we have to include GPT-3.5. Yes, GPT-4 is on the list, but hold on for a second!

As the precursor to GPT-4, GPT-3.5 is still one of the most formidable LLMs, with impressive capabilities bridging the gap between the GPT-4 and GPT-3 model.

Of course, it’s not as capable as GPT-4, but it’s free to use with ChatGPT, which means it’s probably still being used far more widely than GPT-4, which is only available with a paid plan.

Plus, if you’ve spent any time building your own AI-powered chatbot with the API, you’ll know that GPT-3.5 is readily available, whilst GPT-4 requires you to join a waiting list.

Regarding features, GPT-3.5 is fast and capable of text generation and coding assistance. Sure, it cannot search the web or interpret images, but for the broadest of tasks, it’s very useful.

For me, I’d say the only downside to GPT-3.5 for day-to-day use is the date cut-off for its training data, as this can mean it’s slightly out of date with certain topics.

But, if you can step around this, it’s a highly capable and still incredibly impressive LLM.

New Release: Amazon Q

Fresh off the latest AWS re:Invent conference, Amazon has announced a new contender for the LLM market with its generative AI product, Amazon Q.

This is currently only available in preview mode within the AWS platform in US regions, but on first impressions, Amazon Q looks like a real contender for the best niche LLM.

But what is it exactly?

Well, from my first interactions with Amazon Q, the best way to describe it is ChatGPT for AWS.

Yes, I know Amazon might not appreciate me making that comparison, but at this stage, it's so much easier to relate LLMs and AI tools to ChatGPT as we all understand what it is and what it can do.

That said, Amazon Q is not your run-of-the-mill LLM. It's been designed specifically for business use, and it's also been trained on 17 years of AWS expertise.

The idea here is to let employees answer questions, summarize content, and complete tasks using your company's data from enterprise systems.

Beyond this, Amazon Q is also optimized to help you work within AWS.

This is the part that really stands out to me - if you've ever worked in the AWS cloud, you've probably spent time reading docs and the well-architected manifesto!

Don't get me wrong, the AWS docs are all really well put together, but how cool would it be to be able to ask Amazon Q how to do something rather than having to fumble through the docs?

Well, that's the idea here, as it's powered by over 17 years of AWS knowledge and experience in cloud building. This is massive to me, and I think it's going to revolutionize how we interact with AWS services.

I also appreciate that it makes the barrier to entry even lower for cloud professionals to implement best practices and solution patterns, not to mention how it can help users learn to build in the cloud quickly.

It's also nice to see that it's integrated with their AI coding assistant, Amazon CodeWhisperer. This is really cool, as it gives you access to a chat interface that you can use inside your own IDE if you have CodeWhisperer set up that way.

This is a big leap forward for the CodeWhisperer and GitHub Copilot battle, not to mention another chance for programmers to show that AI can't replace them, but perhaps they can be great teammates!

It's still really early days for Amazon Q, but I'm looking forward to playing this with more, and who knows, it might be able to shoot up our rankings when it's fully live and available worldwide.

Can I Build My Own Large Language Model?

Absolutely! You can create your own Large Language Model! 

With rapid advancements in the AI space and the democratization of access to massive computing resources, individuals and organizations can develop their own LLMs.

These can also be tailored to meet the specific needs or tasks for your own use case.

That said, building an LLM requires substantial computational resources, a large dataset for training (no surprise there!), and expertise in machine learning, deep learning, and NLP tasks.

You could even check out something like huggingface.co, which is an immensely popular platform for open-source models, including LLMs. Think of it like GitHub but for AI enthusiasts.

If this all sounds appealing, here are the main steps you’ll need to follow to build your own LLM:

  • Acquire a Dataset: Obtain a large and diverse training dataset that’s representative of the tasks you want your LLM to perform.
  • Choose a Model Architecture: Decide on a model architecture. The Transformer architecture is popular due to its ability to handle sequential data and its scalability.
  • Train the Model: Use machine learning frameworks like TensorFlow or PyTorch to train your model. Note that this will require significant computational power.
  • Fine-tune and Evaluate: After the initial training, fine-tune your model on a more specific dataset to evaluate its performance and iterate for improvements.
  • Compliance and Ethical Considerations: Ensure your model complies with data privacy laws and consider the ethical implications of its deployment, including biases.

Create Your Own GPT & Publish To The GPT Store

Perhaps you’re interested in creating your own LLM, but the steps I provided might be a lot of work.

I get it! We don’t all have a stack of Nvidia GPUs available!

But you also have another option.

At their recent Dev Day conference, OpenAI announced that anyone can create their own LLMs in the form of a personalized GPT.

Now, on the one hand, you could say that this is maneuvering by OpenAI to assert more dominance in the space. And I can see that argument.

On the other hand, this is incredibly intriguing for anyone who likes the idea of having their own ChatGPT that’s been trained for their niche area.

As of today, Create Your Own GPT is currently in beta, but I’ve already begun experimenting with it and have put together a detailed step-by-step tutorial to help you create your own GPT.

Plus, in January 2024, OpenAI launched the GPT store, which means that developers and GPT creators like you and me can now publish our GPTs to the store for anyone to use.

On that note, huggingface might also become even more integral here, as it could act as a hub for developers to explore, iterate, and refine GPT models before they are commercialized. 

Overall, I like to think of this in the same was as the Apple App Store or the Play Store for Android, making it a marketplace for developers to make money from their GPT creations.

Although, as of today, there's no official information on how you can monetize your GPT, OpenAI has promised to launch a revenue-sharing program in Q1 of 2024.

If you want to get ahead of the curve, thankfully, the process of publishing your own GPT is very simple.

You can even check out a pre-built range of niche GPTs that can help with data analysis, creative writing for blog posts and articles, tech support, and many more specializations.

Whatever your stance, this will democratize access to powerful language models, enabling further innovation. And that’s always a net positive in my book.

Wrapping Up

So there you have it, the 5 best large language models in 2024.

If you’ve made it this far, I hope you now have a better idea of what large language models are and how instrumental they’ve become in this new age of AI.

We’ve also taken a look at the future of LLMs, with the possibility of creating your own large language models in the form of a personalized GPT.

Outside of this, we’ve gone deep into the 5 best large language models available in 2024, including OpenAI’s GPT-4 and GPT-3.5 models.

But to spice things up, we’ve also covered three strong contenders from Google, Meta, and Anthropic, not to mention the newly announced Amazon Q.

So whether you’re simply curious about trying out different chatbots or you’re trying to find the best large language models for your dev project, there’s something for you.  

Whatever you plan to do with LLMs, have fun, and let us know in the comments if there are others you’d like us to cover.

Are you ready to build your own Chatbot with an LLM? Check out:

The 24-Hour Chatbot: How To Build a Python Chatbot with GPT-3.5

Frequently Asked Questions

This can be subjective, depending on whether you want to focus on commercial or open-source LLMs. That said, some of the most popular LLMs right now have to be GPT-4, PaLM 2, Llama 2, Claude 2, and GPT-3.5. Amazon Q is a new release that we also expect to be very popular once it's fully rolled out worldwide.

2. Is GPT-4 The Best LLM?

GPT-4 is far and away the most famous, popular, and potentially most powerful mainstream LLM available right now. Based on this, you could make the case that it’s the best LLM, but it really comes down to your own needs.

3. Which LLM Model Is The Best?

This is a subjective question, as it depends on whether you prefer commercial or open-source LLMs and what you want to do with them. The most famous and potentially most popular LLM right now is GPT-4, but some strong alternatives include PaLM 2, Llama 2, and Claude 2. 

References

1. Amazon. AWS re:Invent 2023 Live [Internet]. Amazon; [date unknown; cited 2024 Jan 15]. Available from: https://www.aboutamazon.com/news/aws-reinvent-2023-live

2. OpenAI. Dev Day [Internet]. OpenAI; [date unknown; cited 2024 Jan 15]. Available from: https://devday.openai.com/

By Robert Johns

Technical Editor for Hackr.io | 15+ Years in Python, Java, SQL, C++, C#, JavaScript, Ruby, PHP, .NET, MATLAB, HTML & CSS, and more... 10+ Years in Networking, Cloud, APIs, Linux | 5+ Years in Data Science | 2x PhDs in Structural & Blast Engineering

View all post by the author

Subscribe to our Newsletter for Articles, News, & Jobs.

I accept the Terms and Conditions.
Thanks for subscribing! Look out for our welcome email to verify your email and get our free newsletters.

Disclosure: Hackr.io is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

In this article

Learn More

Please login to leave comments