Hacker GitHub

← All repos

LaurentMazare/tch-rs

View on GitHub ↗ ★ 5,516 Rust

Rust bindings for the C++ api of PyTorch.

12 mentions on Hacker News by 12 people: 2 stories, 10 comments · first 2020-01-31 · latest 2023-12-07

Mentions per year 12 mentions · busiest year 2023 (5)
20082026
  1. ▲ 1
    Rust bindings for the C++ API of PyTorch
    story by cs702 · 2023-12-07 · 0 comments
  2. …I'm wondering if HuggingFace just hired them to work on candle full time? [0]: Also maintainer of https://github.com/LaurentMazare/tch-rs
    comment by polyrand · 2023-08-08 · in Candle: Torch Replacement in Rust
  3. …and lose performance compared to using torchlib. I wrote a forgettable llama implementation for https://github.com/LaurentMazare/tch-rs (pytorch's torchlib rust binding). Still not ideal but at least you get the same GPU performance you…
    comment by jokethrowaway · 2023-08-06 · in Llama2.rs: One-file Rust implementation of Llama2
  4. …a C wrapper around PyTorch's C++ API, and Rust's PyTorch bindings use OCaml's C wrapper. See: https://github.com/LaurentMazare/tch-rs
    comment by Buttons840 · 2023-06-16 · in Playing Atari games in OCaml
  5. If you pefer to see it in code there's a succint gpt implementation here https://github.com/LaurentMazare/tch-rs/blob/main/examples/m...
    comment by ianpurton · 2023-04-06 · in Simply explained: How does GPT work?
  6. PyTorch has libtorch as its purely native library. There are also Rust bindings for libtorch: https://github.com/LaurentMazare/tch-rs I used this in the past to make a transformer-based syntax annotator. Fully in Rust, no Python required:…
  7. ▲ 4
    Show HN: Stable Diffusion implementation in Rust/libtorch
    story by l-m-z · 2022-10-31 · 0 comments
  8. …and their dependencies, or? It checks a known registry or reads package metadata. > I'm using https://github.com/LaurentMazare/tch-rs/ (rust bindings for pytorch's c++ api). Depending on the hardware I'm building for I either need to…
  9. …How does it do this? Just a list of known packages and their dependencies, or? I'm using https://github.com/LaurentMazare/tch-rs/ (rust bindings for pytorch's c++ api). Depending on the hardware I'm building for I either need to download a…
  10. …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 ->…
  11. I suppose you could, but I believe that there are direct bindings from Rust to Pytorch at https://github.com/LaurentMazare/tch-rs . I haven't used it personally, but I've heard fairly good things about it's correctness and responsive…
    comment by qchris · 2020-04-18 · in Writing Python inside Rust
  12. You can use PyTorch Rust bindings [1] or OCaml bindings [2]. [1] https://github.com/LaurentMazare/tch-rs [2] https://github.com/LaurentMazare/ocaml-torch