Instructions to use jordypg/PEGembed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jordypg/PEGembed with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="jordypg/PEGembed")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jordypg/PEGembed", dtype="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("jordypg/PEGembed", dtype="auto")Quick Links
Extractive summarization, followed by abstractive summmarization. Extractive summarization performed via Top-K Sentence Cosine, in which the cosine similarity of sentence embeddings are compared. Abstractive summarization comes from the PEGASUS-X model, fine-tuned on Top-K Sentence Cosine summaries of papers from the eLife dataset. See attached paper for further details.
Implemented for graduate course COSC-685 Advanced NLP, in collaboration with Zhiheng Wang, Ahmed Jaafar, and Jiarui Liu.
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="jordypg/PEGembed")