# hasktorch/hasktorch

Tensors and neural networks in Haskell

Repository: https://github.com/hasktorch/hasktorch
Canonical: https://ross.abutalabs.com/products/hasktorch
Homepage: http://hasktorch.org
Language: Haskell
License: NOASSERTION
License Family: other
Last push: 2026-08-19T12:18:32+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 35, longevity 100
- inputs: {"age_days": 3280, "days_push": 14, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1211, forks 125 (observed 2026-08-28T04:04:00.209265+00:00)

## What it is
Hasktorch is a Haskell library for tensor math and neural networks, built on bindings to the C++ libtorch libraries that power PyTorch. It provides GPU support, automatic differentiation, and type-safe functional programming abstractions for building differentiable programs.

## Use cases
- build neural networks in Haskell
- train deep learning models with type-safe tensors
- do automatic differentiation in a functional language
- run tensor computations on GPU with CUDA or MPS
- research differentiable programming in Haskell

## When to choose
- you are a Haskell developer wanting to do machine learning
- you want type-level guarantees on tensor shapes and models
- you prefer functional programming idioms for neural network composition
- you want PyTorch-backed performance without leaving Haskell

## When to avoid
- you need a mature ecosystem with many pretrained models and tutorials
- your team works primarily in Python
- you need production ML tooling with broad community support
- you cannot tolerate evolving APIs during active development

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, math
- domain: machine-learning, deep-learning
- platform: cross-platform
- tags: haskell, tensors, neural-networks, libtorch, pytorch-bindings, automatic-differentiation, cuda, functional-programming, linux, macos, gpu

## Member repositories
- hasktorch/hasktorch (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:00.209265+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:18:03.757591+00:00, confidence not recorded.
  - readme: https://github.com/hasktorch/hasktorch (fetched 2026-08-28T04:04:00.209265+00:00, sha 5c5a1256ad8b)
  - homepage: http://hasktorch.org (fetched 2026-08-29T12:25:57.659322+00:00, sha 25ac4572e2d9)
  - site_page: http://hasktorch.org/docs.html (fetched 2026-08-29T12:25:57.668239+00:00, sha bfac5abc67ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
