{"adoption": {"forks": 93, "observed_at": "2026-08-28T04:03:42.964536+00:00", "stars": 1133}, "canonical_url": "https://ross.abutalabs.com/products/pytorch-struct", "card": {"archived": false, "artifact_type": "library", "description": "Fast, general, and tested differentiable structured prediction in PyTorch", "domain": ["machine-learning", "deep-learning"], "enriched": true, "function": ["machine-learning", "deep-learning", "nlp"], "health_score": 20, "homepage": "http://harvardnlp.github.io/pytorch-struct", "language": "Jupyter Notebook", "license": "MIT", "license_family": "permissive", "maturity": "maintenance", "member_repos": ["harvardnlp/pytorch-struct"], "name": "harvardnlp/pytorch-struct", "platform": ["python"], "pushed_at": "2022-04-20T08:21:20+00:00", "repo": "harvardnlp/pytorch-struct", "stars": 1133, "tags": ["structured-prediction", "pytorch", "crf", "hmm", "pcfg", "dependency-parsing", "differentiable-computation", "natural-language-processing", "gpu"], "topics": [], "urls": [], "use_cases": ["compute differentiable marginals for linear-chain CRFs in PyTorch", "train hidden Markov models with deep learning models", "implement dependency parsing with a tree CRF layer", "run inside-outside algorithms for probabilistic context-free grammars", "sample and compute argmax from structured distributions on GPU", "add semi-Markov CRF segmentation layers to a neural network"], "what_it_is": "Torch-Struct is a PyTorch library of tested, GPU-accelerated implementations of core structured prediction algorithms such as CRFs, HMMs, HSMMs, dependency tree CRFs, and PCFGs. It is designed to be used as efficient batched layers inside other deep learning models, providing marginals, argmax, sampling, entropy, and partition computations.", "when_to_avoid": ["you need structured prediction in TensorFlow, JAX, or non-PyTorch frameworks", "you need actively maintained software with recent releases", "your models only involve unstructured classification or regression"], "when_to_choose": ["you need differentiable structured prediction layers (CRF, HMM, PCFG) in PyTorch", "you want batched, GPU-accelerated dynamic programming for sequence or tree structures", "you need marginals, argmax, sampling, or log-partition for structured models"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/pytorch-struct", "repo": "harvardnlp/pytorch-struct", "role": "main", "score": 23}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:03:42.964536+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T06:37:26.622013+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "34491538217a974030536aa44c6451a2f9d141fd623480f72952870eaae8912f", "fetched_at": "2026-08-28T04:03:42.964536+00:00", "kind": "readme", "missing": false, "url": "https://github.com/harvardnlp/pytorch-struct"}, {"content_hash": "fc663b4a31e4979c11f38a416f63abf5683482854c82193906e3e8ce29f34262", "fetched_at": "2026-08-29T12:42:17.750631+00:00", "kind": "homepage", "missing": false, "url": "http://harvardnlp.github.io/pytorch-struct"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 0, "longevity": 100, "rhythm": 8}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 2564, "days_push": 1596, "days_rel": null, "gap_med": null, "n_releases_24m": 0}, "score": 23, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}