hasktorch

Haskell bindings to libtorch, supporting both typed and untyped tensors.

https://github.com/hasktorch/hasktorch#readme

Stackage Nightly 2026-06-08:0.2.2.0
Latest on Hackage:0.2.2.0

See all snapshots hasktorch appears in

BSD-3-Clause licensed by Hasktorch Contributor Team
Maintained by [email protected]
This version can be pinned in stack with:hasktorch-0.2.2.0@sha256:8e1c153f188de6a26a51be93eae62141c6c1be0c82811fcec653ca21dcea2331,11045

Module documentation for 0.2.2.0

Hasktorch is a library for tensors and neural networks in Haskell. It is an independent open source community project which leverages the core C++ libraries shared by PyTorch.

Changes

Changelog for hasktorch

0.2.2.0

  • Add support for Stackage lts-23.24 (GHC 9.8); the previous release used GHC 9.6.
  • Add BFloat16 to DTypeIsFloatingPoint and KnownDType.
  • Implement the AdamW optimizer.
  • Expose the parameter group interface for CppOptim (per-group Adam/AdamW options).
  • Implement non-blocking host-to-device transfer.
  • Remove partial signatures from Torch.Typed.NN.Convolution.