Understanding sequence modeling in AI