Anthropic will commit 5% of its shares to a public benefit fund as the artificial intelligence company prepares for a blockbuster stock market listing.