Hi everyone :wave: A curious thought: what if we c...
# kotlindl
m
Hi everyone đŸ‘‹ A curious thought: what if we could bring KotlinDL back to life with a new Kotlin Multiplatform engine underneath—and run it on more platforms? Would anyone here be interested in exploring this together?
p
Hi Michal! I have a question, what is the motivation for using kotlinDL across multiple platforms?
m
That's the core of it, actually. The motivation isn't really "run KotlinDL on more platforms" for its own sake. It's that intelligence is moving into the app. Once part of the model runs on-device (privacy, latency, offline), it has to run wherever the app runs - Android, iOS, desktop, native, WASM, etc. So multiplatform isn't a feature we're chasing; it's what falls out of putting the model in the app. I'm building this through SKaiNET (Alpha stage) a new KMP-native engine. KotlinDL compatibility would sit on top as a revival layer. You've built several KMP libraries yourself, does that framing resonate or would you approach it differently?
Hi @Pavel Gorgulov, just following up in case this got buried. I explored this approach some time ago and already had a working prototype. There is still a lot of work to do, but it suggests that the direction is realistic. The priority would be to bring KotlinDL back to life by extending it with a KMP-native engine, not replacing its existing architecture or backends. The idea is to preserve the familiar KotlinDL API and add a new execution path that enables deployment across Android, iOS, desktop, native, and potentially WASM. Given your experience with KotlinDL and KMP libraries, I’d really value your perspective on whether this approach makes sense.
p
Sorry @Michal Harakal, I really missed your reply. Regarding multiplatform for KotlinDL, I am actually not sure. In my view, the multiplatform ML niche is quite free, but I have doubts about KotlinDL. As I recall, KotlinDL uses Tensorflow under the hood, which makes using it in multiplatform difficult. If users have to deal with cpp issues, it complicates the approach. But maybe I am missing something. Anyway, it is hard for me to assess the need for such a solution right now. Besides, I am currently following new projects that mainly focus on LLM. Projects like cactus and llamatik look promising.
m
Thanks, @Pavel Gorgulov. I also appreciate you taking the time to respond . Your response helped me realize that I may be framing this around the wrong project. Reviving KotlinDL was initially a way to preserve a familiar API and reconnect with the existing Kotlin ML ecosystem, but it is not the core goal. SKaiNET is an independent Kotlin Multiplatform ML/AI framework. It covers model definition, training, inference, data processing, and the composition of complete AI pipelines. For on-device execution, it uses a compilation path based on LLVM and IREE. The broader idea is Kotlin as the language for building smart applications, not just calling a single LLM. Take an on-device audio pipeline: microphone input, voice activity detection, speech recognition, intent recognition or function calling, application logic, and text-to-speech. The models are only part of the system. The rest is data transformation, orchestration, concurrency, privacy and integration with application code. SKaiNET aims to make the entire pipeline, from model definition and training to deployment and application integration, expressible in Kotlin across platforms, while LLVM and IREE provide the lower-level execution path. Projects like Cactus and Llamatik validate the demand for individual on-device AI runtimes. SKaiNET explores the broader layer where models, training, runtimes, and application logic come together as one Kotlin-native system. So perhaps the better question is: do you see value in Kotlin becoming the language for building complete smart applications, rather than only integrating individual model runtimes?
p
From my point of view, specifically - yes. But... It is difficult to compete with python in terms of development itself, and there seems to be no practical point in doing so. Python has an established ecosystem, large, advanced frameworks like PyTorch and TensorFlow, and integration with other computational libraries. There is inertia, a community, and LLM even generate better python code. Plus the downsides of JVM. All this leads to researchers finding it easier and faster to use python. But inference and actual applications remain with Kotlin. That is exactly where I see Kotlin. Building a full-scale ML/AI framework is a very ambitious goal. I would consider starting by unifying the platform APIs on iOS and Android, meaning NNAPI and CoreML, to make it easier for users to build ML/AI apps on Kotlin Multiplatform. In my opinion, this is currently a pain point for users. And then gradually deepening and complicating this idea