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

  • Log In
  • Sign Up

ablam
/
distilgpt2_fine_tuned_gcode

Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Model card Files Files and versions
xet
Metrics Training metrics Community
4

Instructions to use ablam/distilgpt2_fine_tuned_gcode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use ablam/distilgpt2_fine_tuned_gcode with Transformers:

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

    How to use ablam/distilgpt2_fine_tuned_gcode with vLLM:

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

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

    How to use ablam/distilgpt2_fine_tuned_gcode with Docker Model Runner:

    docker model run hf.co/ablam/distilgpt2_fine_tuned_gcode
distilgpt2_fine_tuned_gcode / runs
242 kB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 56 commits
ablam's picture
ablam
End of training
e404722 almost 4 years ago
  • Jun10_18-26-32_hal10
    Training in progress, step 500 almost 4 years ago
  • Jun10_20-14-03_hal01
    End of training almost 4 years ago
  • May10_19-59-31_hal11
    Training in progress, step 500 about 4 years ago
  • May10_21-05-54_hal11
    Training in progress, step 500 about 4 years ago
  • May11_01-14-37_hal14
    Training in progress, step 500 about 4 years ago
  • May11_09-10-00_hal15
    Training in progress, step 500 about 4 years ago
  • May11_11-40-29_hal15
    Training in progress, step 500 about 4 years ago
  • May11_12-52-36_hal10
    Training in progress, step 500 almost 4 years ago
  • May12_14-24-51_hal10
    Training in progress, step 500 almost 4 years ago
  • May12_16-13-33_hal10
    Training in progress, step 500 almost 4 years ago
  • May12_16-36-52_hal10
    Training in progress, step 500 almost 4 years ago
  • May13_16-56-59_hal11
    End of training almost 4 years ago