The world's largest technology companies are starting to make real money from artificial intelligence (AI), but they are spending on infrastructure at nearly twice the rate at which they are generating new cash flow, a gap that is set to widen through 2027.