github pyg-team/pytorch_geometric 2.8.0
PyG 2.8.0

5 hours ago

We are excited to announce the release of PyG 2.8 🎉🎉🎉

  • Highlights
  • Breaking Changes
  • Features
  • Bugfixes
  • Changes
  • New Contributors
  • Full Changelog

PyG 2.8 includes 82 commits since torch-geometric==2.7.0, with feature and bug-fix work from 16 contributors.

Highlights

Support for PyTorch 2.9-2.12

PyG 2.8 supports PyTorch 2.9, 2.10, 2.11, and 2.12, along with Python 3.10-3.14. Prebuilt wheels are available for CUDA 12.6, 12.8, 13.0, and 13.2, depending on the PyTorch version (see the table below).

PyTorch Supported wheels
2.12.* cpu, cu126, cu130, cu132
2.11.* cpu, cu126, cu128, cu130
2.10.* cpu, cu126, cu128, cu130
2.9.* cpu, cu126, cu128, cu130

For a typical installation, PyG remains installable directly from PyPI:

pip install torch-geometric

# Optional accelerated dependencies, matching your PyTorch install:
pip install pyg-lib torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-${TORCH}+${CUDA}.html

For example, use TORCH=2.12.0 and CUDA=cu132 for PyTorch 2.12.* with CUDA 13.2.

Consolidated Acceleration on pyg-lib

PyG 2.8 trims its optional accelerated dependencies: torch-cluster and torch-spline-conv are now deprecated and ignored, with their functionality provided by pyg-lib==0.7.0. The installation and cuGraph documentation now point users toward the NVIDIA PyG container, the rapidsai/cugraph-gnn examples, and RAPIDS guidance for scalable GPU workflows (#10489, #10603, #10639, #10640).

Synthetic QA Generation for Graph RAG

The new examples/llm/txt2qa.py workflow introduces a synthetic multi-hop question-answer generation pipeline for text documents (#10559). It supports local vLLM and NVIDIA NIM API backends and is designed for creating training and evaluation data for retrieval-augmented generation systems.

Breaking Changes

  • Dropped support for PyTorch 2.8. Use PyG 2.8 with PyTorch 2.9 through 2.12, or pin torch-geometric==2.7.* if you need to stay on PyTorch 2.8. Older PyTorch 2.8 wheel links remain available for existing installs (#10708).
  • Removed dependencies on torch-cluster and torch-spline-conv in favor of pyg-lib==0.7.0. These packages are now deprecated and ignored if installed; the operators they previously provided now require pyg-lib==0.7.0 (#10682, #10622).

Features

Examples

  • Added examples/llm/txt2qa.py for synthetic multi-hop QA generation from text documents with vLLM and NVIDIA NIM backends (#10559).
  • Added examples/llm/relbench_gretriever.py, showing how to convert a RelBench database into a PyG graph and run GRetriever on it (#10681).
  • Added examples/relbench_example.py for the new RelBench conversion utility (#10628).
  • Added examples/graphland.py for the GraphLand benchmark (#10458).
  • Improved the txt2kg model and its example indexing flow (#10623, #10546).

torch_geometric.datasets

  • Added GraphLandDataset (#10458).

torch_geometric.nn

  • Made the clamp range of PowerMeanAggregation adjustable (#10366).

torch_geometric.utils

  • Added segment_logsumexp (#10594).

Installation and Platform Support

  • Added PyTorch 2.9, 2.10, 2.11, and 2.12 support, including cu130 wheel references and PyTorch 2.12 cu132 wheel support (#10634, #10669, #10708).
  • Added support for Python 3.14 (#10708).

Documentation

  • Added a tutorial on pooling in graph neural networks with torch-geometric-pool (#10637).
  • Added documentation for torch_geometric.nn.encoding (#10617).
  • Expanded cuGraph GNN installation and documentation guidance (#10489, #10603).
  • Updated the LLM example READMEs (#10515, #10574, #10599).

Bugfixes

  • Fixed dtype mismatch issues in GRetriever training and inference paths (#10595, #10681).
  • Fixed MovieLens dataset compatibility with sentence-transformers>=5.0.0 (#10668).
  • Fixed loading of legacy Hugging Face BERT checkpoints (#10631).
  • Fixed download links for the UPFD politifact and gossipcop datasets (#10558).
  • Fixed a GLEM edge case in the LLM example stack (#10492).
  • Fixed deprecated torch_dtype usage in favor of dtype in the LLM stack (#10556).
  • Fixed .llm imports so importing LLM functionality does not trigger the deprecated .distributed warning (#10512).

Changes

  • Improved runtime of to_dense_batch in both eager mode and torch.compile (#10542, #10660).
  • Removed an unnecessary device synchronization in torch_geometric.utils.softmax (#10499).
  • Cleaned up cuGraph operators, examples, README references, and documentation while pointing users toward the maintained rapidsai/cugraph-gnn examples (#10383, #10489, #10639, #10640).
  • Removed deprecated native PyG distributed example scripts under examples/distributed/pyg; the directory now points users to cuGraph GNN guidance (#10489).
  • Removed the outdated DataParallel example (#10638).
  • Removed outdated LLM NVTX examples (#10545).
  • Removed the unused conda/ directory (#10464).

New Contributors

Full Changelog

Full Changelog: 2.7.0...2.8.0

Don't miss a new pytorch_geometric release

NewReleases is sending notifications on new releases.