It was the summer of 2023, and the question at hand was whether to release a Llama into the wild.
The Llama in question wasn’t an animal: Llama 2 was the follow-up release of Meta’s generative AI model—a would-be challenger to OpenAI’s GPT-4. The first Llama had come out a few months earlier. It had originally been intended only for researchers, but after it leaked online, it caught on with developers, who loved that it was free—unlike the large language models (LLMs) from OpenAI, Google, and Anthropic—as well as state-of-the-art. Also unlike those rivals, it was open source, which meant researchers, developers, and other users could access the underlying code and its “weights” (which determine how the model processes information) to use, modify, or improve it.
Yann LeCun, Meta’s chief AI scientist, and Joelle Pineau, VP of AI research and head of Meta’s FAIR (Fundamental AI Research) team, wanted to give Llama 2 a wide open-source release. They felt strongly that open-sourcing Llama 2 would enable the model to become more powerful more quickly, at a lower cost. It could help the company catch up in a generative AI race in which it was seen as lagging badly behind its rivals, even as the company struggled to recover from a pivot to the metaverse whose meager offerings and cheesy, legless avatars had underwhelmed investors and customers.
But there were also weighty reasons not to take that path. Once customers got accustomed to a free product, how could you ever monetize it? And as other execs pointed out in debates on the topic, the legal repercussions were potentially ugly: What if someone hijacked the model to go on a hacking spree? It didn’t help that two earlier releases of Meta open-source AI products had backfired badly, earning the company tongue-lashings from everyone from scientists to U.S. senators.
It would fall to CEO Mark Zuckerberg, Meta’s founder and controlling shareholder, to break the deadlock. Zuckerberg has long touted open-source technology (Facebook itself was built on open-source software), but he likes to gather all opinions; he spoke to “everybody who was either for, anti, or in the middle” on the open-source question, recalls Ahmad Al-Dahle, Meta’s head of generative AI. But in the end it was Zuckerberg himself, LeCun says, who made the final decision to release Llama 2 as an open source model: “He said, ‘Okay, we’re just going to do it.’” On July 18, 2023, Meta released Llama 2 “free for research and commercial use.”
In a post on his personal Facebook page, Zuckerberg doubled down on his decision. He emphasized his belief that open-source drives innovation by enabling more developers to build with a given technology. “I believe it would unlock more progress if the ecosystem were more open,” he wrote.
The episode could have just been another footnote in the fast-unfolding history of artificial intelligence. But in hindsight, the release of Llama 2 marked a crucial crossroads for Meta and Zuckerberg—the beginning of a remarkable comeback, all thanks to tech named after a furry camelid. By the time Llama 3 models were released in April and July 2024, Llama had mostly caught up to its closed-source rivals in speed and accuracy. On several benchmarks, the largest Llama 3 model matched or outperformed the best proprietary models from OpenAI and Anthropic. One advantage in Llama’s favor: Meta uses publicly shared data from billions of Facebook and Instagram accounts to train its AI models.
The Llama story could be a pivotal chapter in the ongoing philosophical debate between open-source AI models (generally more transparent, flexible, and cost-effective, but potentially easier to abuse) and closed models (often more tightly controlled but lacking transparency and more costly to develop). Just as crucially, Llama is at the core of a complete strategic pivot on the part of Meta to go all in on generative AI. Zuckerberg is now seen as a champion of “democratizing tech” among Silicon Valley developers—just two years after he and his company were being questioned, and sometimes mocked, for going all in on the metaverse, and vilified for having contributed to political polarization, extremism, and harming the mental health of teenagers.
DeSean McClinton-Holland for Fortune
While ChatGPT remains the dominant gen AI tool in the popular imagination, Llama models now power many, if not most, of the Meta products that billions of consumers encounter every day. Meta’s AI assistant, which reaches across Facebook, Instagram, WhatsApp, and Messenger, is built with Llama, while users can create their own AI chatbot with AI Studio. Text-generation tools for advertisers are built on Llama. Llama helps power the conversational assistant that is part of Meta’s hit Ray-Ban glasses, and the feature in the Quest headset that lets users ask questions about their surroundings. The company is said to be developing its own AI-powered search engine. And outside its walls, Llama models have been downloaded over 600 million times on sites like open-source AI community Hugging Face.
Still, the pivot has perplexed many Meta watchers. The company has spent billions to build the Llama models: On its third-quarter earnings call, Meta announced that it projects capital expenditures for 2024 to reach as high as $40 billion, with a “significant” increase likely in 2025. Meanwhile, it’s giving Llama away for free to thousands of companies, including giants like Goldman Sachs, AT&T, and Accenture. Some investors are struggling to understand where and when, exactly, Meta’s revenue would start to justify the eye-watering spend.
Why open-sourcing Llama is good for Meta is “the big puzzle,” says Abhishek Nagaraj, associate professor at the University of California at Berkeley’s Haas School of Business, adding that it’s “hard to justify” from a purely economic standpoint.
Nonetheless, Llama’s contrarian success has allowed Zuckerberg to shrug off the lukewarm response to his metaverse ambitions and the company’s painful “year of efficiency” in late 2022 and early 2023. The rise of Llama has also given Zuckerberg a chance to address a long-simmering sore point in his otherwise meteoric career: the fact that Facebook, and now Meta, have so often seen their services and products constrained by rules imposed by Apple and Google—the rival giants whose app stores are Meta’s primary points of distribution in the mobile device era. As he wrote in a July blog post: “We must ensure that we always have access to the best technology, and that we’re not locking into a competitor’s closed ecosystem where they can restrict what we build.”
With Llama, Meta and Zuckerberg have the chance to set a new industry standard. “I think we’re going to look back at Llama 3.1 as an inflection point in the industry, where open-source AI started to become the industry standard, just like Linux is,” he said on Meta’s July earnings call—invoking the open-source project that disrupted the dominance of proprietary operating systems like Microsoft Windows.
Perhaps it’s this possibility that is giving Zuckerberg some new swagger. At 40, two decades after he cofounded Facebook, he appears to be enjoying what many are calling his “Zuckaissance”—a personal and professional glow-up. His once close-cropped haircut has given way to lush curls, the drab hoodies are swapped for gold chains and oversize black T-shirts, and his hard-edged expressions have softened into relaxed smiles. He even found time in November to collaborate with T-Pain on a remake of the hip-hop hit “Get Low”—an anniversary gift to his wife, Priscilla Chan.
In the long run, OpenAI’s ChatGPT may be seen as the fiery spark that ignited the generative AI boom. But for now, at least, Llama’s own future’s so bright, Zuckerberg has gotta wear AI-powered Ray-Ban shades.
Meta’s work on AI began in earnest in 2013, when Zuckerberg handpicked LeCun, a longtime NYU professor and an AI luminary, to run Facebook’s new FAIR lab. LeCun recalls that when he began discussing the role, his first question was whether Facebook would open-source its work. “Nobody has a monopoly on good ideas,” he told Zuckerberg, “and we need to collaborate as much as we can.” LeCun was thrilled with the answer he got: “Oh, you don’t have to worry about it. We already open-source our platform software and everything.”
But prior to the generative AI boom, Meta’s use of AI was mostly behind the scenes—either research focused or integrated under the hood of its recommendation algorithms and content moderation. There were no big plans for a consumer-facing AI product like a chatbot—particularly not when Zuckerberg’s attention was focused on the metaverse.
Generative AI began to take off with OpenAI’s release of ChatGPT, just as the Meta pivot was looking particularly unwise. With metaverse spending through the roof and consumers utterly uninterested, Meta’s stock hit a seven-year low, inspiring headlines like, “How Much Trouble Is Mark Zuckerberg In?” The company began laying off thousands of employees.
Meta’s first widely noticed foray into gen AI didn’t fare much better. In November 2022, FAIR released a demo of an LLM chatbot, trained on scientific texts, called Galactica. Like previous FAIR models, Galactica was released as open-source, allowing free access to the “brains” of the model. This openness was meant to enable researchers to study how Galactica functioned.
But these were the days before the public was fully aware of LLMs’ tendency to hallucinate—to sometimes spit out answers that are convincing, confident, and wrong. Many scientists were appalled by the Galactica chatbot’s very unscientific output, which included citing research papers that didn’t exist, on topics such as how to make napalm in a bathtub; the benefits of eating crushed glass; and “why homosexuals are evil.” Critics called Galactica “unethical” and “the most dangerous thing Meta’s made yet.”
After three days of intense criticism, Meta researchers shut down Galactica. Twelve days later, OpenAI released ChatGPT, which quickly went viral around the world, tapping into the cultural zeitgeist (despite its own serious hallucination issues).
Bruised but undeterred, researchers at FAIR spent the winter fine-tuning a new family of generative AI models called LLaMA (short for Large Language Models Meta AI). After the Galactica backlash, Meta was cautious: Instead of fully opening the code and model weights to all, Meta required researchers to apply for access, and no commercial license was offered. When asked why, LeCun responded on X: “Because last time we made an LLM available to everyone…people threw vitriol at our face and told us this was going to destroy the fabric of society.”
Despite these restrictions, the full model leaked online within weeks, spreading across 4chan and various AI communities. “It felt a bit like Swiss cheese,” Nick Clegg, Meta’s president of global affairs, says of the failed attempt to keep Llama behind closed doors. Meta filed takedown requests against sites posting the model online in an attempt to control the spread. Some critics warned of serious repercussions and excoriated Meta: “Get ready for loads of personalized spam and phishing attacks,” cybersecurity researcher Jeffrey Ladish posted on X.
The consternation even reached Capitol Hill. In June 2023, two U.S. senators wrote a letter to Zuckerberg, criticizing Llama’s release and warning of its potential misuse for fraud, malware, harassment, and privacy violations. The letter said that Meta’s approach to distributing advanced AI “raises serious questions about the potential for misuse or abuse.”
But at the same time, LeCun says, he and other Meta leaders were taken aback by the sheer demand for the leaked Llama model from researchers and developers. These would-be users wanted the flexibility and control that would come with open access to a profoundly powerful LLM. A law firm, for example, could use it to train a specialized model for legal use—and own the intellectual property. A health care company could audit and manage the data behind the model, ensuring HIPAA compliance. Researchers could experiment and examine the inner workings of the model. “We got incoming requests from people who said, ‘You have to open-source that stuff. It’s so valuable that you could create an entire industry, like a new internet,’” LeCun says
Messages came directly to Zuckerberg, to CTO Andrew “Boz” Bosworth, and to LeCun, leading to weekly calls in which the leaders debated what they should do. Should they open-source the next release? Did the benefits outweigh the risks? By midsummer, Zuckerberg’s mind was made up, with backing from Pineau and LeCun—leading to the big July 2023 reveal.
Cayce Clifford for Fortune
Llama 2 was not entirely open. Meta did not disclose the datasets—including all that Facebook and Instagram material—used to train the model, which are widely regarded as its key competitive advantage. It also restricted usage by companies with more than 700 million monthly active users, primarily meant to deter Meta’s Big Tech competitors. But the source code and model weights could be downloaded, and Meta encouraged users to contribute improvements, bug fixes, and refinements of results to a collaborative community.
Even before the Llama 2 release, Zuckerberg had laid the groundwork to treat it like Meta’s next big thing. After the first Llama model was released, in February 2023, Zuckerberg quickly put together a team from across the company, including FAIR, to focus on accelerating generative AI R&D in order to deploy it in Meta app features and tools. He chose Ahmad Al-Dahle, a former Apple executive who had joined Meta in 2020 to work on metaverse products, to lead the new team.
At an internal all-hands meeting in June 2023, Zuckerberg shared his vision for Meta’s AI-powered future. Meta was building generative AI into all of its products, he said, and he reaffirmed the company’s commitment to an “open science-based approach” to AI research. “I had a big remit,” Al-Dahle says: “Develop state-of-theart models; put them in product at record speed.”
In other words: It was game on for Llama.
Meta’s strategy can seem counterintuitive, coming from a company with $135 billion in annual revenue. Open-source software has typically been seen as a way to democratize technology to the advantage of small startups or under-resourced teams— the kinds scrambling to compete with giants like Meta.
In a July 2024 blog post called “Open Source Is the Path Forward,” Zuckerberg made it clear that giving away Llama is not an altruistic move. Open-sourcing, he said, would give Meta a competitive edge in the AI race—and could eventually make Llama the go-to platform for generative AI. Just as important, he wrote: “Openly releasing Llama doesn’t undercut our revenue, sustainability, or ability to invest in research like it does for closed providers” like OpenAI or Google.
Now that Llama has had a year-plus to prove itself, some are finding Zuck’s case persuasive. Shweta Khajuria, an analyst at Wolfe Research who covers Meta, calls releasing Llama as open-source “a stroke of genius” that will enable Meta to attract top talent, accelerate innovation on its own platform, develop new revenue sources, and extend its longevity. Already, she explains, open-sourcing Llama basically allowed Meta to quickly catch up to OpenAI, Google, and Anthropic, in part because thousands of developers are building and improving on Llama at a blistering pace. “If they had not open-sourced it, it probably would have taken a much longer time to be at bar with other frontier models,” she says.
Khajuria believes there will be plenty of new monetization opportunities for Meta down the line, such as subscription and advertising options for current Meta AI features based on Llama, as well as AI-powered in-app business messaging. “Meta benefits from having billions of users where Perplexity and Claude and ChatGPT don’t necessarily have that base,” she says. “Once they have a critical mass of users and usage around the world, they can monetize.”
Zuckerberg has also alluded to the fact that AI-generated content itself will be valuable (though others have criticized such content as “slop”). On the recent earnings call, Zuckerberg said: “I think we’re going to add a whole new category of content, which is AI-generated or AI-summarized content, or existing content pulled together by AI in some way, and I think that that’s gonna be very exciting for Facebook and Instagram and maybe Threads, or other kinds of feed experiences over time.”
Patrick Wendell is cofounder and VP of engineering at data and AI company Databricks, which released Meta’s Llama 3.1 models on its platform in July. He sees Meta’s move as much more far-reaching. If the internet was the first big wave of technology, which enabled Facebook’s creation, and mobile was the second, dominated by Apple and Google, “I think [Zuckerberg’s] calculus is the third big wave is coming, and he does not want to have one or two companies completely control all access to AI,” Wendell says. “One way you can avoid that is by basically commoditizing the market, giving away the core IP for free…so no one gains a monopoly.”
Some critics argue that Meta shouldn’t be using the term “open-source” at all. Current versions of Llama still have restrictions that traditional open-source software doesn’t (including lack of access to datasets). In October, the Open Source Initiative, which coined the term, criticized Meta for “confusing” users and “polluting” the nomenclature, and noted that Google and Microsoft had dropped their use of the term (using the phrase “open weights” instead). Clegg, Meta’s global affairs chief, is blunt in his rebuttal: He says the debate reminds him of “folks who get very agitated about how vinyl is the only true kind of definition of good music.” Only a handful of scientific and low-performing models would fit the definition, he continues: “No one has copyright IP ownership over these two English words.”
Nomenclature aside, Meta is winning where it matters. Nathan Lambert, a research scientist at the nonprofit Allen Institute for AI, says that while definitions might be quibbled about, more than 90% of the open-source AI models currently in use are based on Llama. Open-source coders accept that Zuckerberg “has some corporate realities that will distort his messaging,” he says. “At the end of the day, the community needs Llama models.
Internally at Meta, Llama and revenue-generating businesses are increasingly inextricable. In January, Zuckerberg moved FAIR, the AI research group, into the same part of the company as the team deploying generative AI products across Meta’s apps. LeCun and Pineau now report directly to chief product officer Chris Cox, as does Al-Dahle. “I think it makes a lot of sense to put [FAIR] close to the family of app products,” says Pineau; she points out that even before the reshuffle, research her team worked on often ended up in Meta products just a few months later.
Zuckerberg also tasked FAIR with something far more ambitious: developing artificial general intelligence (AGI), a type of AI that possesses humanlike intelligence. The company prefers to use the term AMI (“advanced machine intelligence”), but whatever it’s called, Pineau says, Meta now has a “real road map” to create it—one that relies, presumably, on a thriving Llama. Meanwhile the company is hard at work on Llama 4 models currently being trained on a cluster of over 100,000 pricey Nvidia GPUs, a cluster that Zuckerberg recently said was “bigger than anything that I’ve seen reported for what others are doing.”
Not everyone loves the idea of a bigger-than-anything Llama. For years, Zuckerberg and his company have grappled with public mistrust over the way it has used other types of AI to personalize news feeds, moderate content, and target ads across Facebook, Instagram, and WhatsApp. Critics have accused its algorithms of exacerbating political polarization, adolescent mental-health crises, and the spread of misinformation (accusations Meta has denied or rebutted); it was perhaps inevitable that Llama would face extra scrutiny.
Some critics fear that an open-source model like Llama is dangerous in the hands of malicious actors, precisely because it’s too open. Those concerns may grow in today’s tense geopolitical atmosphere. On Nov. 1, Reuters reported that China’s army had built AI applications for military use on the back of an early version of Llama.
An incoming Trump administration could make it even more complicated to keep Llama open. Trump’s economic nationalism would suggest that he would certainly not want China (or any other country) to access American-made state-of-the-art AI models. But Llama’s future may depend on who has Trump’s ear: Vice President–elect JD Vance has spoken out in support of open-source AI in the past, while Elon Musk’s xAI has open-sourced its chatbot Grok (and Musk famously cofounded OpenAI as an open-source lab).
Even some of Zuckerberg’s oldest friends have concerns about this kind of arms race. Dustin Moskovitz, a cofounder of Facebook and now CEO of Asana (and the founder of Open Philanthropy, one of the biggest funders of AI safety initiatives), says that while he is not against open-source LLMs, “I don’t think it’s appropriate to keep releasing ever more powerful versions.”
But Zuckerberg and his allies, both within Meta and without, argue that the risks of open-source models are actually less than those built behind proprietary closed doors. Preemptive regulation of theoretical harms of open-source AI will stifle innovation, they say. In a cowritten essay in August, Zuckerberg and Spotify cofounder Daniel Ek noted that open-source development is “the best shot at harnessing AI to drive progress and create economic opportunity and security for everyone.”
Whatever the outcome of Meta’s increasingly loud open-source activism, many argue that Zuckerberg is exactly the right messenger. His personal involvement in promoting Llama and open-source, insiders agree, is the key reason Meta has been able to move with such speed and focus. “He’s one of a few founder leaders left at these big tech companies,” says Clegg. “One of the great advantages of that means you have a very short line of command.”
Zuckerberg also has been active in recruiting AI talent, often reaching out personally. A March 2024 report said that Zuckerberg had been luring researchers from Google’s DeepMind with personal emails in messages that stressed how important AI was to the company.
Erik Meijer, who spent eight years at Meta leading a team focused on machine learning—before being laid off in November 2022—believes such a total shift is only possible with someone like Zuckerberg at the top. “It’s like pivoting a giant supertanker,” he says. “He’s a little bit like a cult hero inside the company, in a good sense, so I think that helps get all the noses in the same direction.” Zuckerberg’s new personal makeover, Meijer mused, is “maybe a very externally visible sign of renewal.”
Zuckerberg’s renewal, and Meta’s transformation, are sure to test investor patience due to skyrocketing capital expenditures. Khajuria, the Wolfe analyst, says investors will tolerate it for now “because Meta has laid the groundwork of telling folks what the opportunity is.” That said, if revenue does not begin accelerating, exiting 2025 into 2026, “I think investors will start losing patience,” she warns. (Zuckerberg is somewhat insulated from investor discontent; he controls about 61% of voting shares at Meta.)
One thing is clear, LeCun says: The kind of gamble Meta is taking, with its massive investment in GPUs and all things generative AI, requires a leader willing to take big swings. And Meta has not only that leader, but a massively profitable core business to fund the vision. As a result, Meta is back at the center of the most important conversation at the intersection of tech and business—and it’s not a conversation about legless metaverse avatars.
This article appears in the December 2024/January 2025 issue of Fortune as part of the 100 Most Powerful People in Business list.
CORRECTION: An earlier version of this article misstated the title of Patrick Wendell. He is cofounder and VP of engineering at Databricks, not cofounder and CTO.