(Reuters) - Yahoo Inc has appointed management consulting firm McKinsey & Co to help with the reorganization of its core businesses, technology news website Re/code reported on Monday.

McKinsey will help Yahoo decide which units to shut, sell or invest in, Re/code said, citing several people close to the situation. 

Yahoo, which is preparing to spin off its 15 percent stake in Chinese e-commerce giant Alibaba Group Holding Ltd, declined to comment, as did McKinsey.

Yahoo has been struggling to boost revenue from ad sales in the face of stiff competition from Google and Facebook Inc.

Under Chief Executive Marissa Mayer, Yahoo has been trying to revive its core media and online advertising business by spending more to get users on its websites.

There has been little progress, however.

After deducting fees paid to partner websites, Yahoo's revenue fell to $1.0 billion in the third quarter from $1.09 billion a year earlier, and the company forecast a drop to $920 million-$960 million in the current quarter.

Top executives at Yahoo have been asked by Mayer over the last month to make three to five-year commitments to the company, sources told Re/code.

Several top executives, including Media head Kathy Savitt and Chief Development Officer Jackie Reses, have left in the last couple of months.

Re/code said Yahoo insiders expect at least two people reporting directly to Mayer to leave the company.

(Reporting by Abhirup Roy in Bengaluru; Editing by Savio D'Souza and Ted Kerr)