← all repositories

harvardnlp/pytorch-struct

GPU-accelerated differentiable implementations of conditional random fields and structured prediction algorithms for PyTorch.

1.1k stars Jupyter Notebook ML Frameworks
pytorch-struct
Velocity · 7d
+0.5
★ / day
Trend
steady
star history

This library provides fast, tested, GPU-optimized implementations of core structured prediction algorithms designed as efficient batched layers for PyTorch deep learning models. It includes LinearChain-CRF, DependencyTree-CRF, PCFG, HMM, and SemiMarkov-CRF variants. The algorithms are fully differentiable, supporting backpropagation through partition, marginals, and argmax operations. A tutorial paper on arXiv describes the methodology behind the library.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.