Skip to content

Commit

Permalink
add GLEM model, TAGDataset and example of GLEM (#9662)
Browse files Browse the repository at this point in the history
reopened  #9591 

Feature summary:

- Add GLEM as GNN & LLM Co-training model to PyG
- adapt GLEM's LM to AutoModelForSequenceClassification from
transformers
- Lora support
- LM/LLM support
- ogbn-products/ogbn-arxiv testing finished
- TAGDataset can be used as a wrapper class for any node classification
dataset in PyG with LM tokenizer and associate raw text
- external prediction as pseudo labels supported

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rishi Puri <puririshi98@berkeley.edu>
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
  • Loading branch information
4 people authored Nov 19, 2024
1 parent 5570242 commit e1a925b
Show file tree
Hide file tree
Showing 7 changed files with 1,187 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Added

- Added `nn.models.GLEM` ([#9662](https://github.com/pyg-team/pytorch_geometric/pull/9662))
- Added `TAGDataset` ([#9662](https://github.com/pyg-team/pytorch_geometric/pull/9662))
- Added support for fast `Delaunay()` triangulation via the `torch_delaunay` package ([#9748](https://github.com/pyg-team/pytorch_geometric/pull/9748))
- Added PyTorch 2.5 support ([#9779](https://github.com/pyg-team/pytorch_geometric/pull/9779), [#9779](https://github.com/pyg-team/pytorch_geometric/pull/9780))
- Support 3D tetrahedral mesh elements of shape `[4, num_faces]` in the `FaceToEdge` transformation ([#9776](https://github.com/pyg-team/pytorch_geometric/pull/9776))
Expand Down
7 changes: 4 additions & 3 deletions examples/llm/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Examples for Co-training LLMs and GNNs

| Example | Description |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`g_retriever.py`](./g_retriever.py) | Example for Retrieval-Augmented Generation (RAG) w/ GNN+LLM by co-training `LLAMA2` with `GAT` for answering questions based on knowledge graph information |
| Example | Description |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`g_retriever.py`](./g_retriever.py) | Example for Retrieval-Augmented Generation (RAG) w/ GNN+LLM by co-training `LLAMA2` with `GAT` for answering questions based on knowledge graph information |
| [`glem.py`](./glem.py) | Example for [GLEM](https://arxiv.org/abs/2210.14709), a GNN+LLM co-training model via variational Expectation-Maximization (EM) framework on node classification tasks to achieve SOTA results |
Loading

0 comments on commit e1a925b

Please sign in to comment.