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

  • G0ldenSp00n@lemmy.jacaranda.club
    link
    fedilink
    arrow-up
    4
    ·
    4 months ago

    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.

      • G0ldenSp00n@lemmy.jacaranda.club
        link
        fedilink
        arrow-up
        4
        ·
        4 months ago

        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.devOP
          link
          fedilink
          arrow-up
          1
          ·
          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.