News for hackers. Stuff that matters.
Re:Swift for TensorFlow – A system for deep learning and dif... by cs702 on Sunday September 20, 2020 @10:01AM (#24534093)
A Rust for TensorFlow (and/or a "RustTorch") would be awesome.

I hope all the work being done on improving incremental compilation[a] and developing interactive Rust REPLs like evcxr[b] makes using Rust for AI a practical reality.

[a] https://doc.rust-lang.org/edition-guide/rust-2018/the-compil...

[b] https://github.com/google/evcxr

Re:Swift for TensorFlow – A system for deep learning and dif... by anoncept on Sunday September 20, 2020 @11:16AM (#24534492)
As a starting point, maybe take a look at the 'tch' crate [1] and the 'rust-bert' crate [2] built on top of it?

[1]: https://github.com/LaurentMazare/tch-rs -> https://crates.io/crates/tch

[2]: https://github.com/guillaume-be/rust-bert -> https://crates.io/crates/rust-bert

Re:Swift for TensorFlow – A system for deep learning and dif... by danieldk on Sunday September 20, 2020 @01:58PM (#24535809)
tch-rs is really nice. I have built a Rust sequence labeler + dependency parser + lemmatizer on top of it. It supports multi-task learning, finetuning of BERT-like models, model distillation, etc.:

https://github.com/stickeritis/sticker2/

Unfortunately, when I started this guillaume-be's rust-bert crate wasn't around yet (I think), so I also ported some of the models from Huggingface transformers:

https://github.com/stickeritis/sticker-transformers/

At any rate, I can highly recommend the tch crate if you are looking to build neural networks in Rust.

Re:Swift for TensorFlow – A system for deep learning and dif... by adamnemecek on Sunday September 20, 2020 @11:29AM (#24534559)
I love Rust as much as the next guy but it's not the best language for numerics. Julia is really nice though.
Re:Swift for TensorFlow – A system for deep learning and dif... by nestorD on Sunday September 20, 2020 @12:20PM (#24534875)
There are torch bindings that are used by some users but what I personaly would like is a JAX clone built on top of Rust.

I see a way to do it [0] but... I already have a PhD to finish.

[0]: a macro compiling functions into an intermediate representations that are transformed with const functions (gradient computation) at compile time and jitted into XLA at runtime.

Re:Swift for TensorFlow – A system for deep learning and dif... by 6d65 on Sunday September 20, 2020 @10:09AM (#24534129)
I think there are official tensorflow bindings for Rust, add well as for pytorch C++ API.

But, adding auto differentiation to match the Swift for tensorflow behaviour, sounds like a serious undertaking, and I doubt is on anyone's radar.

But yeah, I've been wanting this for a while. Shoehorning Rust everywhere is the endgame.