Sorry if this is not the appropriate place to ask ...
# kotlindl
a
Sorry if this is not the appropriate place to ask but do you think kotlinDL and Kinference will collaborate in the future ? Maybe (maybe not) there is some overlap in making KotlinDL ONNX friendly and some other work being done by JetBrains in executing ONNX models in kotlin https://github.com/JetBrains-Research/kinference. Maybe it's a naive idea but such collaboration could ensure KotlinDL is compatible with KInference and who knows maybe there is some work already done by one team that could help the other. I was just wondering what you think about it. Thanks
z
It's the best place to ask; I suppose @Alexandre Brown. First of all, I need to say that we will release experimental ONNX support in the 0.3 release. I have been watching with interest the kinference project for the last year and what features are being added there. As far as I know, this project primarily serves for internal purposes and has its own runtime written in pure Kotlin. This is an interesting idea and implementation, especially solving the problem of parsing onnx models. However, the goal of the project, as it seems to me, is to support only those operators that are used in some NLP models. This makes integration difficult at the current stage. But you're right, there needs to be some clarity here both for the community and between frameworks. I will try to contact the authors of the frameworks to clarify their development plans. The experience of implementing some operators, in particular LSTM / GRU for inference in pure Kotlin, also looks interesting.
Could I ask you @Alexandre Brown what kind of models do you want to use with ONNX? (CV, NLP, GANs, custom, or some classic). Are you interested in inference only or some model fine-tuning (transfer-learning?)
a
Thanks for the clarification @zaleslaw, I would be interested by the CV models (Semantic Segmentation, Image classification, Object detection). We are developing our own base model to do transfer learning for some of our other models. We are at the very early stage of development, we have a prototype in PyTorch (a UNet model basically). That being said, I'm keeping an eye on KotlinDL as I come from a Kotlin background and I think it could be interesting in the future.
р
@Alexandre Brown you can run and train torchscript models in kotlin with our prototype in kmath: https://github.com/mipt-npm/kmath/tree/feature/noa/kmath-noa any feedback is welcome. I believe KotlinDL relying on tensorflow, and kInference indeed have their own implementations and they aim to KMP
a
Great thanks @Ролан, We'll give it a shot