Artificial intelligence (AI) has permeated nearly every industry over the last 18 months since the launch of OpenAI's ChatGPT.

There have been several big winners amid the AI arms race. Nvidia is selling its powerful graphics processing units (GPUs) faster than it can make them, leading to massive profits for the chipmaker. Microsoft, an investor in OpenAI, has seen its cloud platform revenue surge amid demand for compute power and access to AI models.

But one company has been working on advanced AI algorithms for over 15 years and publishing research in the field for the last 10 years. It's made several major advancements in generative AI and large language models, and its CEO believes it can become "the leading AI company in the world."

This isn't some obscure tech company. You likely use one of its products every day, along with over 3 billion other people. I'm talking about Meta Platforms (META 0.49%), the company behind Facebook, Instagram, WhatsApp, Messenger, and the Llama 3 large language model.

A graphic of a circuit board depicting the outline of a brain with the letters AI printed on it.

Image source: Getty Images.

Meta's putting its AI to use across all of its products

Meta has been working on AI algorithms for over a decade and a half. It developed a new machine-learning algorithm in the early 2010s to recommend content in users' feeds. AI then powered its advertising business, ensuring the right users saw the right ad at the right time.

Meta developed AI that can understand the things people type on Facebook or Instagram (natural language processing) and the photos users post (computer vision). That helps it understand the content it's showing other users and makes it easier to block hate speech and other violence on its platforms.

Meta's also working on generative AI. Its large language model, Llama, is now on its third version, which is open source. Llama 3 has proven more cost-effective for developers to use than OpenAI's models, but it often falls short of the capabilities of OpenAI's newest GPT-4o model.

Meta integrated its generative AI capabilities into its ad platform, making it easier for marketers to create and test ad campaigns. CEO Mark Zuckerberg says revenue flowing through its AI advertising tools has doubled since last year.

The Llama 3 model also powers Meta AI, the new AI assistant built into Meta's family of apps. Management reported "tens of millions" of users within a week of its launch in April.

Meta's also using generative AI to help creators interact with fans, to help businesses connect with customers, and for its internal development team.

Building the world's leading AI models won't come cheap

If you want to train a big large language model to be able to come up with accurate and creative answers to questions, help create winning ad campaigns, or generate realistic photos from a text description, it takes a lot of compute power. That means spending a lot on new GPUs, building new data centers, and paying for all the electricity to run them.

Zuckerberg isn't backing down from the high costs associated with his ambition of becoming the leading AI company in the world. "We should invest significantly more over the coming years to build even more advanced models and the largest scale AI services in the world," he said during Meta's first-quarter earnings call.

Meta increased its outlook for this year's capital expenditures from between $30 billion and $37 billion to between $35 billion and $40 billion alongside its Q1 earnings release.

Zuckerberg also thinks it's going to take some time for Meta to generate meaningful revenue from its AI efforts. While Meta will integrate its advances in AI across its various products, direct monetization such as advanced business messaging services, ads and paid content within AI interactions, and charging a fee for access to premium AI models (like OpenAI does) won't materialize for years. But he said, "If the technology and products evolve in the way we hope, each of those will unlock massive amounts of value for people and ... [businesses] for us over time."

The best AI stock to buy right now

Meta remains one of the most attractive AI stocks on the market.

While investors initially sent the stock price down following the news that Meta plans to spend billions more than originally planned building out AI data centers, the stock has since recovered. It now trades near its all-time high, but it could still climb higher.

Its forward price-to-earnings of 25.5 gives it a slight premium to the S&P 500. But analysts expect Meta's earnings per share to grow by about 30% per year over the next five years. That growth is supported by a massive share repurchase program. Meta held about $58 billion in cash on its balance sheet at the end of the first quarter, and it could generate another $50 billion in free cash flow this year despite the increase in capital expenditures.

Meta's ambitions in artificial intelligence could propel another period of strong growth for the tech company. At its current share price, it looks like a fair value. And if it builds a big business around its AI models, that could provide significant upside for investors.