Mobile edge computing (MEC) plays a crucial role in meeting the demands of the future digitized world by providing widespread computational capabilities and seamless integration with emerging technologies such as 6G, Internet of Things (IoT), blockchains, and artificial intelligence (AI). This paper proposes a novel edge and split computing architecture orchestrated by cooperating machine learning elements across network elements. The algorithm optimizes task partitioning, accuracy, and transmission delay in dynamic environments. Evaluations show its superiority in reducing task calculation failures and achieving high precision. Potential applications include smart city domains like autonomous driving, car sharing, robotic delivery, and public transportation.