this post was submitted on 30 Jun 2024
16 points (94.4% liked)

Rust

5999 readers
7 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?

you are viewing a single comment's thread
view the rest of the comments
[–] G0ldenSp00n@lemmy.jacaranda.club 4 points 4 months ago (3 children)

Been working through Andrej Karpathy's ML lectures in Rust. The backprop one went pretty well, but I had to learn how to do type indirection and interior mutabilty because of the backprop graph structure. I'm now on the makemore lecture, but having a lot of trouble building the bi-gram model in Burn (the rust native ML framework), because it seems like directly incrementing the tensor values is insanely slow. His example that takes like 10 seconds to run in Python takes two and a half minutes in Rust with Burn, so trying to figure out how to optimize or speed that up.

[–] secana@programming.dev 3 points 4 months ago (2 children)

How is the overall ML story with Rust? Is it usable in comparison to Python?

[–] G0ldenSp00n@lemmy.jacaranda.club 4 points 4 months ago (1 children)

So far I have only really scratch built backprop. And had severe performance problems with Burn trying to do something it probably wasn't built to do. Once I get further in makemore I should have a better idea.

[–] secana@programming.dev 1 points 4 months ago

I'm not ML pro and never used Python or Rust for it, but I know that our ML team uses Python extensively for it. My gut feeling is that Python stays the king in the ML field but the underlying libraries are going to progress from C++ to Rust in the future. Or at least, if Rust gets stronger math/statistics libraries. If you get something cool running with Rust and ML, I'm interested to read about it.