what can I really do with mojo at the moment?

Hi, I have been following Mojo since release but still haven’t seen any project i could use. 1. We always see mojo is meant to be used for ai but as far as i know there is no pytorch/flux or similar. So how would i be able to train my goof vector to sequence model? What would be the real diff vs using pytorch with cuda? 2. I have another usecase where i build high speed libraries with rust that scan over hashmaps in memory and provide ms response. Would mojo allow me to do something similar?
3 Replies
Martin Dudek
Martin Dudek8mo ago
You might want to look at https://github.com/mzaks/mojo-hash for hashmap related implementations in Mojo. In case you haven't seen, there is Basalt https://github.com/basalt-org/basalt which is among the most mature, higher level, high quality, Mojo projects. Not a pytorch replacement for now, but showcasing what is and will be possible with Mojo. For me, getting involved in Mojo now is a bit like speculating on its promising future. It is still young, breaking changes with every new version and quite some rough edges to deal with. But no doubt for me, it is fast already, low level language features for vectorization and parallelization are already available for example, and there is a team of very skilled people behind this ambitious project.
GitHub
GitHub - mzaks/mojo-hash: A collection of hash functions implemente...
A collection of hash functions implemented in Mojo - mzaks/mojo-hash
GitHub
GitHub - basalt-org/basalt: A Machine Learning framework from scrat...
A Machine Learning framework from scratch in Pure Mojo 🔥 - basalt-org/basalt
Analista
AnalistaOP8mo ago
I definitely want to to give it a try. I have a local search solver written in julia which has to run ml inferance of a model trained in pytorch. Right now i load the model as onnx but my idea would be to build a runnable in mojo and check how fast is inference time. I read this is possible to be done with python and mojo so i guess will be the sane with julia. Similarly i will try to compare performance of small rust libraries with mojo. Idea is to load some data in memory and aggregate as per user calls in ms
Martin Dudek
Martin Dudek8mo ago
you might want to have a look at https://github.com/tairov/llama2.mojo too . The author of it did some extensive speed comparison with different language ports https://engiware.com/benchmark/llama2-ports-extensive-benchmarks-mac-m1-max.html i dont know how much these results can be generalized but it seems clear that Mojo has all the performance capacities we are looking for. As you said, its not on GPU yet, so right now we are talking CPU when it comes to performance.
GitHub
GitHub - tairov/llama2.mojo: Inference Llama 2 in one file of pure ...
Inference Llama 2 in one file of pure 🔥. Contribute to tairov/llama2.mojo development by creating an account on GitHub.
Llama2 Ports Extensive Benchmark Results on Mac M1 Max
Mojo 🔥 almost matches llama.cpp speed (!!!) with much simpler code and beats llama2.c across the board in multi-threading benchmarks
Want results from more Discord servers?
Add your server