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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

Duplicated from  hakanbogan/gpt2-turkish-cased

ahmetcangunay
/
gpt-2-experimental

Text Generation
Transformers
PyTorch
google-tensorflow TensorFlow
JAX
Safetensors
Turkish
gpt2
turkish
gpt2-tr
gpt2-turkish
text-generation-inference
Model card Files Files and versions
xet
Community
1

Instructions to use ahmetcangunay/gpt-2-experimental with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use ahmetcangunay/gpt-2-experimental with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="ahmetcangunay/gpt-2-experimental")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("ahmetcangunay/gpt-2-experimental")
    model = AutoModelForCausalLM.from_pretrained("ahmetcangunay/gpt-2-experimental", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use ahmetcangunay/gpt-2-experimental with vLLM:

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

    How to use ahmetcangunay/gpt-2-experimental 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 "ahmetcangunay/gpt-2-experimental" \
        --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": "ahmetcangunay/gpt-2-experimental",
    		"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 "ahmetcangunay/gpt-2-experimental" \
            --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": "ahmetcangunay/gpt-2-experimental",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use ahmetcangunay/gpt-2-experimental with Docker Model Runner:

    docker model run hf.co/ahmetcangunay/gpt-2-experimental
gpt-2-experimental
2.02 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 28 commits
Ahmet Can GÜNAY
SFconvertbot's picture
SFconvertbot
Adding `safetensors` variant of this model (#1)
f7dac16 verified over 1 year ago
  • .gitattributes
    444 Bytes
    Adding `safetensors` variant of this model (#1) over 1 year ago
  • .gitignore
    20 Bytes
    Update .gitignore almost 3 years ago
  • README.md
    1.43 kB
    Update README.md almost 3 years ago
  • config.json
    720 Bytes
    Update config.json almost 3 years ago
  • flax_model.msgpack
    498 MB
    xet
    Rename flax_modell.msgpack to flax_model.msgpack almost 3 years ago
  • merges.txt
    594 kB
    Rename mergess.txt to merges.txt almost 3 years ago
  • metadata.json
    154 Bytes
    Update metadata.json almost 3 years ago
  • model.safetensors
    510 MB
    xet
    Adding `safetensors` variant of this model (#1) over 1 year ago
  • pytorch_model.bin
    510 MB
    xet
    Rename pytorch_modell.bin to pytorch_model.bin almost 3 years ago
  • special_tokens_map.json
    357 Bytes
    Rename special_tokens_mapp.json to special_tokens_map.json almost 3 years ago
  • tf_model.h5
    498 MB
    xet
    Rename tf_modell.h5 to tf_model.h5 almost 3 years ago
  • tokenizer_config.json
    595 Bytes
    Rename tokenizer_configg.json to tokenizer_config.json almost 3 years ago
  • training_args.bin
    1.78 kB
    xet
    Rename training_argss.bin to training_args.bin almost 3 years ago
  • vocab.json
    1.04 MB
    Rename vocabb.json to vocab.json almost 3 years ago