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}.htmlFor 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-clusterandtorch-spline-convin favor ofpyg-lib==0.7.0. These packages are now deprecated and ignored if installed; the operators they previously provided now requirepyg-lib==0.7.0(#10682, #10622).
Features
Examples
- Added
examples/llm/txt2qa.pyfor 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.pyfor the new RelBench conversion utility (#10628). - Added
examples/graphland.pyfor the GraphLand benchmark (#10458). - Improved the
txt2kgmodel and its example indexing flow (#10623, #10546).
torch_geometric.datasets
- Added
GraphLandDataset(#10458).
torch_geometric.nn
- Made the clamp range of
PowerMeanAggregationadjustable (#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
cu130wheel references and PyTorch 2.12cu132wheel 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
MovieLensdataset compatibility withsentence-transformers>=5.0.0(#10668). - Fixed loading of legacy Hugging Face BERT checkpoints (#10631).
- Fixed download links for the
UPFDpolitifactandgossipcopdatasets (#10558). - Fixed a
GLEMedge case in the LLM example stack (#10492). - Fixed deprecated
torch_dtypeusage in favor ofdtypein the LLM stack (#10556). - Fixed
.llmimports so importing LLM functionality does not trigger the deprecated.distributedwarning (#10512).
Changes
- Improved runtime of
to_dense_batchin both eager mode andtorch.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-gnnexamples (#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
DataParallelexample (#10638). - Removed outdated LLM NVTX examples (#10545).
- Removed the unused
conda/directory (#10464).
New Contributors
- @ssmaheswar2001 made their first contribution in #10582
- @LynchXLQ made their first contribution in #10596
- @KaneGreen made their first contribution in #10366
- @carloabate made their first contribution in #10637
- @spinjo made their first contribution in #10499
- @JiwaniZakir made their first contribution in #10645
- @askliar made their first contribution in #10559
Full Changelog
Full Changelog: 2.7.0...2.8.0