Meta plans major workforce reduction as artificial intelligence costs escalate.