Models and labs

What is Llama 2, and why does an openly available model matter?

· By Robert Scales · 4 min read

Short answer

Llama 2 is a family of large language models released by Meta on July 18, 2023, in sizes of 7, 13 and 70 billion parameters, with chat-tuned versions, free for research and commercial use. Because anyone can download the model weights, developers can run, inspect and adapt it on their own terms instead of only renting access through another company's service.

Yesterday Meta released Llama 2, the next generation of its large language model, and made it free for both research and commercial use. Unlike ChatGPT or Claude, which you reach through a website or a paid connection run by the company that built them, Llama 2 comes as a set of files you can download: the model weights, plus starting code. Microsoft is Meta's preferred partner for the launch, and the models are also offered through Amazon Web Services, Hugging Face and other providers.

A quick vocabulary note. A model's weights are the billions of numbers it learned during training; they are the model. Having the weights means you can run it on your own computers, tune it on your own data and study how it behaves, without sending your text to anyone else.

What Meta released

The research paper published alongside the launch describes two families:

ModelSizesPurpose
Llama 27B, 13B, 70BA general base model to build on
Llama 2-Chat7B, 13B, 70BTuned for conversation, like a chatbot

"B" stands for billions of parameters, the adjustable values inside the model. Smaller models are cheaper and faster to run; larger ones are generally more capable. Meta also trained a 34B version but is holding it back, saying it ran out of time to test it for safety properly.

Compared with the first Llama, the new models learned from about 40% more data, roughly 2 trillion tokens (a token is a word or part of a word), drawn from publicly available sources. Meta says it excluded data from its own products, such as Facebook, and removed sites known to hold a lot of personal information. The context length, meaning how much text the model can consider at once, doubled to about 4,000 tokens. The chat versions were refined with human feedback, a process in which people rate answers and the model is trained toward the preferred ones.

Why openness matters

Meta argues that releasing models openly is both fairer and safer. Fairer, because startups, researchers and smaller companies get a tool they could not afford to build themselves. Safer, in Meta's view, because many more developers can test the model, find problems and share fixes. The first Llama, offered to researchers, drew more than 100,000 access requests.

For learners and builders, the practical gains are concrete:

  • Privacy: you can keep sensitive text on your own machines.
  • Control: the model will not change under you because a provider updated it.
  • Customization: you can fine-tune it, meaning train it a little more on your own examples, for a narrow task.
  • Transparency: researchers can study a capable model directly instead of guessing from outside.

Openness also moves responsibility. When you run the model yourself, you take on the safety checks a hosted service would otherwise handle. Meta's paper notes that its testing so far has been in English and could not cover every situation, and it asks developers to run their own safety testing before deploying a Llama 2-Chat product. Meta is publishing a Responsible Use Guide and an Acceptable Use Policy for that reason.

Meta calls Llama 2 open source. Its licence, however, adds conditions of its own, covered below, so "openly available" may be the more careful description.

Try it: Find Llama 2-Chat on Hugging Face and give it the same three questions you usually ask ChatGPT, one factual, one creative and one about your own work. Note where the answers differ in accuracy, tone and length.

A worked example: a first test prompt

Llama 2-Chat follows instructions much like other chat models. A simple test of a narrow business task might look like this:

Prompt
You are an assistant for a small bakery.
Write three short, friendly replies to customers asking whether we have
gluten-free bread. We bake it on Fridays only and it often sells out by noon.
Keep each reply under 40 words.

Run it on the 7B and 70B chat models if you can. You will usually see the larger model follow the details more closely, while the smaller one answers faster and costs less to host. Picking a size is a trade-off you make with your own tasks in hand.

Can a small business use Llama 2?

Yes. The licence, called the Llama 2 Community License, allows commercial use at no charge. There is one size limit, and it will not affect a small business: any company whose products had more than 700 million monthly active users on the release date must ask Meta for a separate licence. That clause targets the largest technology platforms.

There are conditions to respect. If you share the model or something built from it, you must pass on a copy of the licence and keep Meta's attribution notice. Your use must follow the law and Meta's Acceptable Use Policy. And you may not use Llama 2, or its outputs, to improve a different large language model. The model comes "as is," without warranty, so the responsibility for how it behaves in your product is yours.

The bigger question for most small businesses is practical, not legal. Running a model yourself means paying for suitable hardware or cloud servers and having someone who can set it up and keep it secure. Using it through Azure, AWS or Hugging Face removes some of that work. For many teams, a sensible path is to start with a hosted version, test it on real tasks such as replying to customers or summarizing documents, and only then decide whether owning the setup is worth the effort.

Sources

  1. Meta and Microsoft Introduce the Next Generation of Llama — Meta, July 18, 2023
  2. Llama 2: Open Foundation and Fine-Tuned Chat Models — arXiv (Meta), July 18, 2023
  3. Llama 2 Community License Agreement — Meta, July 18, 2023

Get the free Guide to Artificial Intelligence

Sign up for the weekly newsletter and receive the free guide: what changed in AI this week, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement