Hi all may I know are there any good ML frameworks / bindings in Nim ?
I am myself building a bindings for mlpack and it is just near completion I will release them soon,
I wanted to know did anyone know any great ml frameworks in Nim? Nim should be made as language for ML and AI inference also therefore I am asking,
I have plan to make additional bindings for other ml frameworks and inference also but I want to know the current situation.
Note I know about SciNim : https://github.com/orgs/SciNim/repositories
But it's project are too advanced currently not directly suitable for beginners entry into AI ML in Nim,
They are great but lack examples to use more specifically some project should be made using them but they are not good to be used directly for beginners.
https://github.com/mratsim/Arraymancer
Maybe. I was able to make a simple DQN a few years ago with it
https://github.com/Niminem/DeepLearningNim
I was a beginner then too, just following along YouTube tutorials but applying arraymancer instead of numpy
The Deep learning Nim is is a good start for making in pure nim but it is too basic,
By beginners I don't mean I am a beginner but I want to design frameworks/ binding which even anyone can use, I already use and do ML in python but I want such ecosystem in nim too,
Currently I think to bring cpp libs in Nim, Arraymancer is like Rust ndarray I earlier tried to make numpy alternative in rust but the project is moving very slowly and need dedicated time, which is the reason I avoid a single project from basic.
Creating anything from basic will cost a lot of time, therefore my focus should is also on cpp target that Nim support, I think Nim cpp has much great future equally as c if it is used correctlly, just fixing the concept on system and C will not help in every domain nor can we wait for maintaining and appearance of stable c api for many useful libs like mlpack,
I don't know the performance of Arraymancer is comparable to rust ndarray and numrs(https://github.com/rjaguiluz/numrs/tree/main/bindings/numrs-c) but I will try to use it (but I think it will not influence me similar to how rust ndarray failed to influence)
So far Nim cpp is much better and faster than haxe hxcpp if haxe is mostly useful due to that then we should value Nim cpp also.
Nim is easiest compiled language I have seen ever similar to golang therefore it inspire me as a replacement for python in ML
Nim has good potential for ML. But having good potential is not enough. A lot of dedicated effort required to make language not just good potential but actually good for ML.
Like having standard algos, plots etc work out of the box.
And features like interactivity, I doubt many people going to use lang for day to day work like exploratory data analysis, learning or experimenting without shift + enter executing current line in VS Code, etc.
Those features are not minor, they are must have basics.
It is not possible to make many things like xgboost lightgbm and other completely in Nim for now it need dedicated time and team. But it can be utilised so easily by bindings and will not need python bridge.
And if we continue that soon Nim ml ecosystem can be as comparable as Rust, even many people doubted Rust but slowly over period Rust as we can see is improving it's ML ecosystem, infact few of best vector storage for RAG are in Rust.
If we continue to watch will only lag behind in it.
I think You should see this : https://github.com/vaaaaanquish/Awesome-Rust-MachineLearning
Even zig coders are trying to enter the ML domains (we know how zig is (so much changing stdlib) still they are trying) like : zml https://github.com/zml/zml
And it is not the problem of Nim it is our non serious nature and laziness.
I've been trying to keep up with my limited time to maintain https://github.com/SciNim/flambeau. I've recentlt pushed more change and updated torch version. Flambeau is Nim bindings to C++ lib-torch, trying to make a higher level API on top of it for ergonomic usage.
I'm also maintaining https://github.com/SciNim/nimjl/tree/master/nimjl which are bindings to the Julia language so you can embed the Julia interpreter into a Nim binary and get benefit of both language. Julia has a great scientific computing ecosystem !
Your project are actually very well and You did the harder work already, but currently I can't understand how exactly I can use them and if there will be examples or documentation of using them I will appreciate a lot.
If I once understand how exactly to use SciNim correctly I will personally make many examples and contribution to SciNim project.
I would also appreciate if You can can make example of python workflow and side by side counter example in SciNim.
Also it will be useful if You can provide Colab example of how exactly we can make or train model using SciNim because it provide a good environment for testing.
A question might arise why and how ? because without colab there is no big advantage of frameworks if they can't utilise it.
it is much easy and I hope You know better :
!curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y
os.environ['PATH'] = f"{os.environ['HOME']}/.nimble/bin:{os.environ['PATH']}"
%%bash
cat << 'EOF' > example_scinim.nim
EOF
And finnally running that :
%%bash
nim cpp -d:release
-- all other SiNim specification example_scinim.nim
./example_scinim
And finally I would like to say You have made something very rare and useful and Do at Your own pace no hurry.
And it is not the problem of Nim it is our non serious nature and laziness.
I don't see the need of guilt-tripping people who 99% of the time are coding in Nim as a hobby.
Otherwise that reads as entitlement, you're asking a community of a couple hundreds people to compete with Facebook+Google+Microsoft+Baidu+Alibaba+Apache Foundation+Red Hat+Open AI+Intel+Nvidia and that's only the high-profile companies.