Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

mgfrantz
/
distilgpt2-finetuned-reddit-tifu

Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
English
gpt2
text-generation-inference
Model card Files Files and versions
xet
Metrics Training metrics Community
1

Instructions to use mgfrantz/distilgpt2-finetuned-reddit-tifu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use mgfrantz/distilgpt2-finetuned-reddit-tifu with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="mgfrantz/distilgpt2-finetuned-reddit-tifu")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForMultimodalLM
    
    tokenizer = AutoTokenizer.from_pretrained("mgfrantz/distilgpt2-finetuned-reddit-tifu")
    model = AutoModelForMultimodalLM.from_pretrained("mgfrantz/distilgpt2-finetuned-reddit-tifu")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use mgfrantz/distilgpt2-finetuned-reddit-tifu with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "mgfrantz/distilgpt2-finetuned-reddit-tifu"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "mgfrantz/distilgpt2-finetuned-reddit-tifu",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/mgfrantz/distilgpt2-finetuned-reddit-tifu
  • SGLang

    How to use mgfrantz/distilgpt2-finetuned-reddit-tifu with SGLang:

    Install from pip and serve model
    # Install SGLang from pip:
    pip install sglang
    # Start the SGLang server:
    python3 -m sglang.launch_server \
        --model-path "mgfrantz/distilgpt2-finetuned-reddit-tifu" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "mgfrantz/distilgpt2-finetuned-reddit-tifu",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker images
    docker run --gpus all \
        --shm-size 32g \
        -p 30000:30000 \
        -v ~/.cache/huggingface:/root/.cache/huggingface \
        --env "HF_TOKEN=<secret>" \
        --ipc=host \
        lmsysorg/sglang:latest \
        python3 -m sglang.launch_server \
            --model-path "mgfrantz/distilgpt2-finetuned-reddit-tifu" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "mgfrantz/distilgpt2-finetuned-reddit-tifu",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use mgfrantz/distilgpt2-finetuned-reddit-tifu with Docker Model Runner:

    docker model run hf.co/mgfrantz/distilgpt2-finetuned-reddit-tifu
distilgpt2-finetuned-reddit-tifu
3.64 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 10 commits
mgfrantz's picture
mgfrantz
SFconvertbot's picture
SFconvertbot
Adding `safetensors` variant of this model (#1)
688875a almost 3 years ago
  • checkpoint-168000
    commit files to HF hub about 4 years ago
  • checkpoint-171000
    commit files to HF hub about 4 years ago
  • checkpoint-174000
    commit files to HF hub about 4 years ago
  • runs
    commit files to HF hub about 4 years ago
  • .gitattributes
    1.23 kB
    Adding `safetensors` variant of this model (#1) almost 3 years ago
  • README.md
    1.55 kB
    Update README.md about 4 years ago
  • config.json
    1.01 kB
    commit files to HF hub about 4 years ago
  • merges.txt
    456 kB
    Added tokenizer about 4 years ago
  • model.safetensors
    334 MB
    xet
    Adding `safetensors` variant of this model (#1) almost 3 years ago
  • pytorch_model.bin
    334 MB
    xet
    commit files to HF hub about 4 years ago
  • special_tokens_map.json
    90 Bytes
    Added tokenizer about 4 years ago
  • tokenizer.json
    2.11 MB
    Added tokenizer about 4 years ago
  • tokenizer_config.json
    242 Bytes
    Added tokenizer about 4 years ago
  • training_args.bin
    3.18 kB
    xet
    commit files to HF hub about 4 years ago
  • vocab.json
    798 kB
    Added tokenizer about 4 years ago