Instructions to use sshleifer/pegasus-cnn-ft-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sshleifer/pegasus-cnn-ft-v2 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="sshleifer/pegasus-cnn-ft-v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("sshleifer/pegasus-cnn-ft-v2") model = AutoModelForSeq2SeqLM.from_pretrained("sshleifer/pegasus-cnn-ft-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download logs/git_log.json from sshleifer/pegasus-cnn-ft-v2: direct link, hf CLI and curl.
- Browser
- Download file 174 Bytes
-
https://huggingface.co/sshleifer/pegasus-cnn-ft-v2/resolve/main/logs/git_log.json
- Command line
-
hf download hf://sshleifer/pegasus-cnn-ft-v2/logs/git_log.json
-
curl -L -o git_log.json https://huggingface.co/sshleifer/pegasus-cnn-ft-v2/resolve/main/logs/git_log.json
174 Bytes
| { | |
| "repo_id": "<git.repo.base.Repo '/home/shleifer/transformers_fork/.git'>", | |
| "repo_sha": "8c9cb960f2d07b1d2c57599bf4175a52a7b69bfd", | |
| "repo_branch": "normalizer" | |
| } |