Meta informed its employees on Thursday that the company will lay off around 10% of its workforce—approximately 8,000 employees—on May 20. This decision impacts a workforce of more than 78,000, Bloomberg first reported.

The company will also close 6,000 open roles it had planned to fill, according to an internal memo sent to staff by Meta’s chief people officer, Janelle Gale.

The memo, obtained by Business Insider, attributed the cuts to Meta’s “continued effort to run the company more efficiently and to allow us to offset the other investments we’re making.” While the memo did not specify what those “other investments” entail, Meta has publicly emphasized its focus on artificial intelligence (AI).

Earlier this year, Meta announced plans to spend up to $135 billion on AI initiatives. This week, reports emerged that the company would track employees’ mouse movements and keystrokes to train AI models. Last week, the Financial Times reported that Meta was developing an AI clone of CEO Mark Zuckerberg.

Meta confirmed Bloomberg’s reporting, attributing the layoffs to boosting efficiency and offsetting the company’s “heavy spending on artificial intelligence.” The company declined to comment further.

“This is not an easy tradeoff and it will mean letting go of people who have made meaningful contributions to Meta during their time here.”

Impacted employees will receive “generous severance packages,” including:

  • 16 weeks’ base pay
  • Two weeks’ pay for every year of employment
  • COBRA health coverage for 18 months

The memo concluded with an acknowledgment of the uncertainty: “I know this leaves everyone with nearly a month of ambiguity which is incredibly unsettling. We will try to answer your questions here in the comments but as we’re still working through the details we aren’t able to share much more until later in May.”

Meta, along with other tech giants Alphabet, Amazon, and Microsoft, is set to report its first-quarter earnings next year. The company’s shares fell 2.4% today.