As Yahoo’s struggles continue, the company is looking to cut costs and dig up cash wherever it can. Yahoo announced plans last month to lay off 2,000 workers, or nearly 15% of its staff, and before that it filed a “puzzling” patent lawsuit against long-time partner Facebook. Now, Yahoo will sell half of its 40% stake in China-based retail giant Alibaba. Led by Chinese Internet entrepreneur Jack Ma, Alibaba will repurchase part of Yahoo’s holdings in the e-commerce firm for $7.1 billion as it prepares to take the company public. The deal, which was announced in a joint statement on Monday, will see Yahoo sell half its stake in Alibaba for $6.3 billion in cash and as much as $800 million in new preferred stock. Yahoo purchased its 40% stake in Alibaba in 2005 for $1 billion.