Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

c2p-cmd
/
GPT2-Summarizer

Summarization
Transformers
Core ML
Safetensors
gpt2
text-generation
text-generation-inference
Model card Files Files and versions
xet
Community

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")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("c2p-cmd/GPT2-Summarizer")
    model = AutoModelForCausalLM.from_pretrained("c2p-cmd/GPT2-Summarizer")
  • Notebooks
  • Google Colab
  • Kaggle
GPT2-Summarizer
Ctrl+K
Ctrl+K
  • 1 contributor
History: 4 commits
c2p-cmd's picture
c2p-cmd
Upload folder using huggingface_hub
fe127da verified over 1 year ago
  • GPT2-Summarizer.mlpackage
    Upload folder using huggingface_hub over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    180 Bytes
    Update README.md over 1 year ago
  • config.json
    949 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • generation_config.json
    119 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • merges.txt
    456 kB
    Upload folder using huggingface_hub over 1 year ago
  • model.safetensors
    498 MB
    xet
    Upload folder using huggingface_hub over 1 year ago
  • special_tokens_map.json
    131 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • tokenizer.json
    3.56 MB
    Upload folder using huggingface_hub over 1 year ago
  • tokenizer_config.json
    477 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • vocab.json
    798 kB
    Upload folder using huggingface_hub over 1 year ago