Instructions to use c2p-cmd/GPT2-Summarizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use c2p-cmd/GPT2-Summarizer 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="c2p-cmd/GPT2-Summarizer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("c2p-cmd/GPT2-Summarizer") model = AutoModelForCausalLM.from_pretrained("c2p-cmd/GPT2-Summarizer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 131 Bytes
fe127da | 1 2 3 4 | version https://git-lfs.github.com/spec/v1
oid sha256:e22a3c4f382ba51edbc07b5c1731f5bf21a792ba7d37b2b9f1d766f877f7e50c
size 133909
|