Yahoo has pledged to pay its shareholders at least half the proceeds from Alibaba Group Holding’s mega-IPO this autumn and plans to keep a larger stake in the Chinese e-commerce company than expected.

Yahoo's roughly 24% stake in the world's largest Internet retailer is viewed on Wall Street as its most prized asset. 

Last night, it said Alibaba had agreed to reduce the number of shares Yahoo is required to sell in the IPO to 140 million shares from 208 million previously.

That news helped offset the US company's disappointing results. 

Yahoo also forecast third-quarter net revenue, excluding fees paid to partner websites, of $1.02bn-$1.06bn, less than the $1.1bn Wall Street analysts had expected on average.

"What you see is the fundamentals at core Yahoo continue to deteriorate, but there's at least some good news on the Alibaba front," said Macquarie Research analyst Ben Schachter.

"The idea is that Yahoo shareholders can participate and benefit from the upside to Alibaba post the IPO, as opposed to just having to sell more stock in the IPO."

Alibaba is expected to list its shares on the New York Stock Exchange later this year in what could be the largest ever US technology initial public offering. 

Investors have valued the company, which handles more e-commerce than and eBay combined, at as much as $200bn.

Finance chief Ken Goldman said in a statement accompanying Yahoo's results that the company was committed "to return at least half of the after-tax IPO proceeds to shareholders."

Yahoo is trying to revitalise a stagnant online advertising business as chief executive Marissa Mayer marks her two-year anniversary at the internet company.

The former Google executive has revamped many of Yahoo's web products but its ad sales are still weak while rivals such as Google and Facebook continue to post strong, double-digit revenue growth.

Yahoo's net revenue, which excludes fees paid to partner websites, decreased 3% year-on-year to $1.04bn in the three months ended 30 June. Analysts polled by Thomson Reuters IBES were looking for net revenue of $1.084bn.

Revenue in Yahoo's display advertising business decreased 8% to $436m in the second quarter. 

The average price per ad decreased 24%, while the number of display ads sold increased 24%.

Shares of Yahoo were barely changed at $35.57 in after-hours trading.